lib/google/apis/retail_v2beta/service.rb in google-apis-retail_v2beta-0.88.0 vs lib/google/apis/retail_v2beta/service.rb in google-apis-retail_v2beta-0.89.0

- old
+ new

@@ -32,10 +32,12 @@ # Retail = Google::Apis::RetailV2beta # Alias the module # service = Retail::CloudRetailService.new # # @see https://cloud.google.com/recommendations class CloudRetailService < Google::Apis::Core::BaseService + DEFAULT_ENDPOINT_TEMPLATE = "https://retail.$UNIVERSE_DOMAIN$/" + # @return [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. attr_accessor :key @@ -43,11 +45,11 @@ # 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. attr_accessor :quota_user def initialize - super('https://retail.googleapis.com/', '', + super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-retail_v2beta', client_version: Google::Apis::RetailV2beta::GEM_VERSION) @batch_path = 'batch' end @@ -125,9 +127,45 @@ 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 + + # Exports analytics metrics. `Operation.response` is of type ` + # ExportAnalyticsMetricsResponse`. `Operation.metadata` is of type ` + # ExportMetadata`. + # @param [String] catalog + # Required. Full resource name of the parent catalog. Expected format: `projects/ + # */locations/*/catalogs/*` + # @param [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaExportAnalyticsMetricsRequest] google_cloud_retail_v2beta_export_analytics_metrics_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # 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. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RetailV2beta::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2beta::GoogleLongrunningOperation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def export_project_location_catalog_analytics_metrics(catalog, google_cloud_retail_v2beta_export_analytics_metrics_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2beta/{+catalog}:exportAnalyticsMetrics', options) + command.request_representation = Google::Apis::RetailV2beta::GoogleCloudRetailV2betaExportAnalyticsMetricsRequest::Representation + command.request_object = google_cloud_retail_v2beta_export_analytics_metrics_request_object + command.response_representation = Google::Apis::RetailV2beta::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::RetailV2beta::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