Class: Google::Apis::RetailV2alpha::CloudRetailService

Inherits:
Core::BaseService
  • Object
show all
Defined in:
lib/google/apis/retail_v2alpha/service.rb

Overview

Vertex AI Search for Retail API

Vertex AI Search for Retail API is made up of Retail Search, Browse and Recommendations. These discovery AI solutions help you implement personalized search, browse and recommendations, based on machine learning models, across your websites and mobile applications.

Examples:

require 'google/apis/retail_v2alpha'

Retail = Google::Apis::RetailV2alpha # Alias the module
service = Retail::CloudRetailService.new

See Also:

Constant Summary collapse

DEFAULT_ENDPOINT_TEMPLATE =
"https://retail.$UNIVERSE_DOMAIN$/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCloudRetailService

Returns a new instance of CloudRetailService.



50
51
52
53
54
55
# File 'lib/google/apis/retail_v2alpha/service.rb', line 50

def initialize
  super(DEFAULT_ENDPOINT_TEMPLATE, '',
        client_name: 'google-apis-retail_v2alpha',
        client_version: Google::Apis::RetailV2alpha::GEM_VERSION)
  @batch_path = 'batch'
end

Instance Attribute Details

#keyString

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.

Returns:

  • (String)

    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.



43
44
45
# File 'lib/google/apis/retail_v2alpha/service.rb', line 43

def key
  @key
end

#quota_userString

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.

Returns:

  • (String)

    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.



48
49
50
# File 'lib/google/apis/retail_v2alpha/service.rb', line 48

def quota_user
  @quota_user
end

Instance Method Details

#accept_project_retail_project_terms(project, google_cloud_retail_v2alpha_accept_terms_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProject

Accepts service terms for this project. By making requests to this API, you agree to the terms of service linked below. https://cloud.google.com/retail/ data-use-terms

Parameters:

  • project (String)

    Required. Full resource name of the project. Format: projects/ project_number_or_id/retailProject

  • google_cloud_retail_v2alpha_accept_terms_request_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAcceptTermsRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
# File 'lib/google/apis/retail_v2alpha/service.rb', line 3093

def accept_project_retail_project_terms(project, google_cloud_retail_v2alpha_accept_terms_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+project}:acceptTerms', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAcceptTermsRequest::Representation
  command.request_object = google_cloud_retail_v2alpha_accept_terms_request_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProject::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProject
  command.params['project'] = project unless project.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#add_project_location_catalog_attributes_config_catalog_attribute(attributes_config, google_cloud_retail_v2alpha_add_catalog_attribute_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAttributesConfig

Adds the specified CatalogAttribute to the AttributesConfig. If the CatalogAttribute to add already exists, an ALREADY_EXISTS error is returned.

Parameters:

  • attributes_config (String)

    Required. Full AttributesConfig resource name. Format: projects/ project_number/locations/location_id/catalogs/catalog_id/attributesConfig

  • google_cloud_retail_v2alpha_add_catalog_attribute_request_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAddCatalogAttributeRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



752
753
754
755
756
757
758
759
760
761
762
# File 'lib/google/apis/retail_v2alpha/service.rb', line 752

def add_project_location_catalog_attributes_config_catalog_attribute(attributes_config, google_cloud_retail_v2alpha_add_catalog_attribute_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+attributesConfig}:addCatalogAttribute', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAddCatalogAttributeRequest::Representation
  command.request_object = google_cloud_retail_v2alpha_add_catalog_attribute_request_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAttributesConfig::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAttributesConfig
  command.params['attributesConfig'] = attributes_config unless attributes_config.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#add_project_location_catalog_branch_product_fulfillment_places(product, google_cloud_retail_v2alpha_add_fulfillment_places_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleLongrunningOperation

We recommend that you use the ProductService.AddLocalInventories method instead of the ProductService.AddFulfillmentPlaces method. ProductService. AddLocalInventories achieves the same results but provides more fine-grained control over ingesting local inventory data. 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 ProductService.GetProduct or ProductService.ListProducts. The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards. If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete.

Parameters:

  • product (String)

    Required. Full resource name of Product, such as projects/*/locations/global/ catalogs/default_catalog/branches/default_branch/products/some_product_id. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

  • google_cloud_retail_v2alpha_add_fulfillment_places_request_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAddFulfillmentPlacesRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
# File 'lib/google/apis/retail_v2alpha/service.rb', line 1041

def add_project_location_catalog_branch_product_fulfillment_places(product, google_cloud_retail_v2alpha_add_fulfillment_places_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+product}:addFulfillmentPlaces', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAddFulfillmentPlacesRequest::Representation
  command.request_object = google_cloud_retail_v2alpha_add_fulfillment_places_request_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2alpha::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

#add_project_location_catalog_branch_product_local_inventories(product, google_cloud_retail_v2alpha_add_local_inventories_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleLongrunningOperation

Updates local inventory information for a Product at a list of places, while respecting the last update timestamps of each inventory field. This process is asynchronous and does not require the Product to exist before updating inventory 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 ProductService.GetProduct or ProductService.ListProducts. Local inventory information can only be modified using this method. ProductService. CreateProduct and ProductService.UpdateProduct has no effect on local inventories. The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards. If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete.

Parameters:

  • product (String)

    Required. Full resource name of Product, such as projects/*/locations/global/ catalogs/default_catalog/branches/default_branch/products/some_product_id. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

  • google_cloud_retail_v2alpha_add_local_inventories_request_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAddLocalInventoriesRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
# File 'lib/google/apis/retail_v2alpha/service.rb', line 1089

def add_project_location_catalog_branch_product_local_inventories(product, google_cloud_retail_v2alpha_add_local_inventories_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+product}:addLocalInventories', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAddLocalInventoriesRequest::Representation
  command.request_object = google_cloud_retail_v2alpha_add_local_inventories_request_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2alpha::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

#add_project_location_catalog_serving_config_control(serving_config, google_cloud_retail_v2alpha_add_control_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaServingConfig

Enables a Control on the specified ServingConfig. The control is added in the last position of the list of controls it belongs to (e.g. if it's a facet spec control it will be applied in the last position of servingConfig.facetSpecIds) Returns a ALREADY_EXISTS error if the control has already been applied. Returns a FAILED_PRECONDITION error if the addition could exceed maximum number of control allowed for that type of control.

Parameters:

  • serving_config (String)

    Required. The source ServingConfig resource name . Format: projects/ project_number/locations/location_id/catalogs/catalog_id/servingConfigs/ serving_config_id``

  • google_cloud_retail_v2alpha_add_control_request_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAddControlRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
# File 'lib/google/apis/retail_v2alpha/service.rb', line 2364

def add_project_location_catalog_serving_config_control(serving_config, google_cloud_retail_v2alpha_add_control_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+servingConfig}:addControl', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAddControlRequest::Representation
  command.request_object = google_cloud_retail_v2alpha_add_control_request_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaServingConfig::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaServingConfig
  command.params['servingConfig'] = serving_config unless serving_config.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#batch_project_location_catalog_attributes_config_remove_catalog_attributes(attributes_config, google_cloud_retail_v2alpha_batch_remove_catalog_attributes_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesResponse

Removes all specified CatalogAttributes from the AttributesConfig.

Parameters:

  • attributes_config (String)

    Required. The attributes config resource shared by all catalog attributes being deleted. Format: projects/project_number/locations/location_id/ catalogs/catalog_id/attributesConfig

  • google_cloud_retail_v2alpha_batch_remove_catalog_attributes_request_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



787
788
789
790
791
792
793
794
795
796
797
# File 'lib/google/apis/retail_v2alpha/service.rb', line 787

def batch_project_location_catalog_attributes_config_remove_catalog_attributes(attributes_config, google_cloud_retail_v2alpha_batch_remove_catalog_attributes_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+attributesConfig}:batchRemoveCatalogAttributes', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesRequest::Representation
  command.request_object = google_cloud_retail_v2alpha_batch_remove_catalog_attributes_request_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesResponse::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesResponse
  command.params['attributesConfig'] = attributes_config unless attributes_config.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, prebuilt_rule: nil, raw_json: nil, uri: nil, user_event: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::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.

Parameters:

  • parent (String)

    Required. The parent catalog name, such as projects/1234/locations/global/ catalogs/default_catalog.

  • ets (Fixnum) (defaults to: nil)

    The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.

  • prebuilt_rule (String) (defaults to: nil)

    The prebuilt rule name that can convert a specific type of raw_json. For example: "ga4_bq" rule for the GA4 user event schema.

  • raw_json (String) (defaults to: nil)

    An arbitrary serialized JSON string that contains necessary information that can comprise a user event. When this field is specified, the user_event field will be ignored. Note: line-delimited JSON is not supported, a single JSON only.

  • uri (String) (defaults to: nil)

    The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for 3rd party requests.

  • user_event (String) (defaults to: nil)

    Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
# File 'lib/google/apis/retail_v2alpha/service.rb', line 2722

def collect_project_location_catalog_user_event(parent, ets: nil, prebuilt_rule: nil, raw_json: nil, uri: nil, user_event: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2alpha/{+parent}/userEvents:collect', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleApiHttpBody::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleApiHttpBody
  command.params['parent'] = parent unless parent.nil?
  command.query['ets'] = ets unless ets.nil?
  command.query['prebuiltRule'] = prebuilt_rule unless prebuilt_rule.nil?
  command.query['rawJson'] = raw_json unless raw_json.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, enable_attribute_suggestions: nil, entity: nil, language_codes: nil, max_suggestions: nil, query: nil, visitor_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCompleteQueryResponse

Completes the specified prefix with keyword suggestions. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters:

  • catalog (String)

    Required. Catalog for which the completion is performed. Full resource name of catalog, such as projects/*/locations/global/catalogs/default_catalog.

  • dataset (String) (defaults to: nil)

    Determines which dataset to use for fetching completion. "user-data" will use the imported dataset through CompletionService.ImportCompletionData. "cloud- retail" will use the dataset generated by cloud retail based on user events. If leave empty, it will use the "user-data". Current supported values: * user- data * cloud-retail: This option requires enabling auto-learning function first. See guidelines.

  • device_type (String) (defaults to: nil)

    The device type context for completion suggestions. We recommend that you leave this field empty. It can apply different suggestions on different device types, e.g. DESKTOP, MOBILE. If it is empty, the suggestions are across all device types. Supported formats: * UNKNOWN_DEVICE_TYPE * DESKTOP * MOBILE * A customized string starts with OTHER_, e.g. OTHER_IPHONE.

  • enable_attribute_suggestions (Boolean) (defaults to: nil)

    If true, attribute suggestions are enabled and provided in the response. This field is only available for the "cloud-retail" dataset.

  • entity (String) (defaults to: nil)

    The entity for customers who run multiple entities, domains, sites, or regions, for example, Google US, Google Ads, Waymo, google.com, youtube.com, etc. If this is set, it must be an exact match with UserEvent.entity to get per-entity autocomplete results.

  • language_codes (Array<String>, String) (defaults to: nil)

    Note that this field applies for user-data dataset only. For requests with cloud-retail dataset, setting this field has no effect. The language filters applied to the output suggestions. If set, it should contain the language of the query. If not set, suggestions are returned without considering language restrictions. This is the BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see Tags for Identifying Languages. The maximum number of language codes is 3.

  • max_suggestions (Fixnum) (defaults to: nil)

    Completion max suggestions. If left unset or set to 0, then will fallback to the configured value CompletionConfig.max_suggestions. The maximum allowed max suggestions is 20. If it is set higher, it will be capped by 20.

  • query (String) (defaults to: nil)

    Required. The query used to generate suggestions. The maximum number of allowed characters is 255.

  • visitor_id (String) (defaults to: nil)

    Required field. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
# File 'lib/google/apis/retail_v2alpha/service.rb', line 364

def complete_project_location_catalog_query(catalog, dataset: nil, device_type: nil, enable_attribute_suggestions: nil, entity: 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, 'v2alpha/{+catalog}:completeQuery', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCompleteQueryResponse::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCompleteQueryResponse
  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['enableAttributeSuggestions'] = enable_attribute_suggestions unless enable_attribute_suggestions.nil?
  command.query['entity'] = entity unless entity.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_v2alpha_product_object = nil, product_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct

Creates a Product.

Parameters:

  • parent (String)

    Required. The parent catalog resource name, such as projects/*/locations/ global/catalogs/default_catalog/branches/default_branch.

  • google_cloud_retail_v2alpha_product_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct) (defaults to: nil)
  • product_id (String) (defaults to: nil)

    Required. The ID to use for the Product, which will become the final component of the Product.name. If the caller does not have permission to create the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. This field must be unique among all Products with the same parent. Otherwise, an ALREADY_EXISTS error is returned. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
# File 'lib/google/apis/retail_v2alpha/service.rb', line 1131

def create_project_location_catalog_branch_product(parent, google_cloud_retail_v2alpha_product_object = nil, product_id: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+parent}/products', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct::Representation
  command.request_object = google_cloud_retail_v2alpha_product_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct
  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

#create_project_location_catalog_control(parent, google_cloud_retail_v2alpha_control_object = nil, control_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaControl

Creates a Control. If the Control to create already exists, an ALREADY_EXISTS error is returned.

Parameters:

  • parent (String)

    Required. Full resource name of parent catalog. Format: projects/ project_number/locations/location_id/catalogs/catalog_id``

  • google_cloud_retail_v2alpha_control_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaControl) (defaults to: nil)
  • control_id (String) (defaults to: nil)

    Required. The ID to use for the Control, which will become the final component of the Control's resource name. This value should be 4-63 characters, and valid characters are /a-z-_/.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
# File 'lib/google/apis/retail_v2alpha/service.rb', line 1635

def create_project_location_catalog_control(parent, google_cloud_retail_v2alpha_control_object = nil, control_id: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+parent}/controls', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaControl::Representation
  command.request_object = google_cloud_retail_v2alpha_control_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaControl::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaControl
  command.params['parent'] = parent unless parent.nil?
  command.query['controlId'] = control_id unless control_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

Creates a MerchantCenterAccountLink.

Parameters:

  • parent (String)

    Required. The branch resource where this MerchantCenterAccountLink will be created. Format: projects/PROJECT_NUMBER/locations/global/catalogs/ CATALOG_ID``

  • google_cloud_retail_v2alpha_merchant_center_account_link_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaMerchantCenterAccountLink) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
# File 'lib/google/apis/retail_v2alpha/service.rb', line 1822

def (parent,  = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+parent}/merchantCenterAccountLinks', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaMerchantCenterAccountLink::Representation
  command.request_object = 
  command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2alpha::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

#create_project_location_catalog_model(parent, google_cloud_retail_v2alpha_model_object = nil, dry_run: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleLongrunningOperation

Creates a new model.

Parameters:

  • parent (String)

    Required. The parent resource under which to create the model. Format: projects/project_number/locations/location_id/catalogs/catalog_id``

  • google_cloud_retail_v2alpha_model_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaModel) (defaults to: nil)
  • dry_run (Boolean) (defaults to: nil)

    Optional. Whether to run a dry run to validate the request (without actually creating the model).

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
# File 'lib/google/apis/retail_v2alpha/service.rb', line 1923

def create_project_location_catalog_model(parent, google_cloud_retail_v2alpha_model_object = nil, dry_run: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+parent}/models', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaModel::Representation
  command.request_object = google_cloud_retail_v2alpha_model_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleLongrunningOperation
  command.params['parent'] = parent unless parent.nil?
  command.query['dryRun'] = dry_run unless dry_run.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_serving_config(parent, google_cloud_retail_v2alpha_serving_config_object = nil, serving_config_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaServingConfig

Creates a ServingConfig. A maximum of 100 ServingConfigs are allowed in a Catalog, otherwise a FAILED_PRECONDITION error is returned.

Parameters:

  • parent (String)

    Required. Full resource name of parent. Format: projects/project_number/ locations/location_id/catalogs/catalog_id``

  • google_cloud_retail_v2alpha_serving_config_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaServingConfig) (defaults to: nil)
  • serving_config_id (String) (defaults to: nil)

    Required. The ID to use for the ServingConfig, which will become the final component of the ServingConfig's resource name. This value should be 4-63 characters, and valid characters are /a-z-_/.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
# File 'lib/google/apis/retail_v2alpha/service.rb', line 2403

def create_project_location_catalog_serving_config(parent, google_cloud_retail_v2alpha_serving_config_object = nil, serving_config_id: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+parent}/servingConfigs', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaServingConfig::Representation
  command.request_object = google_cloud_retail_v2alpha_serving_config_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaServingConfig::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaServingConfig
  command.params['parent'] = parent unless parent.nil?
  command.query['servingConfigId'] = serving_config_id unless serving_config_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, force: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleProtobufEmpty

Deletes a Product.

Parameters:

  • name (String)

    Required. Full resource name of Product, such as projects/*/locations/global/ catalogs/default_catalog/branches/default_branch/products/some_product_id. If the caller does not have permission to delete the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Product to delete does not exist, a NOT_FOUND error is returned. The Product to delete can neither be a Product.Type.COLLECTION Product member nor a Product.Type.PRIMARY Product with more than one variants. Otherwise, an INVALID_ARGUMENT error is returned. All inventory information for the named Product will be deleted.

  • force (Boolean) (defaults to: nil)

    This value only applies to the case when the target product is of type PRIMARY. When deleting a product of VARIANT/COLLECTION type, this value will be ignored. When set to true, the subsequent variant products will be deleted. When set to false, if the primary product has active variant products, an error will be returned.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
# File 'lib/google/apis/retail_v2alpha/service.rb', line 1178

def delete_project_location_catalog_branch_product(name, force: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v2alpha/{+name}', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleProtobufEmpty::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleProtobufEmpty
  command.params['name'] = name unless name.nil?
  command.query['force'] = force unless force.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_control(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleProtobufEmpty

Deletes a Control. If the Control to delete does not exist, a NOT_FOUND error is returned.

Parameters:

  • name (String)

    Required. The resource name of the Control to delete. Format: projects/ project_number/locations/location_id/catalogs/catalog_id/controls/ control_id``

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1671
1672
1673
1674
1675
1676
1677
1678
1679
# File 'lib/google/apis/retail_v2alpha/service.rb', line 1671

def delete_project_location_catalog_control(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v2alpha/{+name}', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleProtobufEmpty::Representation
  command.response_class = Google::Apis::RetailV2alpha::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

Deletes a MerchantCenterAccountLink. If the MerchantCenterAccountLink to delete does not exist, a NOT_FOUND error is returned.

Parameters:

  • name (String)

    Required. Full resource name. Format: projects/project_number/locations/ location_id/catalogs/catalog_id/merchantCenterAccountLinks/ merchant_center_account_link_id``

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1857
1858
1859
1860
1861
1862
1863
1864
1865
# File 'lib/google/apis/retail_v2alpha/service.rb', line 1857

def (name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v2alpha/{+name}', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleProtobufEmpty::Representation
  command.response_class = Google::Apis::RetailV2alpha::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

#delete_project_location_catalog_model(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleProtobufEmpty

Deletes an existing model.

Parameters:

  • name (String)

    Required. The resource name of the Model to delete. Format: projects/ project_number/locations/location_id/catalogs/catalog_id/models/model_id

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1958
1959
1960
1961
1962
1963
1964
1965
1966
# File 'lib/google/apis/retail_v2alpha/service.rb', line 1958

def delete_project_location_catalog_model(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v2alpha/{+name}', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleProtobufEmpty::Representation
  command.response_class = Google::Apis::RetailV2alpha::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

#delete_project_location_catalog_serving_config(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleProtobufEmpty

Deletes a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.

Parameters:

  • name (String)

    Required. The resource name of the ServingConfig to delete. Format: projects/ project_number/locations/location_id/catalogs/catalog_id/servingConfigs/ serving_config_id``

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2439
2440
2441
2442
2443
2444
2445
2446
2447
# File 'lib/google/apis/retail_v2alpha/service.rb', line 2439

def delete_project_location_catalog_serving_config(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v2alpha/{+name}', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleProtobufEmpty::Representation
  command.response_class = Google::Apis::RetailV2alpha::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

#enroll_project_solution(project, google_cloud_retail_v2alpha_enroll_solution_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleLongrunningOperation

The method enrolls a solution of type Retail Search into a project. The Recommendations AI solution type is enrolled by default when your project enables Retail API, so you don't need to call the enrollSolution method for recommendations.

Parameters:

  • project (String)

    Required. Full resource name of parent. Format: projects/ project_number_or_id``

  • google_cloud_retail_v2alpha_enroll_solution_request_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaEnrollSolutionRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



82
83
84
85
86
87
88
89
90
91
92
# File 'lib/google/apis/retail_v2alpha/service.rb', line 82

def enroll_project_solution(project, google_cloud_retail_v2alpha_enroll_solution_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+project}:enrollSolution', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaEnrollSolutionRequest::Representation
  command.request_object = google_cloud_retail_v2alpha_enroll_solution_request_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleLongrunningOperation
  command.params['project'] = project unless project.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#export_project_location_catalog_analytics_metrics(catalog, google_cloud_retail_v2alpha_export_analytics_metrics_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleLongrunningOperation

Exports analytics metrics. Operation.response is of type ExportAnalyticsMetricsResponse. Operation.metadata is of type ExportMetadata.

Parameters:

  • catalog (String)

    Required. Full resource name of the parent catalog. Expected format: projects/ */locations/*/catalogs/*

  • google_cloud_retail_v2alpha_export_analytics_metrics_request_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaExportAnalyticsMetricsRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



406
407
408
409
410
411
412
413
414
415
416
# File 'lib/google/apis/retail_v2alpha/service.rb', line 406

def export_project_location_catalog_analytics_metrics(catalog, google_cloud_retail_v2alpha_export_analytics_metrics_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+catalog}:exportAnalyticsMetrics', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaExportAnalyticsMetricsRequest::Representation
  command.request_object = google_cloud_retail_v2alpha_export_analytics_metrics_request_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleLongrunningOperation
  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

#export_project_location_catalog_user_event(parent, google_cloud_retail_v2alpha_export_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleLongrunningOperation

Exports user events. Operation.response is of type ExportResponse. Operation.metadata is of type ExportMetadata.

Parameters:

  • parent (String)

    Required. Resource name of a Catalog. For example projects/1234/locations/ global/catalogs/default_catalog

  • google_cloud_retail_v2alpha_export_user_events_request_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaExportUserEventsRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
# File 'lib/google/apis/retail_v2alpha/service.rb', line 2760

def export_project_location_catalog_user_event(parent, google_cloud_retail_v2alpha_export_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+parent}/userEvents:export', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaExportUserEventsRequest::Representation
  command.request_object = google_cloud_retail_v2alpha_export_user_events_request_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2alpha::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

#get_project_alert_config(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAlertConfig

Get the AlertConfig of the requested project.

Parameters:

  • name (String)

    Required. Full AlertConfig resource name. Format: projects/project_number/ alertConfig

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



115
116
117
118
119
120
121
122
123
# File 'lib/google/apis/retail_v2alpha/service.rb', line 115

def get_project_alert_config(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2alpha/{+name}', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAlertConfig::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAlertConfig
  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_attributes_config(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAttributesConfig

Gets an AttributesConfig.

Parameters:

  • name (String)

    Required. Full AttributesConfig resource name. Format: projects/ project_number/locations/location_id/catalogs/catalog_id/attributesConfig

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



439
440
441
442
443
444
445
446
447
# File 'lib/google/apis/retail_v2alpha/service.rb', line 439

def get_project_location_catalog_attributes_config(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2alpha/{+name}', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAttributesConfig::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAttributesConfig
  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(name, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaBranch

Retrieves a Branch.

Parameters:

  • name (String)

    Required. The name of the branch to retrieve. Format: projects/*/locations/ global/catalogs/default_catalog/branches/some_branch_id. "default_branch" can be used as a special branch_id, it returns the default branch that has been set for the catalog.

  • view (String) (defaults to: nil)

    The view to apply to the returned Branch. Defaults to [Branch.BranchView.BASIC] if unspecified. See documentation of fields of Branch to find what fields are excluded from BASIC view.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



897
898
899
900
901
902
903
904
905
906
# File 'lib/google/apis/retail_v2alpha/service.rb', line 897

def get_project_location_catalog_branch(name, view: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2alpha/{+name}', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaBranch::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaBranch
  command.params['name'] = name unless name.nil?
  command.query['view'] = view unless view.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::RetailV2alpha::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.

Parameters:

  • name (String)

    The name of the operation resource.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



964
965
966
967
968
969
970
971
972
# File 'lib/google/apis/retail_v2alpha/service.rb', line 964

def get_project_location_catalog_branch_operation(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2alpha/{+name}', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2alpha::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_place_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::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.

Parameters:

  • name (String)

    The name of the operation resource.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



995
996
997
998
999
1000
1001
1002
1003
# File 'lib/google/apis/retail_v2alpha/service.rb', line 995

def get_project_location_catalog_branch_place_operation(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2alpha/{+name}', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2alpha::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::RetailV2alpha::GoogleCloudRetailV2alphaProduct

Gets a Product.

Parameters:

  • name (String)

    Required. Full resource name of Product, such as projects/*/locations/global/ catalogs/default_catalog/branches/default_branch/products/some_product_id. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested Product does not exist, a NOT_FOUND error is returned.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1213
1214
1215
1216
1217
1218
1219
1220
1221
# File 'lib/google/apis/retail_v2alpha/service.rb', line 1213

def get_project_location_catalog_branch_product(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2alpha/{+name}', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct
  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_completion_config(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCompletionConfig

Gets a CompletionConfig.

Parameters:

  • name (String)

    Required. Full CompletionConfig resource name. Format: projects/ project_number/locations/location_id/catalogs/catalog_id/completionConfig

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



470
471
472
473
474
475
476
477
478
# File 'lib/google/apis/retail_v2alpha/service.rb', line 470

def get_project_location_catalog_completion_config(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2alpha/{+name}', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCompletionConfig::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCompletionConfig
  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_control(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaControl

Gets a Control.

Parameters:

  • name (String)

    Required. The resource name of the Control to get. Format: projects/ project_number/locations/location_id/catalogs/catalog_id/controls/ control_id``

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1703
1704
1705
1706
1707
1708
1709
1710
1711
# File 'lib/google/apis/retail_v2alpha/service.rb', line 1703

def get_project_location_catalog_control(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2alpha/{+name}', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaControl::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaControl
  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::RetailV2alpha::GoogleCloudRetailV2alphaGetDefaultBranchResponse

Get which branch is currently default branch set by CatalogService. SetDefaultBranch method under a specified parent catalog.

Parameters:

  • catalog (String)

    The parent catalog resource name, such as projects/*/locations/global/ catalogs/default_catalog.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



502
503
504
505
506
507
508
509
510
# File 'lib/google/apis/retail_v2alpha/service.rb', line 502

def get_project_location_catalog_default_branch(catalog, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2alpha/{+catalog}:getDefaultBranch', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaGetDefaultBranchResponse::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaGetDefaultBranchResponse
  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_model(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaModel

Gets a model.

Parameters:

  • name (String)

    Required. The resource name of the Model to get. Format: projects/ project_number/locations/location_id/catalogs/catalog/models/model_id``

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1989
1990
1991
1992
1993
1994
1995
1996
1997
# File 'lib/google/apis/retail_v2alpha/service.rb', line 1989

def get_project_location_catalog_model(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2alpha/{+name}', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaModel::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaModel
  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_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::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.

Parameters:

  • name (String)

    The name of the operation resource.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2204
2205
2206
2207
2208
2209
2210
2211
2212
# File 'lib/google/apis/retail_v2alpha/service.rb', line 2204

def get_project_location_catalog_operation(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2alpha/{+name}', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2alpha::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_serving_config(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaServingConfig

Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.

Parameters:

  • name (String)

    Required. The resource name of the ServingConfig to get. Format: projects/ project_number/locations/location_id/catalogs/catalog_id/servingConfigs/ serving_config_id``

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2472
2473
2474
2475
2476
2477
2478
2479
2480
# File 'lib/google/apis/retail_v2alpha/service.rb', line 2472

def get_project_location_catalog_serving_config(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2alpha/{+name}', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaServingConfig::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaServingConfig
  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::RetailV2alpha::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.

Parameters:

  • name (String)

    The name of the operation resource.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2948
2949
2950
2951
2952
2953
2954
2955
2956
# File 'lib/google/apis/retail_v2alpha/service.rb', line 2948

def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2alpha/{+name}', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2alpha::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_logging_config(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaLoggingConfig

Gets the LoggingConfig of the requested project.

Parameters:

  • name (String)

    Required. Full LoggingConfig resource name. Format: projects/project_number/ loggingConfig

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



146
147
148
149
150
151
152
153
154
# File 'lib/google/apis/retail_v2alpha/service.rb', line 146

def get_project_logging_config(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2alpha/{+name}', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaLoggingConfig::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaLoggingConfig
  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_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::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.

Parameters:

  • name (String)

    The name of the operation resource.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



3019
3020
3021
3022
3023
3024
3025
3026
3027
# File 'lib/google/apis/retail_v2alpha/service.rb', line 3019

def get_project_operation(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2alpha/{+name}', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2alpha::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_retail_project(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProject

Gets the project. Throws NOT_FOUND if the project wasn't initialized for the Retail API service.

Parameters:

  • name (String)

    Required. Full resource name of the project. Format: projects/ project_number_or_id/retailProject

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



178
179
180
181
182
183
184
185
186
# File 'lib/google/apis/retail_v2alpha/service.rb', line 178

def get_project_retail_project(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2alpha/{+name}', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProject::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProject
  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_v2alpha_import_products_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleLongrunningOperation

Bulk import of multiple Products. Request processing may be synchronous. Non- existing items are created. Note that it is possible for a subset of the Products to be successfully updated.

Parameters:

  • parent (String)

    Required. projects/1234/locations/global/catalogs/default_catalog/branches/ default_branch If no updateMask is specified, requires products.create permission. If updateMask is specified, requires products.update permission.

  • google_cloud_retail_v2alpha_import_products_request_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaImportProductsRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
# File 'lib/google/apis/retail_v2alpha/service.rb', line 1248

def import_project_location_catalog_branch_product(parent, google_cloud_retail_v2alpha_import_products_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+parent}/products:import', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaImportProductsRequest::Representation
  command.request_object = google_cloud_retail_v2alpha_import_products_request_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2alpha::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_v2alpha_import_completion_data_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleLongrunningOperation

Bulk import of processed completion dataset. Request processing is asynchronous. Partial updating is not supported. The operation is successfully finished only after the imported suggestions are indexed successfully and ready for serving. The process takes hours. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters:

  • parent (String)

    Required. The catalog which the suggestions dataset belongs to. Format: projects/1234/locations/global/catalogs/default_catalog.

  • google_cloud_retail_v2alpha_import_completion_data_request_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaImportCompletionDataRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
# File 'lib/google/apis/retail_v2alpha/service.rb', line 1596

def import_project_location_catalog_completion_datum(parent, google_cloud_retail_v2alpha_import_completion_data_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+parent}/completionData:import', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaImportCompletionDataRequest::Representation
  command.request_object = google_cloud_retail_v2alpha_import_completion_data_request_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2alpha::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_v2alpha_import_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::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.

Parameters:

  • parent (String)

    Required. projects/1234/locations/global/catalogs/default_catalog

  • google_cloud_retail_v2alpha_import_user_events_request_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaImportUserEventsRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
# File 'lib/google/apis/retail_v2alpha/service.rb', line 2797

def import_project_location_catalog_user_event(parent, google_cloud_retail_v2alpha_import_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+parent}/userEvents:import', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaImportUserEventsRequest::Representation
  command.request_object = google_cloud_retail_v2alpha_import_user_events_request_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2alpha::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_enrolled_solutions(parent, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaListEnrolledSolutionsResponse

Lists all the retail API solutions the project has enrolled.

Parameters:

  • parent (String)

    Required. Full resource name of parent. Format: projects/ project_number_or_id``

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



209
210
211
212
213
214
215
216
217
# File 'lib/google/apis/retail_v2alpha/service.rb', line 209

def list_project_enrolled_solutions(parent, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2alpha/{+parent}:enrolledSolutions', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaListEnrolledSolutionsResponse::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaListEnrolledSolutionsResponse
  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, require_total_size: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaListProductsResponse

Gets a list of Products.

Parameters:

  • parent (String)

    Required. The parent branch resource name, such as projects/*/locations/ global/catalogs/default_catalog/branches/0. Use default_branch as the branch ID, to list products under the default branch. If the caller does not have permission to list Products under this branch, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned.

  • filter (String) (defaults to: nil)

    A filter to apply on the list results. Supported features: * List all the products under the parent branch if filter is unset. * List Product.Type. VARIANT Products sharing the same Product.Type.PRIMARY Product. For example: primary_product_id = "some_product_id" * List Products bundled in a Product. Type.COLLECTION Product. For example: collection_product_id = " some_product_id" * List Products with a partibular type. For example: type = "PRIMARY" type = "VARIANT" type = "COLLECTION" If the field is unrecognizable, an INVALID_ARGUMENT error is returned. If the specified Product.Type.PRIMARY Product or Product.Type.COLLECTION Product does not exist, a NOT_FOUND error is returned.

  • page_size (Fixnum) (defaults to: nil)

    Maximum number of Products to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned.

  • page_token (String) (defaults to: nil)

    A page token ListProductsResponse.next_page_token, received from a previous ProductService.ListProducts call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ProductService.ListProducts must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.

  • read_mask (String) (defaults to: nil)

    The fields of Product to return in the responses. If not set or empty, the following fields are returned: * Product.name * Product.id * Product.title * Product.uri * Product.images * Product.price_info * Product.brands If "*" is provided, all fields are returned. Product.name is always returned no matter what mask is set. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.

  • require_total_size (Boolean) (defaults to: nil)

    If true and page_token is empty, ListProductsResponse.total_size is set to the total count of matched items irrespective of pagination. Notice that setting this field to true affects the performance.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
# File 'lib/google/apis/retail_v2alpha/service.rb', line 1316

def list_project_location_catalog_branch_products(parent, filter: nil, page_size: nil, page_token: nil, read_mask: nil, require_total_size: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2alpha/{+parent}/products', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaListProductsResponse::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaListProductsResponse
  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['requireTotalSize'] = require_total_size unless require_total_size.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_branches(parent, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaListBranchesResponse

Lists all instances of Branch under the specified parent Catalog.

Parameters:

  • parent (String)

    Required. The parent catalog resource name.

  • view (String) (defaults to: nil)

    The view to apply to the returned Branch. Defaults to [Branch.BranchView.BASIC] if unspecified. See documentation of fields of Branch to find what fields are excluded from BASIC view.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



932
933
934
935
936
937
938
939
940
941
# File 'lib/google/apis/retail_v2alpha/service.rb', line 932

def list_project_location_catalog_branches(parent, view: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2alpha/{+parent}/branches', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaListBranchesResponse::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaListBranchesResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['view'] = view unless view.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_controls(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaListControlsResponse

Lists all Controls by their parent Catalog.

Parameters:

  • parent (String)

    Required. The catalog resource name. Format: projects/project_number/ locations/location_id/catalogs/catalog_id``

  • filter (String) (defaults to: nil)

    Optional. A filter to apply on the list results. Supported features: * List all the products under the parent branch if filter is unset. * List controls that are used in a single ServingConfig: 'serving_config = " boosted_home_page_cvr"'

  • page_size (Fixnum) (defaults to: nil)

    Optional. Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.

  • page_token (String) (defaults to: nil)

    Optional. A page token, received from a previous ListControls call. Provide this to retrieve the subsequent page.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
# File 'lib/google/apis/retail_v2alpha/service.rb', line 1745

def list_project_location_catalog_controls(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2alpha/{+parent}/controls', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaListControlsResponse::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaListControlsResponse
  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['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

Lists all MerchantCenterAccountLinks under the specified parent Catalog.

Parameters:

  • parent (String)

    Required. The parent Catalog of the resource. It must match this format: projects/PROJECT_NUMBER/locations/global/catalogs/CATALOG_ID``

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1888
1889
1890
1891
1892
1893
1894
1895
1896
# File 'lib/google/apis/retail_v2alpha/service.rb', line 1888

def (parent, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2alpha/{+parent}/merchantCenterAccountLinks', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaListMerchantCenterAccountLinksResponse::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaListMerchantCenterAccountLinksResponse
  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_models(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaListModelsResponse

Lists all the models linked to this event store.

Parameters:

  • parent (String)

    Required. The parent for which to list models. Format: projects/ project_number/locations/location_id/catalogs/catalog_id``

  • page_size (Fixnum) (defaults to: nil)

    Optional. Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.

  • page_token (String) (defaults to: nil)

    Optional. A page token, received from a previous ListModels call. Provide this to retrieve the subsequent page.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
# File 'lib/google/apis/retail_v2alpha/service.rb', line 2026

def list_project_location_catalog_models(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2alpha/{+parent}/models', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaListModelsResponse::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaListModelsResponse
  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_catalog_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleLongrunningListOperationsResponse

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.

Parameters:

  • name (String)

    The name of the operation's parent resource.

  • filter (String) (defaults to: nil)

    The standard list filter.

  • page_size (Fixnum) (defaults to: nil)

    The standard list page size.

  • page_token (String) (defaults to: nil)

    The standard list page token.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
# File 'lib/google/apis/retail_v2alpha/service.rb', line 2241

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, 'v2alpha/{+name}/operations', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningListOperationsResponse::Representation
  command.response_class = Google::Apis::RetailV2alpha::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_catalog_serving_configs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaListServingConfigsResponse

Lists all ServingConfigs linked to this catalog.

Parameters:

  • parent (String)

    Required. The catalog resource name. Format: projects/project_number/ locations/location_id/catalogs/catalog_id``

  • page_size (Fixnum) (defaults to: nil)

    Optional. Maximum number of results to return. If unspecified, defaults to 100. If a value greater than 100 is provided, at most 100 results are returned.

  • page_token (String) (defaults to: nil)

    Optional. A page token, received from a previous ListServingConfigs call. Provide this to retrieve the subsequent page.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
# File 'lib/google/apis/retail_v2alpha/service.rb', line 2509

def list_project_location_catalog_serving_configs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2alpha/{+parent}/servingConfigs', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaListServingConfigsResponse::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaListServingConfigsResponse
  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_catalogs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaListCatalogsResponse

Lists all the Catalogs associated with the project.

Parameters:

  • parent (String)

    Required. The account resource name with an associated location. If the caller does not have permission to list Catalogs under this location, regardless of whether or not this location exists, a PERMISSION_DENIED error is returned.

  • page_size (Fixnum) (defaults to: nil)

    Maximum number of Catalogs to return. If unspecified, defaults to 50. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT is returned.

  • page_token (String) (defaults to: nil)

    A page token ListCatalogsResponse.next_page_token, received from a previous CatalogService.ListCatalogs call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to CatalogService.ListCatalogs must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



544
545
546
547
548
549
550
551
552
553
554
# File 'lib/google/apis/retail_v2alpha/service.rb', line 544

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, 'v2alpha/{+parent}/catalogs', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaListCatalogsResponse::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaListCatalogsResponse
  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::RetailV2alpha::GoogleLongrunningListOperationsResponse

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.

Parameters:

  • name (String)

    The name of the operation's parent resource.

  • filter (String) (defaults to: nil)

    The standard list filter.

  • page_size (Fixnum) (defaults to: nil)

    The standard list page size.

  • page_token (String) (defaults to: nil)

    The standard list page token.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
# File 'lib/google/apis/retail_v2alpha/service.rb', line 2985

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, 'v2alpha/{+name}/operations', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningListOperationsResponse::Representation
  command.response_class = Google::Apis::RetailV2alpha::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_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleLongrunningListOperationsResponse

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.

Parameters:

  • name (String)

    The name of the operation's parent resource.

  • filter (String) (defaults to: nil)

    The standard list filter.

  • page_size (Fixnum) (defaults to: nil)

    The standard list page size.

  • page_token (String) (defaults to: nil)

    The standard list page token.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
# File 'lib/google/apis/retail_v2alpha/service.rb', line 3056

def list_project_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2alpha/{+name}/operations', options)
  command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningListOperationsResponse::Representation
  command.response_class = Google::Apis::RetailV2alpha::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_v2alpha_catalog_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCatalog

Updates the Catalogs.

Parameters:

  • name (String)

    Required. Immutable. The fully qualified resource name of the catalog.

  • google_cloud_retail_v2alpha_catalog_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCatalog) (defaults to: nil)
  • update_mask (String) (defaults to: nil)

    Indicates which fields in the provided Catalog to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



580
581
582
583
584
585
586
587
588
589
590
591
# File 'lib/google/apis/retail_v2alpha/service.rb', line 580

def patch_project_location_catalog(name, google_cloud_retail_v2alpha_catalog_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v2alpha/{+name}', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCatalog::Representation
  command.request_object = google_cloud_retail_v2alpha_catalog_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCatalog::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCatalog
  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_v2alpha_product_object = nil, allow_missing: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct

Updates a Product.

Parameters:

  • name (String)

    Immutable. Full resource name of the product, such as projects/*/locations/ global/catalogs/default_catalog/branches/default_branch/products/product_id.

  • google_cloud_retail_v2alpha_product_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct) (defaults to: nil)
  • allow_missing (Boolean) (defaults to: nil)

    If set to true, and the Product is not found, a new Product will be created. In this situation, update_mask is ignored.

  • update_mask (String) (defaults to: nil)

    Indicates which fields in the provided Product to update. The immutable and output only fields are NOT supported. If not set, all supported fields (the fields that are neither immutable nor output only) are updated. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned. The attribute key can be updated by setting the mask path as " attributes.$key_name". If a key name is present in the mask but not in the patching product from the request, this key will be deleted after the update.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
# File 'lib/google/apis/retail_v2alpha/service.rb', line 1364

def patch_project_location_catalog_branch_product(name, google_cloud_retail_v2alpha_product_object = nil, allow_missing: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v2alpha/{+name}', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct::Representation
  command.request_object = google_cloud_retail_v2alpha_product_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct
  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

#patch_project_location_catalog_control(name, google_cloud_retail_v2alpha_control_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaControl

Updates a Control. Control cannot be set to a different oneof field, if so an INVALID_ARGUMENT is returned. If the Control to update does not exist, a NOT_FOUND error is returned.

Parameters:

  • name (String)

    Immutable. Fully qualified name projects/*/locations/global/catalogs/*/ controls/*

  • google_cloud_retail_v2alpha_control_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaControl) (defaults to: nil)
  • update_mask (String) (defaults to: nil)

    Indicates which fields in the provided Control to update. The following are NOT supported: * Control.name If not set or empty, all supported fields are updated.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
# File 'lib/google/apis/retail_v2alpha/service.rb', line 1786

def patch_project_location_catalog_control(name, google_cloud_retail_v2alpha_control_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v2alpha/{+name}', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaControl::Representation
  command.request_object = google_cloud_retail_v2alpha_control_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaControl::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaControl
  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_model(name, google_cloud_retail_v2alpha_model_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaModel

Update of model metadata. Only fields that currently can be updated are: filtering_option and periodic_tuning_state. If other values are provided, this API method ignores them.

Parameters:

  • name (String)

    Required. The fully qualified resource name of the model. Format: projects/ project_number/locations/location_id/catalogs/catalog_id/models/model_id catalog_id has char limit of 50. recommendation_model_id has char limit of 40.

  • google_cloud_retail_v2alpha_model_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaModel) (defaults to: nil)
  • update_mask (String) (defaults to: nil)

    Optional. Indicates which fields in the provided 'model' to update. If not set, by default updates all fields.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
# File 'lib/google/apis/retail_v2alpha/service.rb', line 2067

def patch_project_location_catalog_model(name, google_cloud_retail_v2alpha_model_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v2alpha/{+name}', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaModel::Representation
  command.request_object = google_cloud_retail_v2alpha_model_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaModel::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaModel
  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_serving_config(name, google_cloud_retail_v2alpha_serving_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaServingConfig

Updates a ServingConfig.

Parameters:

  • name (String)

    Immutable. Fully qualified name projects/*/locations/global/catalogs/*/ servingConfig/*

  • google_cloud_retail_v2alpha_serving_config_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaServingConfig) (defaults to: nil)
  • update_mask (String) (defaults to: nil)

    Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
# File 'lib/google/apis/retail_v2alpha/service.rb', line 2547

def patch_project_location_catalog_serving_config(name, google_cloud_retail_v2alpha_serving_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v2alpha/{+name}', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaServingConfig::Representation
  command.request_object = google_cloud_retail_v2alpha_serving_config_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaServingConfig::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaServingConfig
  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

#pause_project_location_catalog_model(name, google_cloud_retail_v2alpha_pause_model_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaModel

Pauses the training of an existing model.

Parameters:

  • name (String)

    Required. The name of the model to pause. Format: projects/project_number/ locations/location_id/catalogs/catalog_id/models/model_id``

  • google_cloud_retail_v2alpha_pause_model_request_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPauseModelRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
# File 'lib/google/apis/retail_v2alpha/service.rb', line 2102

def pause_project_location_catalog_model(name, google_cloud_retail_v2alpha_pause_model_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+name}:pause', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPauseModelRequest::Representation
  command.request_object = google_cloud_retail_v2alpha_pause_model_request_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaModel::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaModel
  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

#predict_project_location_catalog_placement(placement, google_cloud_retail_v2alpha_predict_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPredictResponse

Makes a recommendation prediction.

Parameters:

  • placement (String)

    Required. Full resource name of the format: placement=projects/*/locations/ global/catalogs/default_catalog/servingConfigs/* or placement=projects/*/ locations/global/catalogs/default_catalog/placements/*. We recommend using the servingConfigs resource. placements is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see Manage serving configs. The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/ catalogs/default_catalog/configs

  • google_cloud_retail_v2alpha_predict_request_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPredictRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
# File 'lib/google/apis/retail_v2alpha/service.rb', line 2284

def predict_project_location_catalog_placement(placement, google_cloud_retail_v2alpha_predict_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+placement}:predict', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPredictRequest::Representation
  command.request_object = google_cloud_retail_v2alpha_predict_request_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPredictResponse::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPredictResponse
  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

#predict_project_location_catalog_serving_config(placement, google_cloud_retail_v2alpha_predict_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPredictResponse

Makes a recommendation prediction.

Parameters:

  • placement (String)

    Required. Full resource name of the format: placement=projects/*/locations/ global/catalogs/default_catalog/servingConfigs/* or placement=projects/*/ locations/global/catalogs/default_catalog/placements/*. We recommend using the servingConfigs resource. placements is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see Manage serving configs. The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/ catalogs/default_catalog/configs

  • google_cloud_retail_v2alpha_predict_request_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPredictRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
# File 'lib/google/apis/retail_v2alpha/service.rb', line 2590

def predict_project_location_catalog_serving_config(placement, google_cloud_retail_v2alpha_predict_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+placement}:predict', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPredictRequest::Representation
  command.request_object = google_cloud_retail_v2alpha_predict_request_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPredictResponse::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPredictResponse
  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_branch_product(parent, google_cloud_retail_v2alpha_purge_products_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleLongrunningOperation

Permanently deletes all selected Products under a branch. This process is asynchronous. If the request is valid, the removal will be enqueued and processed offline. Depending on the number of Products, this operation could take hours to complete. Before the operation completes, some Products may still be returned by ProductService.GetProduct or ProductService.ListProducts. Depending on the number of Products, this operation could take hours to complete. To get a sample of Products that would be deleted, set PurgeProductsRequest.force to false.

Parameters:

  • parent (String)

    Required. The resource name of the branch under which the products are created. The format is projects/$projectId/locations/global/catalogs/$catalogId/ branches/$branchId``

  • google_cloud_retail_v2alpha_purge_products_request_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPurgeProductsRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
# File 'lib/google/apis/retail_v2alpha/service.rb', line 1408

def purge_project_location_catalog_branch_product(parent, google_cloud_retail_v2alpha_purge_products_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+parent}/products:purge', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPurgeProductsRequest::Representation
  command.request_object = google_cloud_retail_v2alpha_purge_products_request_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2alpha::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

#purge_project_location_catalog_user_event(parent, google_cloud_retail_v2alpha_purge_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::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.

Parameters:

  • parent (String)

    Required. The resource name of the catalog under which the events are created. The format is projects/$projectId/locations/global/catalogs/$catalogId``

  • google_cloud_retail_v2alpha_purge_user_events_request_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPurgeUserEventsRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
# File 'lib/google/apis/retail_v2alpha/service.rb', line 2834

def purge_project_location_catalog_user_event(parent, google_cloud_retail_v2alpha_purge_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+parent}/userEvents:purge', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPurgeUserEventsRequest::Representation
  command.request_object = google_cloud_retail_v2alpha_purge_user_events_request_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2alpha::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_v2alpha_rejoin_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleLongrunningOperation

Starts a user-event rejoin operation with latest product catalog. Events are not annotated with detailed product information for products that are missing from the catalog when the user event is ingested. These events are stored as unjoined events with limited usage on training and serving. You can use this method to start a join operation on specified events with the latest version of product catalog. You can also use this method to correct events joined with the wrong product catalog. A rejoin operation can take hours or days to complete.

Parameters:

  • parent (String)

    Required. The parent catalog resource name, such as projects/1234/locations/ global/catalogs/default_catalog.

  • google_cloud_retail_v2alpha_rejoin_user_events_request_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaRejoinUserEventsRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
# File 'lib/google/apis/retail_v2alpha/service.rb', line 2875

def rejoin_project_location_catalog_user_event(parent, google_cloud_retail_v2alpha_rejoin_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+parent}/userEvents:rejoin', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaRejoinUserEventsRequest::Representation
  command.request_object = google_cloud_retail_v2alpha_rejoin_user_events_request_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2alpha::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_attributes_config_catalog_attribute(attributes_config, google_cloud_retail_v2alpha_remove_catalog_attribute_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAttributesConfig

Removes the specified CatalogAttribute from the AttributesConfig. If the CatalogAttribute to remove does not exist, a NOT_FOUND error is returned.

Parameters:

  • attributes_config (String)

    Required. Full AttributesConfig resource name. Format: projects/ project_number/locations/location_id/catalogs/catalog_id/attributesConfig

  • google_cloud_retail_v2alpha_remove_catalog_attribute_request_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaRemoveCatalogAttributeRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



822
823
824
825
826
827
828
829
830
831
832
# File 'lib/google/apis/retail_v2alpha/service.rb', line 822

def remove_project_location_catalog_attributes_config_catalog_attribute(attributes_config, google_cloud_retail_v2alpha_remove_catalog_attribute_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+attributesConfig}:removeCatalogAttribute', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaRemoveCatalogAttributeRequest::Representation
  command.request_object = google_cloud_retail_v2alpha_remove_catalog_attribute_request_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAttributesConfig::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAttributesConfig
  command.params['attributesConfig'] = attributes_config unless attributes_config.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_v2alpha_remove_fulfillment_places_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleLongrunningOperation

We recommend that you use the ProductService.RemoveLocalInventories method instead of the ProductService.RemoveFulfillmentPlaces method. ProductService. RemoveLocalInventories achieves the same results but provides more fine- grained control over ingesting local inventory data. 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 ProductService.GetProduct or ProductService.ListProducts. The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards. If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete.

Parameters:

  • product (String)

    Required. Full resource name of Product, such as projects/*/locations/global/ catalogs/default_catalog/branches/default_branch/products/some_product_id. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

  • google_cloud_retail_v2alpha_remove_fulfillment_places_request_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaRemoveFulfillmentPlacesRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
# File 'lib/google/apis/retail_v2alpha/service.rb', line 1457

def remove_project_location_catalog_branch_product_fulfillment_places(product, google_cloud_retail_v2alpha_remove_fulfillment_places_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+product}:removeFulfillmentPlaces', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaRemoveFulfillmentPlacesRequest::Representation
  command.request_object = google_cloud_retail_v2alpha_remove_fulfillment_places_request_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2alpha::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

#remove_project_location_catalog_branch_product_local_inventories(product, google_cloud_retail_v2alpha_remove_local_inventories_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleLongrunningOperation

Remove local inventory information for a Product at a list of places at a removal timestamp. This process is asynchronous. If the request is valid, the removal will be enqueued and processed downstream. As a consequence, when a response is returned, removals are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. Local inventory information can only be removed using this method. ProductService. CreateProduct and ProductService.UpdateProduct has no effect on local inventories. The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards. If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete.

Parameters:

  • product (String)

    Required. Full resource name of Product, such as projects/*/locations/global/ catalogs/default_catalog/branches/default_branch/products/some_product_id. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

  • google_cloud_retail_v2alpha_remove_local_inventories_request_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaRemoveLocalInventoriesRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
# File 'lib/google/apis/retail_v2alpha/service.rb', line 1503

def remove_project_location_catalog_branch_product_local_inventories(product, google_cloud_retail_v2alpha_remove_local_inventories_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+product}:removeLocalInventories', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaRemoveLocalInventoriesRequest::Representation
  command.request_object = google_cloud_retail_v2alpha_remove_local_inventories_request_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2alpha::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

#remove_project_location_catalog_serving_config_control(serving_config, google_cloud_retail_v2alpha_remove_control_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaServingConfig

Disables a Control on the specified ServingConfig. The control is removed from the ServingConfig. Returns a NOT_FOUND error if the Control is not enabled for the ServingConfig.

Parameters:

  • serving_config (String)

    Required. The source ServingConfig resource name . Format: projects/ project_number/locations/location_id/catalogs/catalog_id/servingConfigs/ serving_config_id``

  • google_cloud_retail_v2alpha_remove_control_request_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaRemoveControlRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
# File 'lib/google/apis/retail_v2alpha/service.rb', line 2627

def remove_project_location_catalog_serving_config_control(serving_config, google_cloud_retail_v2alpha_remove_control_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+servingConfig}:removeControl', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaRemoveControlRequest::Representation
  command.request_object = google_cloud_retail_v2alpha_remove_control_request_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaServingConfig::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaServingConfig
  command.params['servingConfig'] = serving_config unless serving_config.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#replace_project_location_catalog_attributes_config_catalog_attribute(attributes_config, google_cloud_retail_v2alpha_replace_catalog_attribute_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAttributesConfig

Replaces the specified CatalogAttribute in the AttributesConfig by updating the catalog attribute with the same CatalogAttribute.key. If the CatalogAttribute to replace does not exist, a NOT_FOUND error is returned.

Parameters:

  • attributes_config (String)

    Required. Full AttributesConfig resource name. Format: projects/ project_number/locations/location_id/catalogs/catalog_id/attributesConfig

  • google_cloud_retail_v2alpha_replace_catalog_attribute_request_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaReplaceCatalogAttributeRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



858
859
860
861
862
863
864
865
866
867
868
# File 'lib/google/apis/retail_v2alpha/service.rb', line 858

def replace_project_location_catalog_attributes_config_catalog_attribute(attributes_config, google_cloud_retail_v2alpha_replace_catalog_attribute_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+attributesConfig}:replaceCatalogAttribute', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaReplaceCatalogAttributeRequest::Representation
  command.request_object = google_cloud_retail_v2alpha_replace_catalog_attribute_request_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAttributesConfig::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAttributesConfig
  command.params['attributesConfig'] = attributes_config unless attributes_config.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#resume_project_location_catalog_model(name, google_cloud_retail_v2alpha_resume_model_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaModel

Resumes the training of an existing model.

Parameters:

  • name (String)

    Required. The name of the model to resume. Format: projects/project_number/ locations/location_id/catalogs/catalog_id/models/model_id``

  • google_cloud_retail_v2alpha_resume_model_request_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaResumeModelRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
# File 'lib/google/apis/retail_v2alpha/service.rb', line 2136

def resume_project_location_catalog_model(name, google_cloud_retail_v2alpha_resume_model_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+name}:resume', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaResumeModelRequest::Representation
  command.request_object = google_cloud_retail_v2alpha_resume_model_request_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaModel::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaModel
  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

#search_project_location_catalog_placements(placement, google_cloud_retail_v2alpha_search_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchResponse

Performs a search. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters:

  • placement (String)

    Required. The resource name of the Retail Search serving config, such as projects/*/locations/global/catalogs/default_catalog/servingConfigs/ default_serving_config or the name of the legacy placement resource, such as projects/*/locations/global/catalogs/default_catalog/placements/default_search . This field is used to identify the serving config name and the set of models that are used to make the search.

  • google_cloud_retail_v2alpha_search_request_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
# File 'lib/google/apis/retail_v2alpha/service.rb', line 2324

def search_project_location_catalog_placements(placement, google_cloud_retail_v2alpha_search_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+placement}:search', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchRequest::Representation
  command.request_object = google_cloud_retail_v2alpha_search_request_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchResponse::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchResponse
  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

#search_project_location_catalog_serving_configs(placement, google_cloud_retail_v2alpha_search_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchResponse

Performs a search. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters:

  • placement (String)

    Required. The resource name of the Retail Search serving config, such as projects/*/locations/global/catalogs/default_catalog/servingConfigs/ default_serving_config or the name of the legacy placement resource, such as projects/*/locations/global/catalogs/default_catalog/placements/default_search . This field is used to identify the serving config name and the set of models that are used to make the search.

  • google_cloud_retail_v2alpha_search_request_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
# File 'lib/google/apis/retail_v2alpha/service.rb', line 2667

def search_project_location_catalog_serving_configs(placement, google_cloud_retail_v2alpha_search_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+placement}:search', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchRequest::Representation
  command.request_object = google_cloud_retail_v2alpha_search_request_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchResponse::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchResponse
  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_v2alpha_set_inventory_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::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 is enqueued and processed downstream. As a consequence, when a response is returned, updates are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. When inventory is updated with ProductService. CreateProduct and ProductService.UpdateProduct, the specified inventory field value(s) overwrite any existing value(s) while ignoring the last update time for this field. Furthermore, the last update times for the specified inventory fields are overwritten by the times of the ProductService.CreateProduct or ProductService.UpdateProduct request. If no inventory fields are set in CreateProductRequest.product, then any pre-existing inventory information for this product is used. If no inventory fields are set in SetInventoryRequest. set_mask, then any existing inventory information is preserved. Pre-existing inventory information can only be updated with ProductService.SetInventory, ProductService.AddFulfillmentPlaces, and ProductService. RemoveFulfillmentPlaces. The returned Operations is obsolete after one day, and the GetOperation API returns NOT_FOUND afterwards. If conflicting updates are issued, the Operations associated with the stale updates are not marked as done until they are obsolete.

Parameters:

  • name (String)

    Immutable. Full resource name of the product, such as projects/*/locations/ global/catalogs/default_catalog/branches/default_branch/products/product_id.

  • google_cloud_retail_v2alpha_set_inventory_request_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSetInventoryRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
# File 'lib/google/apis/retail_v2alpha/service.rb', line 1557

def set_project_location_catalog_branch_product_inventory(name, google_cloud_retail_v2alpha_set_inventory_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+name}:setInventory', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSetInventoryRequest::Representation
  command.request_object = google_cloud_retail_v2alpha_set_inventory_request_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2alpha::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_v2alpha_set_default_branch_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::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.

Parameters:

  • catalog (String)

    Full resource name of the catalog, such as projects/*/locations/global/ catalogs/default_catalog.

  • google_cloud_retail_v2alpha_set_default_branch_request_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSetDefaultBranchRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



632
633
634
635
636
637
638
639
640
641
642
# File 'lib/google/apis/retail_v2alpha/service.rb', line 632

def set_project_location_catalog_default_branch(catalog, google_cloud_retail_v2alpha_set_default_branch_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+catalog}:setDefaultBranch', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSetDefaultBranchRequest::Representation
  command.request_object = google_cloud_retail_v2alpha_set_default_branch_request_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleProtobufEmpty::Representation
  command.response_class = Google::Apis::RetailV2alpha::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

#tune_project_location_catalog_model(name, google_cloud_retail_v2alpha_tune_model_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleLongrunningOperation

Tunes an existing model.

Parameters:

  • name (String)

    Required. The resource name of the model to tune. Format: projects/ project_number/locations/location_id/catalogs/catalog_id/models/model_id

  • google_cloud_retail_v2alpha_tune_model_request_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaTuneModelRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
# File 'lib/google/apis/retail_v2alpha/service.rb', line 2171

def tune_project_location_catalog_model(name, google_cloud_retail_v2alpha_tune_model_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+name}:tune', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaTuneModelRequest::Representation
  command.request_object = google_cloud_retail_v2alpha_tune_model_request_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2alpha::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

#update_project_alert_config(name, google_cloud_retail_v2alpha_alert_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAlertConfig

Update the alert config of the requested project.

Parameters:

  • name (String)

    Required. Immutable. The name of the AlertConfig singleton resource. Format: projects/*/alertConfig

  • google_cloud_retail_v2alpha_alert_config_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAlertConfig) (defaults to: nil)
  • update_mask (String) (defaults to: nil)

    Indicates which fields in the provided AlertConfig to update. If not set, all supported fields are updated.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



244
245
246
247
248
249
250
251
252
253
254
255
# File 'lib/google/apis/retail_v2alpha/service.rb', line 244

def update_project_alert_config(name, google_cloud_retail_v2alpha_alert_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v2alpha/{+name}', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAlertConfig::Representation
  command.request_object = google_cloud_retail_v2alpha_alert_config_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAlertConfig::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAlertConfig
  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

#update_project_location_catalog_attributes_config(name, google_cloud_retail_v2alpha_attributes_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAttributesConfig

Updates the AttributesConfig. The catalog attributes in the request will be updated in the catalog, or inserted if they do not exist. Existing catalog attributes not included in the request will remain unchanged. Attributes that are assigned to products, but do not exist at the catalog level, are always included in the response. The product attribute is assigned default values for missing catalog attribute fields, e.g., searchable and dynamic facetable options.

Parameters:

  • name (String)

    Required. Immutable. The fully qualified resource name of the attribute config. Format: projects/*/locations/*/catalogs/*/attributesConfig

  • google_cloud_retail_v2alpha_attributes_config_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAttributesConfig) (defaults to: nil)
  • update_mask (String) (defaults to: nil)

    Indicates which fields in the provided AttributesConfig to update. The following is the only supported field: * AttributesConfig.catalog_attributes If not set, all supported fields are updated.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



676
677
678
679
680
681
682
683
684
685
686
687
# File 'lib/google/apis/retail_v2alpha/service.rb', line 676

def update_project_location_catalog_attributes_config(name, google_cloud_retail_v2alpha_attributes_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v2alpha/{+name}', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAttributesConfig::Representation
  command.request_object = google_cloud_retail_v2alpha_attributes_config_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAttributesConfig::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAttributesConfig
  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

#update_project_location_catalog_completion_config(name, google_cloud_retail_v2alpha_completion_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCompletionConfig

Updates the CompletionConfigs.

Parameters:

  • name (String)

    Required. Immutable. Fully qualified name projects/*/locations/*/catalogs/*/ completionConfig

  • google_cloud_retail_v2alpha_completion_config_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCompletionConfig) (defaults to: nil)
  • update_mask (String) (defaults to: nil)

    Indicates which fields in the provided CompletionConfig to update. The following are the only supported fields: * CompletionConfig.matching_order * CompletionConfig.max_suggestions * CompletionConfig.min_prefix_length * CompletionConfig.auto_learning If not set, all supported fields are updated.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



716
717
718
719
720
721
722
723
724
725
726
727
# File 'lib/google/apis/retail_v2alpha/service.rb', line 716

def update_project_location_catalog_completion_config(name, google_cloud_retail_v2alpha_completion_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v2alpha/{+name}', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCompletionConfig::Representation
  command.request_object = google_cloud_retail_v2alpha_completion_config_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCompletionConfig::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCompletionConfig
  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

#update_project_logging_config(name, google_cloud_retail_v2alpha_logging_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaLoggingConfig

Updates the LoggingConfig of the requested project.

Parameters:

  • name (String)

    Required. Immutable. The name of the LoggingConfig singleton resource. Format: projects/*/loggingConfig

  • google_cloud_retail_v2alpha_logging_config_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaLoggingConfig) (defaults to: nil)
  • update_mask (String) (defaults to: nil)

    Indicates which fields in the provided LoggingConfig to update. The following are the only supported fields: * LoggingConfig.default_log_generation_rule * LoggingConfig.service_log_generation_rules If not set, all supported fields are updated.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



284
285
286
287
288
289
290
291
292
293
294
295
# File 'lib/google/apis/retail_v2alpha/service.rb', line 284

def update_project_logging_config(name, google_cloud_retail_v2alpha_logging_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v2alpha/{+name}', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaLoggingConfig::Representation
  command.request_object = google_cloud_retail_v2alpha_logging_config_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaLoggingConfig::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaLoggingConfig
  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

#write_project_location_catalog_user_event(parent, google_cloud_retail_v2alpha_user_event_object = nil, write_async: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaUserEvent

Writes a single user event.

Parameters:

  • parent (String)

    Required. The parent catalog resource name, such as projects/1234/locations/ global/catalogs/default_catalog.

  • google_cloud_retail_v2alpha_user_event_object (Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaUserEvent) (defaults to: nil)
  • write_async (Boolean) (defaults to: nil)

    If set to true, the user event will be written asynchronously after validation, and the API will respond without waiting for the write. Therefore, silent failures can occur even if the API returns success. In case of silent failures, error messages can be found in Stackdriver logs.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
# File 'lib/google/apis/retail_v2alpha/service.rb', line 2914

def write_project_location_catalog_user_event(parent, google_cloud_retail_v2alpha_user_event_object = nil, write_async: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2alpha/{+parent}/userEvents:write', options)
  command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaUserEvent::Representation
  command.request_object = google_cloud_retail_v2alpha_user_event_object
  command.response_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaUserEvent::Representation
  command.response_class = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaUserEvent
  command.params['parent'] = parent unless parent.nil?
  command.query['writeAsync'] = write_async unless write_async.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end