Class: Google::Apis::RetailV2::CloudRetailService

Inherits:
Core::BaseService
  • Object
show all
Defined in:
lib/google/apis/retail_v2/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_v2'

Retail = Google::Apis::RetailV2 # 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_v2/service.rb', line 50

def initialize
  super(DEFAULT_ENDPOINT_TEMPLATE, '',
        client_name: 'google-apis-retail_v2',
        client_version: Google::Apis::RetailV2::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_v2/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_v2/service.rb', line 48

def quota_user
  @quota_user
end

Instance Method Details

#add_project_location_catalog_attributes_config_catalog_attribute(attributes_config, google_cloud_retail_v2_add_catalog_attribute_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2AttributesConfig

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_v2_add_catalog_attribute_request_object (Google::Apis::RetailV2::GoogleCloudRetailV2AddCatalogAttributeRequest) (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



623
624
625
626
627
628
629
630
631
632
633
# File 'lib/google/apis/retail_v2/service.rb', line 623

def add_project_location_catalog_attributes_config_catalog_attribute(attributes_config, google_cloud_retail_v2_add_catalog_attribute_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+attributesConfig}:addCatalogAttribute', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2AddCatalogAttributeRequest::Representation
  command.request_object = google_cloud_retail_v2_add_catalog_attribute_request_object
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2AttributesConfig::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2AttributesConfig
  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_v2_add_fulfillment_places_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::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_v2_add_fulfillment_places_request_object (Google::Apis::RetailV2::GoogleCloudRetailV2AddFulfillmentPlacesRequest) (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



773
774
775
776
777
778
779
780
781
782
783
# File 'lib/google/apis/retail_v2/service.rb', line 773

def add_project_location_catalog_branch_product_fulfillment_places(product, google_cloud_retail_v2_add_fulfillment_places_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+product}:addFulfillmentPlaces', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2AddFulfillmentPlacesRequest::Representation
  command.request_object = google_cloud_retail_v2_add_fulfillment_places_request_object
  command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation
  command.params['product'] = product unless product.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#add_project_location_catalog_branch_product_local_inventories(product, google_cloud_retail_v2_add_local_inventories_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::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_v2_add_local_inventories_request_object (Google::Apis::RetailV2::GoogleCloudRetailV2AddLocalInventoriesRequest) (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



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

def add_project_location_catalog_branch_product_local_inventories(product, google_cloud_retail_v2_add_local_inventories_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+product}:addLocalInventories', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2AddLocalInventoriesRequest::Representation
  command.request_object = google_cloud_retail_v2_add_local_inventories_request_object
  command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation
  command.params['product'] = product unless product.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#add_project_location_catalog_serving_config_control(serving_config, google_cloud_retail_v2_add_control_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig

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_v2_add_control_request_object (Google::Apis::RetailV2::GoogleCloudRetailV2AddControlRequest) (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



2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
# File 'lib/google/apis/retail_v2/service.rb', line 2050

def add_project_location_catalog_serving_config_control(serving_config, google_cloud_retail_v2_add_control_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+servingConfig}:addControl', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2AddControlRequest::Representation
  command.request_object = google_cloud_retail_v2_add_control_request_object
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig
  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_generative_question_update(parent, google_cloud_retail_v2_batch_update_generative_question_configs_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsResponse

Allows management of multiple questions.

Parameters:

  • parent (String)

    Optional. Resource name of the parent catalog. Format: projects/project/ locations/location/catalogs/catalog

  • google_cloud_retail_v2_batch_update_generative_question_configs_request_object (Google::Apis::RetailV2::GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsRequest) (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



1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
# File 'lib/google/apis/retail_v2/service.rb', line 1541

def batch_project_location_catalog_generative_question_update(parent, google_cloud_retail_v2_batch_update_generative_question_configs_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+parent}/generativeQuestion:batchUpdate', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsRequest::Representation
  command.request_object = google_cloud_retail_v2_batch_update_generative_question_configs_request_object
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsResponse::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsResponse
  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

#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::RetailV2::GoogleApiHttpBody

Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a 3rd party domain. This method is used only by the Retail API JavaScript pixel and Google Tag Manager. Users should not call this method directly.

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



2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
# File 'lib/google/apis/retail_v2/service.rb', line 2408

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, 'v2/{+parent}/userEvents:collect', options)
  command.response_representation = Google::Apis::RetailV2::GoogleApiHttpBody::Representation
  command.response_class = Google::Apis::RetailV2::GoogleApiHttpBody
  command.params['parent'] = parent unless parent.nil?
  command.query['ets'] = ets unless ets.nil?
  command.query['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::RetailV2::GoogleCloudRetailV2CompleteQueryResponse

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



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# File 'lib/google/apis/retail_v2/service.rb', line 124

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, 'v2/{+catalog}:completeQuery', options)
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2CompleteQueryResponse::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2CompleteQueryResponse
  command.params['catalog'] = catalog unless catalog.nil?
  command.query['dataset'] = dataset unless dataset.nil?
  command.query['deviceType'] = device_type unless device_type.nil?
  command.query['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_v2_product_object = nil, product_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2Product

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_v2_product_object (Google::Apis::RetailV2::GoogleCloudRetailV2Product) (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



863
864
865
866
867
868
869
870
871
872
873
874
# File 'lib/google/apis/retail_v2/service.rb', line 863

def create_project_location_catalog_branch_product(parent, google_cloud_retail_v2_product_object = nil, product_id: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+parent}/products', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Product::Representation
  command.request_object = google_cloud_retail_v2_product_object
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Product::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2Product
  command.params['parent'] = parent unless parent.nil?
  command.query['productId'] = product_id unless product_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#create_project_location_catalog_control(parent, google_cloud_retail_v2_control_object = nil, control_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2Control

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_v2_control_object (Google::Apis::RetailV2::GoogleCloudRetailV2Control) (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



1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
# File 'lib/google/apis/retail_v2/service.rb', line 1355

def create_project_location_catalog_control(parent, google_cloud_retail_v2_control_object = nil, control_id: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+parent}/controls', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Control::Representation
  command.request_object = google_cloud_retail_v2_control_object
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Control::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2Control
  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

#create_project_location_catalog_model(parent, google_cloud_retail_v2_model_object = nil, dry_run: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::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_v2_model_object (Google::Apis::RetailV2::GoogleCloudRetailV2Model) (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



1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
# File 'lib/google/apis/retail_v2/service.rb', line 1609

def create_project_location_catalog_model(parent, google_cloud_retail_v2_model_object = nil, dry_run: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+parent}/models', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Model::Representation
  command.request_object = google_cloud_retail_v2_model_object
  command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation
  command.params['parent'] = parent unless parent.nil?
  command.query['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_v2_serving_config_object = nil, serving_config_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig

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_v2_serving_config_object (Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig) (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



2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
# File 'lib/google/apis/retail_v2/service.rb', line 2089

def create_project_location_catalog_serving_config(parent, google_cloud_retail_v2_serving_config_object = nil, serving_config_id: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+parent}/servingConfigs', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig::Representation
  command.request_object = google_cloud_retail_v2_serving_config_object
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig
  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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::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.

  • 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



904
905
906
907
908
909
910
911
912
# File 'lib/google/apis/retail_v2/service.rb', line 904

def delete_project_location_catalog_branch_product(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v2/{+name}', options)
  command.response_representation = Google::Apis::RetailV2::GoogleProtobufEmpty::Representation
  command.response_class = Google::Apis::RetailV2::GoogleProtobufEmpty
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_project_location_catalog_control(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::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



1391
1392
1393
1394
1395
1396
1397
1398
1399
# File 'lib/google/apis/retail_v2/service.rb', line 1391

def delete_project_location_catalog_control(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v2/{+name}', options)
  command.response_representation = Google::Apis::RetailV2::GoogleProtobufEmpty::Representation
  command.response_class = Google::Apis::RetailV2::GoogleProtobufEmpty
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_project_location_catalog_model(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::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



1644
1645
1646
1647
1648
1649
1650
1651
1652
# File 'lib/google/apis/retail_v2/service.rb', line 1644

def delete_project_location_catalog_model(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v2/{+name}', options)
  command.response_representation = Google::Apis::RetailV2::GoogleProtobufEmpty::Representation
  command.response_class = Google::Apis::RetailV2::GoogleProtobufEmpty
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_project_location_catalog_serving_config(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::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



2125
2126
2127
2128
2129
2130
2131
2132
2133
# File 'lib/google/apis/retail_v2/service.rb', line 2125

def delete_project_location_catalog_serving_config(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v2/{+name}', options)
  command.response_representation = Google::Apis::RetailV2::GoogleProtobufEmpty::Representation
  command.response_class = Google::Apis::RetailV2::GoogleProtobufEmpty
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#export_project_location_catalog_analytics_metrics(catalog, google_cloud_retail_v2_export_analytics_metrics_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::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_v2_export_analytics_metrics_request_object (Google::Apis::RetailV2::GoogleCloudRetailV2ExportAnalyticsMetricsRequest) (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



166
167
168
169
170
171
172
173
174
175
176
# File 'lib/google/apis/retail_v2/service.rb', line 166

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

#get_project_location_catalog_attributes_config(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2AttributesConfig

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



199
200
201
202
203
204
205
206
207
# File 'lib/google/apis/retail_v2/service.rb', line 199

def get_project_location_catalog_attributes_config(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2/{+name}', options)
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2AttributesConfig::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2AttributesConfig
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_project_location_catalog_branch_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningOperation

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

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



727
728
729
730
731
732
733
734
735
# File 'lib/google/apis/retail_v2/service.rb', line 727

def get_project_location_catalog_branch_operation(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2/{+name}', options)
  command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_project_location_catalog_branch_product(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2Product

Gets a Product.

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



938
939
940
941
942
943
944
945
946
# File 'lib/google/apis/retail_v2/service.rb', line 938

def get_project_location_catalog_branch_product(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2/{+name}', options)
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Product::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2Product
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_project_location_catalog_completion_config(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2CompletionConfig

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



230
231
232
233
234
235
236
237
238
# File 'lib/google/apis/retail_v2/service.rb', line 230

def get_project_location_catalog_completion_config(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2/{+name}', options)
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2CompletionConfig::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2CompletionConfig
  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::RetailV2::GoogleCloudRetailV2Control

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



1423
1424
1425
1426
1427
1428
1429
1430
1431
# File 'lib/google/apis/retail_v2/service.rb', line 1423

def get_project_location_catalog_control(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2/{+name}', options)
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Control::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2Control
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_project_location_catalog_default_branch(catalog, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2GetDefaultBranchResponse

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

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



262
263
264
265
266
267
268
269
270
# File 'lib/google/apis/retail_v2/service.rb', line 262

def get_project_location_catalog_default_branch(catalog, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2/{+catalog}:getDefaultBranch', options)
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2GetDefaultBranchResponse::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2GetDefaultBranchResponse
  command.params['catalog'] = catalog unless catalog.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_project_location_catalog_generative_question_feature(catalog, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2GenerativeQuestionsFeatureConfig

Manages overal generative question feature state -- enables toggling feature on and off.

Parameters:

  • catalog (String)

    Required. Resource name of the parent catalog. Format: projects/project/ locations/location/catalogs/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



294
295
296
297
298
299
300
301
302
# File 'lib/google/apis/retail_v2/service.rb', line 294

def get_project_location_catalog_generative_question_feature(catalog, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2/{+catalog}/generativeQuestionFeature', options)
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2GenerativeQuestionsFeatureConfig::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2GenerativeQuestionsFeatureConfig
  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::RetailV2::GoogleCloudRetailV2Model

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



1675
1676
1677
1678
1679
1680
1681
1682
1683
# File 'lib/google/apis/retail_v2/service.rb', line 1675

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

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

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



1890
1891
1892
1893
1894
1895
1896
1897
1898
# File 'lib/google/apis/retail_v2/service.rb', line 1890

def get_project_location_catalog_operation(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2/{+name}', options)
  command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_project_location_catalog_serving_config(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig

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



2158
2159
2160
2161
2162
2163
2164
2165
2166
# File 'lib/google/apis/retail_v2/service.rb', line 2158

def get_project_location_catalog_serving_config(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2/{+name}', options)
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_project_location_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningOperation

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

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



2599
2600
2601
2602
2603
2604
2605
2606
2607
# File 'lib/google/apis/retail_v2/service.rb', line 2599

def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2/{+name}', options)
  command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_project_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningOperation

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

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



2670
2671
2672
2673
2674
2675
2676
2677
2678
# File 'lib/google/apis/retail_v2/service.rb', line 2670

def get_project_operation(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2/{+name}', options)
  command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#import_project_location_catalog_branch_product(parent, google_cloud_retail_v2_import_products_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningOperation

Bulk import of multiple Products. Request processing may be synchronous. 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_v2_import_products_request_object (Google::Apis::RetailV2::GoogleCloudRetailV2ImportProductsRequest) (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



973
974
975
976
977
978
979
980
981
982
983
# File 'lib/google/apis/retail_v2/service.rb', line 973

def import_project_location_catalog_branch_product(parent, google_cloud_retail_v2_import_products_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+parent}/products:import', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ImportProductsRequest::Representation
  command.request_object = google_cloud_retail_v2_import_products_request_object
  command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation
  command.params['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#import_project_location_catalog_completion_datum(parent, google_cloud_retail_v2_import_completion_data_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningOperation

Bulk import of processed completion dataset. Request processing 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_v2_import_completion_data_request_object (Google::Apis::RetailV2::GoogleCloudRetailV2ImportCompletionDataRequest) (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



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

def import_project_location_catalog_completion_datum(parent, google_cloud_retail_v2_import_completion_data_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+parent}/completionData:import', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ImportCompletionDataRequest::Representation
  command.request_object = google_cloud_retail_v2_import_completion_data_request_object
  command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation
  command.params['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#import_project_location_catalog_user_event(parent, google_cloud_retail_v2_import_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningOperation

Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation. metadata is of type ImportMetadata.

Parameters:

  • parent (String)

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

  • google_cloud_retail_v2_import_user_events_request_object (Google::Apis::RetailV2::GoogleCloudRetailV2ImportUserEventsRequest) (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



2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
# File 'lib/google/apis/retail_v2/service.rb', line 2448

def import_project_location_catalog_user_event(parent, google_cloud_retail_v2_import_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+parent}/userEvents:import', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ImportUserEventsRequest::Representation
  command.request_object = google_cloud_retail_v2_import_user_events_request_object
  command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation
  command.params['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_project_location_catalog_branch_products(parent, filter: nil, page_size: nil, page_token: nil, read_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2ListProductsResponse

Gets a list of Products.

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.

  • 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



1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
# File 'lib/google/apis/retail_v2/service.rb', line 1037

def list_project_location_catalog_branch_products(parent, filter: nil, page_size: nil, page_token: nil, read_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2/{+parent}/products', options)
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ListProductsResponse::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2ListProductsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['readMask'] = read_mask unless read_mask.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_project_location_catalog_controls(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2ListControlsResponse

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



1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
# File 'lib/google/apis/retail_v2/service.rb', line 1465

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, 'v2/{+parent}/controls', options)
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ListControlsResponse::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2ListControlsResponse
  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

#list_project_location_catalog_generative_questions(parent, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2ListGenerativeQuestionConfigsResponse

Returns all questions for a given catalog.

Parameters:

  • parent (String)

    Required. Resource name of the parent catalog. Format: projects/project/ locations/location/catalogs/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



1574
1575
1576
1577
1578
1579
1580
1581
1582
# File 'lib/google/apis/retail_v2/service.rb', line 1574

def list_project_location_catalog_generative_questions(parent, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2/{+parent}/generativeQuestions', options)
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ListGenerativeQuestionConfigsResponse::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2ListGenerativeQuestionConfigsResponse
  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::RetailV2::GoogleCloudRetailV2ListModelsResponse

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



1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
# File 'lib/google/apis/retail_v2/service.rb', line 1712

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, 'v2/{+parent}/models', options)
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ListModelsResponse::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2ListModelsResponse
  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::RetailV2::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



1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
# File 'lib/google/apis/retail_v2/service.rb', line 1927

def list_project_location_catalog_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2/{+name}/operations', options)
  command.response_representation = Google::Apis::RetailV2::GoogleLongrunningListOperationsResponse::Representation
  command.response_class = Google::Apis::RetailV2::GoogleLongrunningListOperationsResponse
  command.params['name'] = name unless name.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_project_location_catalog_serving_configs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2ListServingConfigsResponse

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



2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
# File 'lib/google/apis/retail_v2/service.rb', line 2195

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, 'v2/{+parent}/servingConfigs', options)
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ListServingConfigsResponse::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2ListServingConfigsResponse
  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::RetailV2::GoogleCloudRetailV2ListCatalogsResponse

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



336
337
338
339
340
341
342
343
344
345
346
# File 'lib/google/apis/retail_v2/service.rb', line 336

def list_project_location_catalogs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2/{+parent}/catalogs', options)
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ListCatalogsResponse::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2ListCatalogsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningListOperationsResponse

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

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



2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
# File 'lib/google/apis/retail_v2/service.rb', line 2636

def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v2/{+name}/operations', options)
  command.response_representation = Google::Apis::RetailV2::GoogleLongrunningListOperationsResponse::Representation
  command.response_class = Google::Apis::RetailV2::GoogleLongrunningListOperationsResponse
  command.params['name'] = name unless name.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_project_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningListOperationsResponse

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

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



2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
# File 'lib/google/apis/retail_v2/service.rb', line 2707

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, 'v2/{+name}/operations', options)
  command.response_representation = Google::Apis::RetailV2::GoogleLongrunningListOperationsResponse::Representation
  command.response_class = Google::Apis::RetailV2::GoogleLongrunningListOperationsResponse
  command.params['name'] = name unless name.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#patch_project_location_catalog(name, google_cloud_retail_v2_catalog_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2Catalog

Updates the Catalogs.

Parameters:

  • name (String)

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

  • google_cloud_retail_v2_catalog_object (Google::Apis::RetailV2::GoogleCloudRetailV2Catalog) (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



372
373
374
375
376
377
378
379
380
381
382
383
# File 'lib/google/apis/retail_v2/service.rb', line 372

def patch_project_location_catalog(name, google_cloud_retail_v2_catalog_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v2/{+name}', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Catalog::Representation
  command.request_object = google_cloud_retail_v2_catalog_object
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Catalog::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2Catalog
  command.params['name'] = name unless name.nil?
  command.query['updateMask'] = update_mask unless update_mask.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#patch_project_location_catalog_branch_product(name, google_cloud_retail_v2_product_object = nil, allow_missing: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2Product

Updates a Product.

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_v2_product_object (Google::Apis::RetailV2::GoogleCloudRetailV2Product) (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



1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
# File 'lib/google/apis/retail_v2/service.rb', line 1084

def patch_project_location_catalog_branch_product(name, google_cloud_retail_v2_product_object = nil, allow_missing: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v2/{+name}', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Product::Representation
  command.request_object = google_cloud_retail_v2_product_object
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Product::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2Product
  command.params['name'] = name unless name.nil?
  command.query['allowMissing'] = allow_missing unless allow_missing.nil?
  command.query['updateMask'] = update_mask unless update_mask.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#patch_project_location_catalog_control(name, google_cloud_retail_v2_control_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2Control

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_v2_control_object (Google::Apis::RetailV2::GoogleCloudRetailV2Control) (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



1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
# File 'lib/google/apis/retail_v2/service.rb', line 1506

def patch_project_location_catalog_control(name, google_cloud_retail_v2_control_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v2/{+name}', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Control::Representation
  command.request_object = google_cloud_retail_v2_control_object
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Control::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2Control
  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_v2_model_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2Model

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_v2_model_object (Google::Apis::RetailV2::GoogleCloudRetailV2Model) (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



1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
# File 'lib/google/apis/retail_v2/service.rb', line 1753

def patch_project_location_catalog_model(name, google_cloud_retail_v2_model_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v2/{+name}', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Model::Representation
  command.request_object = google_cloud_retail_v2_model_object
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Model::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2Model
  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_v2_serving_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig

Updates a ServingConfig.

Parameters:

  • name (String)

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

  • google_cloud_retail_v2_serving_config_object (Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig) (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



2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
# File 'lib/google/apis/retail_v2/service.rb', line 2233

def patch_project_location_catalog_serving_config(name, google_cloud_retail_v2_serving_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v2/{+name}', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig::Representation
  command.request_object = google_cloud_retail_v2_serving_config_object
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig
  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_v2_pause_model_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2Model

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_v2_pause_model_request_object (Google::Apis::RetailV2::GoogleCloudRetailV2PauseModelRequest) (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



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

def pause_project_location_catalog_model(name, google_cloud_retail_v2_pause_model_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+name}:pause', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2PauseModelRequest::Representation
  command.request_object = google_cloud_retail_v2_pause_model_request_object
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Model::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2Model
  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_v2_predict_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2PredictResponse

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_v2_predict_request_object (Google::Apis::RetailV2::GoogleCloudRetailV2PredictRequest) (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



1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
# File 'lib/google/apis/retail_v2/service.rb', line 1970

def predict_project_location_catalog_placement(placement, google_cloud_retail_v2_predict_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+placement}:predict', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2PredictRequest::Representation
  command.request_object = google_cloud_retail_v2_predict_request_object
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2PredictResponse::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2PredictResponse
  command.params['placement'] = placement unless placement.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#predict_project_location_catalog_serving_config(placement, google_cloud_retail_v2_predict_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2PredictResponse

Makes a recommendation prediction.

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_v2_predict_request_object (Google::Apis::RetailV2::GoogleCloudRetailV2PredictRequest) (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



2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
# File 'lib/google/apis/retail_v2/service.rb', line 2276

def predict_project_location_catalog_serving_config(placement, google_cloud_retail_v2_predict_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+placement}:predict', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2PredictRequest::Representation
  command.request_object = google_cloud_retail_v2_predict_request_object
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2PredictResponse::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2PredictResponse
  command.params['placement'] = placement unless placement.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#purge_project_location_catalog_branch_product(parent, google_cloud_retail_v2_purge_products_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::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_v2_purge_products_request_object (Google::Apis::RetailV2::GoogleCloudRetailV2PurgeProductsRequest) (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



1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
# File 'lib/google/apis/retail_v2/service.rb', line 1128

def purge_project_location_catalog_branch_product(parent, google_cloud_retail_v2_purge_products_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+parent}/products:purge', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2PurgeProductsRequest::Representation
  command.request_object = google_cloud_retail_v2_purge_products_request_object
  command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation
  command.params['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#purge_project_location_catalog_user_event(parent, google_cloud_retail_v2_purge_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningOperation

Deletes permanently all user events specified by the filter provided. Depending on the number of events specified by the filter, this operation could take hours or days to complete. To test a filter, use the list command first.

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_v2_purge_user_events_request_object (Google::Apis::RetailV2::GoogleCloudRetailV2PurgeUserEventsRequest) (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



2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
# File 'lib/google/apis/retail_v2/service.rb', line 2485

def purge_project_location_catalog_user_event(parent, google_cloud_retail_v2_purge_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+parent}/userEvents:purge', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2PurgeUserEventsRequest::Representation
  command.request_object = google_cloud_retail_v2_purge_user_events_request_object
  command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation
  command.params['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#rejoin_project_location_catalog_user_event(parent, google_cloud_retail_v2_rejoin_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningOperation

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_v2_rejoin_user_events_request_object (Google::Apis::RetailV2::GoogleCloudRetailV2RejoinUserEventsRequest) (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



2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
# File 'lib/google/apis/retail_v2/service.rb', line 2526

def rejoin_project_location_catalog_user_event(parent, google_cloud_retail_v2_rejoin_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+parent}/userEvents:rejoin', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2RejoinUserEventsRequest::Representation
  command.request_object = google_cloud_retail_v2_rejoin_user_events_request_object
  command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation
  command.params['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#remove_project_location_catalog_attributes_config_catalog_attribute(attributes_config, google_cloud_retail_v2_remove_catalog_attribute_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2AttributesConfig

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_v2_remove_catalog_attribute_request_object (Google::Apis::RetailV2::GoogleCloudRetailV2RemoveCatalogAttributeRequest) (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



658
659
660
661
662
663
664
665
666
667
668
# File 'lib/google/apis/retail_v2/service.rb', line 658

def remove_project_location_catalog_attributes_config_catalog_attribute(attributes_config, google_cloud_retail_v2_remove_catalog_attribute_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+attributesConfig}:removeCatalogAttribute', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2RemoveCatalogAttributeRequest::Representation
  command.request_object = google_cloud_retail_v2_remove_catalog_attribute_request_object
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2AttributesConfig::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2AttributesConfig
  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_v2_remove_fulfillment_places_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::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_v2_remove_fulfillment_places_request_object (Google::Apis::RetailV2::GoogleCloudRetailV2RemoveFulfillmentPlacesRequest) (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



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

def remove_project_location_catalog_branch_product_fulfillment_places(product, google_cloud_retail_v2_remove_fulfillment_places_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+product}:removeFulfillmentPlaces', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2RemoveFulfillmentPlacesRequest::Representation
  command.request_object = google_cloud_retail_v2_remove_fulfillment_places_request_object
  command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation
  command.params['product'] = product unless product.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#remove_project_location_catalog_branch_product_local_inventories(product, google_cloud_retail_v2_remove_local_inventories_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::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_v2_remove_local_inventories_request_object (Google::Apis::RetailV2::GoogleCloudRetailV2RemoveLocalInventoriesRequest) (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



1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
# File 'lib/google/apis/retail_v2/service.rb', line 1223

def remove_project_location_catalog_branch_product_local_inventories(product, google_cloud_retail_v2_remove_local_inventories_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+product}:removeLocalInventories', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2RemoveLocalInventoriesRequest::Representation
  command.request_object = google_cloud_retail_v2_remove_local_inventories_request_object
  command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation
  command.params['product'] = product unless product.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#remove_project_location_catalog_serving_config_control(serving_config, google_cloud_retail_v2_remove_control_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig

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_v2_remove_control_request_object (Google::Apis::RetailV2::GoogleCloudRetailV2RemoveControlRequest) (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



2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
# File 'lib/google/apis/retail_v2/service.rb', line 2313

def remove_project_location_catalog_serving_config_control(serving_config, google_cloud_retail_v2_remove_control_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+servingConfig}:removeControl', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2RemoveControlRequest::Representation
  command.request_object = google_cloud_retail_v2_remove_control_request_object
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig
  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_v2_replace_catalog_attribute_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2AttributesConfig

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_v2_replace_catalog_attribute_request_object (Google::Apis::RetailV2::GoogleCloudRetailV2ReplaceCatalogAttributeRequest) (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



694
695
696
697
698
699
700
701
702
703
704
# File 'lib/google/apis/retail_v2/service.rb', line 694

def replace_project_location_catalog_attributes_config_catalog_attribute(attributes_config, google_cloud_retail_v2_replace_catalog_attribute_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+attributesConfig}:replaceCatalogAttribute', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ReplaceCatalogAttributeRequest::Representation
  command.request_object = google_cloud_retail_v2_replace_catalog_attribute_request_object
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2AttributesConfig::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2AttributesConfig
  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_v2_resume_model_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2Model

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_v2_resume_model_request_object (Google::Apis::RetailV2::GoogleCloudRetailV2ResumeModelRequest) (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_v2/service.rb', line 1822

def resume_project_location_catalog_model(name, google_cloud_retail_v2_resume_model_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+name}:resume', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ResumeModelRequest::Representation
  command.request_object = google_cloud_retail_v2_resume_model_request_object
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Model::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2Model
  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_v2_search_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2SearchResponse

Performs a search. This feature is only available for users who have Retail Search enabled. 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_v2_search_request_object (Google::Apis::RetailV2::GoogleCloudRetailV2SearchRequest) (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



2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
# File 'lib/google/apis/retail_v2/service.rb', line 2010

def search_project_location_catalog_placements(placement, google_cloud_retail_v2_search_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+placement}:search', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2SearchRequest::Representation
  command.request_object = google_cloud_retail_v2_search_request_object
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2SearchResponse::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2SearchResponse
  command.params['placement'] = placement unless placement.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#search_project_location_catalog_serving_configs(placement, google_cloud_retail_v2_search_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2SearchResponse

Performs a search. This feature is only available for users who have Retail Search enabled. 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_v2_search_request_object (Google::Apis::RetailV2::GoogleCloudRetailV2SearchRequest) (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



2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
# File 'lib/google/apis/retail_v2/service.rb', line 2353

def search_project_location_catalog_serving_configs(placement, google_cloud_retail_v2_search_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+placement}:search', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2SearchRequest::Representation
  command.request_object = google_cloud_retail_v2_search_request_object
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2SearchResponse::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2SearchResponse
  command.params['placement'] = placement unless placement.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#set_project_location_catalog_branch_product_inventory(name, google_cloud_retail_v2_set_inventory_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningOperation

Updates inventory information for a Product while respecting the last update timestamps of each inventory field. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update 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_v2_set_inventory_request_object (Google::Apis::RetailV2::GoogleCloudRetailV2SetInventoryRequest) (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



1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
# File 'lib/google/apis/retail_v2/service.rb', line 1277

def set_project_location_catalog_branch_product_inventory(name, google_cloud_retail_v2_set_inventory_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+name}:setInventory', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2SetInventoryRequest::Representation
  command.request_object = google_cloud_retail_v2_set_inventory_request_object
  command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#set_project_location_catalog_default_branch(catalog, google_cloud_retail_v2_set_default_branch_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleProtobufEmpty

Set a specified branch id as default branch. API methods such as SearchService. Search, ProductService.GetProduct, ProductService.ListProducts will treat requests using "default_branch" to the actual branch id set as default. For example, if projects/*/locations/*/catalogs/*/branches/1 is set as default, setting SearchRequest.branch to projects/*/locations/*/catalogs/*/branches/ default_branch is equivalent to setting SearchRequest.branch to projects/*/ locations/*/catalogs/*/branches/1. Using multiple branches can be useful when developers would like to have a staging branch to test and verify for future usage. When it becomes ready, developers switch on the staging branch using this API while keeping using projects/*/locations/*/catalogs/*/branches/ default_branch as SearchRequest.branch to route the traffic to this staging branch. CAUTION: If you have live predict/search traffic, switching the default branch could potentially cause outages if the ID space of the new branch is very different from the old one. More specifically: * PredictionService will only return product IDs from branch newBranch. * SearchService will only return product IDs from branch newBranch (if branch is not explicitly set). * UserEventService will only join events with products from branch newBranch.

Parameters:

  • catalog (String)

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

  • google_cloud_retail_v2_set_default_branch_request_object (Google::Apis::RetailV2::GoogleCloudRetailV2SetDefaultBranchRequest) (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



424
425
426
427
428
429
430
431
432
433
434
# File 'lib/google/apis/retail_v2/service.rb', line 424

def set_project_location_catalog_default_branch(catalog, google_cloud_retail_v2_set_default_branch_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+catalog}:setDefaultBranch', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2SetDefaultBranchRequest::Representation
  command.request_object = google_cloud_retail_v2_set_default_branch_request_object
  command.response_representation = Google::Apis::RetailV2::GoogleProtobufEmpty::Representation
  command.response_class = Google::Apis::RetailV2::GoogleProtobufEmpty
  command.params['catalog'] = catalog unless catalog.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#tune_project_location_catalog_model(name, google_cloud_retail_v2_tune_model_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::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_v2_tune_model_request_object (Google::Apis::RetailV2::GoogleCloudRetailV2TuneModelRequest) (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



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

def tune_project_location_catalog_model(name, google_cloud_retail_v2_tune_model_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+name}:tune', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2TuneModelRequest::Representation
  command.request_object = google_cloud_retail_v2_tune_model_request_object
  command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#update_project_location_catalog_attributes_config(name, google_cloud_retail_v2_attributes_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2AttributesConfig

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_v2_attributes_config_object (Google::Apis::RetailV2::GoogleCloudRetailV2AttributesConfig) (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



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

def update_project_location_catalog_attributes_config(name, google_cloud_retail_v2_attributes_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v2/{+name}', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2AttributesConfig::Representation
  command.request_object = google_cloud_retail_v2_attributes_config_object
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2AttributesConfig::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2AttributesConfig
  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_v2_completion_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2CompletionConfig

Updates the CompletionConfigs.

Parameters:

  • name (String)

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

  • google_cloud_retail_v2_completion_config_object (Google::Apis::RetailV2::GoogleCloudRetailV2CompletionConfig) (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



508
509
510
511
512
513
514
515
516
517
518
519
# File 'lib/google/apis/retail_v2/service.rb', line 508

def update_project_location_catalog_completion_config(name, google_cloud_retail_v2_completion_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v2/{+name}', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2CompletionConfig::Representation
  command.request_object = google_cloud_retail_v2_completion_config_object
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2CompletionConfig::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2CompletionConfig
  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_generative_question(catalog, google_cloud_retail_v2_generative_question_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2GenerativeQuestionConfig

Allows management of individual questions.

Parameters:

  • catalog (String)

    Required. Resource name of the catalog. Format: projects/project/locations/ location/catalogs/catalog

  • google_cloud_retail_v2_generative_question_config_object (Google::Apis::RetailV2::GoogleCloudRetailV2GenerativeQuestionConfig) (defaults to: nil)
  • update_mask (String) (defaults to: nil)

    Optional. Indicates which fields in the provided GenerativeQuestionConfig to update. The following are NOT supported: * GenerativeQuestionConfig.frequency 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



547
548
549
550
551
552
553
554
555
556
557
558
# File 'lib/google/apis/retail_v2/service.rb', line 547

def update_project_location_catalog_generative_question(catalog, google_cloud_retail_v2_generative_question_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v2/{+catalog}/generativeQuestion', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2GenerativeQuestionConfig::Representation
  command.request_object = google_cloud_retail_v2_generative_question_config_object
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2GenerativeQuestionConfig::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2GenerativeQuestionConfig
  command.params['catalog'] = catalog unless catalog.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_generative_question_feature(catalog, google_cloud_retail_v2_generative_questions_feature_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2GenerativeQuestionsFeatureConfig

Manages overal generative question feature state -- enables toggling feature on and off.

Parameters:

  • catalog (String)

    Required. Resource name of the affected catalog. Format: projects/project/ locations/location/catalogs/catalog

  • google_cloud_retail_v2_generative_questions_feature_config_object (Google::Apis::RetailV2::GoogleCloudRetailV2GenerativeQuestionsFeatureConfig) (defaults to: nil)
  • update_mask (String) (defaults to: nil)

    Optional. Indicates which fields in the provided GenerativeQuestionsFeatureConfig to update. 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



587
588
589
590
591
592
593
594
595
596
597
598
# File 'lib/google/apis/retail_v2/service.rb', line 587

def update_project_location_catalog_generative_question_feature(catalog, google_cloud_retail_v2_generative_questions_feature_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v2/{+catalog}/generativeQuestionFeature', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2GenerativeQuestionsFeatureConfig::Representation
  command.request_object = google_cloud_retail_v2_generative_questions_feature_config_object
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2GenerativeQuestionsFeatureConfig::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2GenerativeQuestionsFeatureConfig
  command.params['catalog'] = catalog unless catalog.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_v2_user_event_object = nil, write_async: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2UserEvent

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_v2_user_event_object (Google::Apis::RetailV2::GoogleCloudRetailV2UserEvent) (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



2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
# File 'lib/google/apis/retail_v2/service.rb', line 2565

def write_project_location_catalog_user_event(parent, google_cloud_retail_v2_user_event_object = nil, write_async: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v2/{+parent}/userEvents:write', options)
  command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2UserEvent::Representation
  command.request_object = google_cloud_retail_v2_user_event_object
  command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2UserEvent::Representation
  command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2UserEvent
  command.params['parent'] = parent unless parent.nil?
  command.query['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