From d9da2031967ccb8443f9dfc50d91e59ff9469bf6 Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Thu, 24 Mar 2022 04:48:12 -0700 Subject: [PATCH] feat: Automated regeneration of retail v2 client (#8782) Auto-created at 2022-03-24 11:43:37 +0000 using the toys pull request generator. --- api_names_out.yaml | 4 + generated/google-apis-retail_v2/CHANGELOG.md | 4 + .../lib/google/apis/retail_v2/classes.rb | 32 +++--- .../lib/google/apis/retail_v2/gem_version.rb | 4 +- .../lib/google/apis/retail_v2/service.rb | 97 +++++++++++++++++-- 5 files changed, 114 insertions(+), 27 deletions(-) diff --git a/api_names_out.yaml b/api_names_out.yaml index 9f337b3ed2c..d7749f9ed9e 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -177017,6 +177017,10 @@ "/retail:v2/retail.projects.locations.catalogs.placements.predict/placement": placement "/retail:v2/retail.projects.locations.catalogs.placements.search": search_project_location_catalog_placements "/retail:v2/retail.projects.locations.catalogs.placements.search/placement": placement +"/retail:v2/retail.projects.locations.catalogs.servingConfigs.predict": predict_project_location_catalog_serving_config +"/retail:v2/retail.projects.locations.catalogs.servingConfigs.predict/placement": placement +"/retail:v2/retail.projects.locations.catalogs.servingConfigs.search": search_project_location_catalog_serving_configs +"/retail:v2/retail.projects.locations.catalogs.servingConfigs.search/placement": placement "/retail:v2/retail.projects.locations.catalogs.setDefaultBranch": set_project_location_catalog_default_branch "/retail:v2/retail.projects.locations.catalogs.setDefaultBranch/catalog": catalog "/retail:v2/retail.projects.locations.catalogs.userEvents.collect": collect_project_location_catalog_user_event diff --git a/generated/google-apis-retail_v2/CHANGELOG.md b/generated/google-apis-retail_v2/CHANGELOG.md index 033f879a459..25254455174 100644 --- a/generated/google-apis-retail_v2/CHANGELOG.md +++ b/generated/google-apis-retail_v2/CHANGELOG.md @@ -1,5 +1,9 @@ # Release history for google-apis-retail_v2 +### v0.32.0 (2022-03-24) + +* Regenerated from discovery document revision 20220319 + ### v0.31.0 (2022-03-16) * Regenerated from discovery document revision 20220310 diff --git a/generated/google-apis-retail_v2/lib/google/apis/retail_v2/classes.rb b/generated/google-apis-retail_v2/lib/google/apis/retail_v2/classes.rb index f0fef5b103a..af186bba673 100644 --- a/generated/google-apis-retail_v2/lib/google/apis/retail_v2/classes.rb +++ b/generated/google-apis-retail_v2/lib/google/apis/retail_v2/classes.rb @@ -416,7 +416,9 @@ class GoogleCloudRetailV2BigQuerySource # analytics/answer/3437719. * `user_event_ga4`: This feature is in private # preview. Please contact the support team for importing Google Analytics 4 # events. The schema is available here: https://support.google.com/analytics/ - # answer/7029846. + # answer/7029846. Supported values for auto-completion imports: * `suggestions` ( + # default): One JSON completion suggestion per line. * `denylist`: One JSON deny + # suggestion per line. * `allowlist`: One JSON allow suggestion per line. # Corresponds to the JSON property `dataSchema` # @return [String] attr_accessor :data_schema @@ -552,9 +554,9 @@ def update!(**args) class GoogleCloudRetailV2CompleteQueryResponse include Google::Apis::Core::Hashable - # A unique complete token. This should be included in the SearchRequest - # resulting from this completion, which enables accurate attribution of complete - # model performance. + # A unique complete token. This should be included in the UserEvent. + # completion_detail for search events resulting from this completion, which + # enables accurate attribution of complete model performance. # Corresponds to the JSON property `attributionToken` # @return [String] attr_accessor :attribution_token @@ -594,7 +596,9 @@ def update!(**args) class GoogleCloudRetailV2CompleteQueryResponseCompletionResult include Google::Apis::Core::Hashable - # Additional custom attributes ingested through BigQuery. + # Custom attributes for the suggestion term. * For "user-data", the attributes + # are additional custom attributes ingested through BigQuery. * For "cloud- + # retail", the attributes are product attributes generated by Cloud Retail. # Corresponds to the JSON property `attributes` # @return [Hash] attr_accessor :attributes @@ -980,8 +984,7 @@ class GoogleCloudRetailV2ImportMetadata # @return [String] attr_accessor :notification_pubsub_topic - # Id of the request / operation. This is parroting back the requestId that was - # passed in the request. + # Deprecated. This field is never set. # Corresponds to the JSON property `requestId` # @return [String] attr_accessor :request_id @@ -1041,11 +1044,7 @@ class GoogleCloudRetailV2ImportProductsRequest # @return [String] attr_accessor :reconciliation_mode - # Unique identifier provided by client, within the ancestor dataset scope. - # Ensures idempotency and used for request deduplication. Server-generated if - # unspecified. Up to 128 characters long and must match the pattern: `[a-zA-Z0- - # 9_]+`. This is returned as Operation.name in ImportMetadata. Only supported - # when ImportProductsRequest.reconciliation_mode is set to `FULL`. + # Deprecated. This field has no effect. # Corresponds to the JSON property `requestId` # @return [String] attr_accessor :request_id @@ -3744,8 +3743,7 @@ class GoogleCloudRetailV2alphaImportMetadata # @return [String] attr_accessor :notification_pubsub_topic - # Id of the request / operation. This is parroting back the requestId that was - # passed in the request. + # Deprecated. This field is never set. # Corresponds to the JSON property `requestId` # @return [String] attr_accessor :request_id @@ -4282,8 +4280,7 @@ class GoogleCloudRetailV2betaImportMetadata # @return [String] attr_accessor :notification_pubsub_topic - # Id of the request / operation. This is parroting back the requestId that was - # passed in the request. + # Deprecated. This field is never set. # Corresponds to the JSON property `requestId` # @return [String] attr_accessor :request_id @@ -4617,8 +4614,7 @@ def update!(**args) # A generic empty message that you can re-use to avoid defining duplicated empty # messages in your APIs. A typical example is to use it as the request or the # response type of an API method. For instance: service Foo ` rpc Bar(google. - # protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for - # `Empty` is empty JSON object ````. + # protobuf.Empty) returns (google.protobuf.Empty); ` class GoogleProtobufEmpty include Google::Apis::Core::Hashable diff --git a/generated/google-apis-retail_v2/lib/google/apis/retail_v2/gem_version.rb b/generated/google-apis-retail_v2/lib/google/apis/retail_v2/gem_version.rb index 56378c4a68a..f44450de648 100644 --- a/generated/google-apis-retail_v2/lib/google/apis/retail_v2/gem_version.rb +++ b/generated/google-apis-retail_v2/lib/google/apis/retail_v2/gem_version.rb @@ -16,13 +16,13 @@ module Google module Apis module RetailV2 # Version of the google-apis-retail_v2 gem - GEM_VERSION = "0.31.0" + GEM_VERSION = "0.32.0" # Version of the code generator used to generate this client GENERATOR_VERSION = "0.4.1" # Revision of the discovery document this client was generated from - REVISION = "20220310" + REVISION = "20220319" end end end diff --git a/generated/google-apis-retail_v2/lib/google/apis/retail_v2/service.rb b/generated/google-apis-retail_v2/lib/google/apis/retail_v2/service.rb index 4cd28c4fab4..04c7ed0c8ba 100644 --- a/generated/google-apis-retail_v2/lib/google/apis/retail_v2/service.rb +++ b/generated/google-apis-retail_v2/lib/google/apis/retail_v2/service.rb @@ -723,9 +723,11 @@ def set_project_location_catalog_branch_product_inventory(name, google_cloud_ret execute_or_queue_command(command, &block) end - # Bulk import of processed completion dataset. Request processing may be - # synchronous. Partial updating is not supported. This feature is only available - # for users who have Retail Search enabled. Please submit a form [here](https:// + # 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. Please submit a form [here](https:// # cloud.google.com/contact) to contact cloud sales if you are interested in # using Retail Search. # @param [String] parent @@ -841,7 +843,8 @@ def list_project_location_catalog_operations(name, filter: nil, page_size: nil, # Makes a recommendation prediction. # @param [String] placement # Required. Full resource name of the format: `name=projects/*/locations/global/ - # catalogs/default_catalog/placements/*` The ID of the Recommendations AI + # catalogs/default_catalog/placements/*` or `name=projects/*/locations/global/ + # catalogs/default_catalog/servingConfigs/*` The ID of the Recommendations AI # placement. Before you can request predictions from your model, you must create # at least one placement for it. For more information, see [Managing placements]( # https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). @@ -882,9 +885,10 @@ def predict_project_location_catalog_placement(placement, google_cloud_retail_v2 # to contact cloud sales if you are interested in using Retail Search. # @param [String] placement # Required. The resource name of the search engine placement, such as `projects/* - # /locations/global/catalogs/default_catalog/placements/default_search`. This - # field is used to identify the serving configuration name and the set of models - # that will be used to make the search. + # /locations/global/catalogs/default_catalog/placements/default_search` or ` + # projects/*/locations/global/catalogs/default_catalog/servingConfigs/ + # default_serving_config` This field is used to identify the serving + # configuration name and the set of models that will be used to make the search. # @param [Google::Apis::RetailV2::GoogleCloudRetailV2SearchRequest] google_cloud_retail_v2_search_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. @@ -915,6 +919,85 @@ def search_project_location_catalog_placements(placement, google_cloud_retail_v2 execute_or_queue_command(command, &block) end + # Makes a recommendation prediction. + # @param [String] placement + # Required. Full resource name of the format: `name=projects/*/locations/global/ + # catalogs/default_catalog/placements/*` or `name=projects/*/locations/global/ + # catalogs/default_catalog/servingConfigs/*` The ID of the Recommendations AI + # placement. Before you can request predictions from your model, you must create + # at least one placement for it. For more information, see [Managing placements]( + # https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). + # The full list of available placements can be seen at https://console.cloud. + # google.com/recommendation/catalogs/default_catalog/placements + # @param [Google::Apis::RetailV2::GoogleCloudRetailV2PredictRequest] google_cloud_retail_v2_predict_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::RetailV2::GoogleCloudRetailV2PredictResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2PredictResponse] + # + # @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 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 + + # Performs a search. This feature is only available for users who have Retail + # Search enabled. Please submit a form [here](https://cloud.google.com/contact) + # to contact cloud sales if you are interested in using Retail Search. + # @param [String] placement + # Required. The resource name of the search engine placement, such as `projects/* + # /locations/global/catalogs/default_catalog/placements/default_search` or ` + # projects/*/locations/global/catalogs/default_catalog/servingConfigs/ + # default_serving_config` This field is used to identify the serving + # configuration name and the set of models that will be used to make the search. + # @param [Google::Apis::RetailV2::GoogleCloudRetailV2SearchRequest] google_cloud_retail_v2_search_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::RetailV2::GoogleCloudRetailV2SearchResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2SearchResponse] + # + # @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 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 + # 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