From fd2114166f279c0fc3015f0b6e661ace3a7f0e6b Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 29 Sep 2024 09:29:08 +0000 Subject: [PATCH] feat: Automated regeneration of retail v2 client --- api_names_out.yaml | 37 ++++ generated/google-apis-retail_v2/CHANGELOG.md | 4 + .../lib/google/apis/retail_v2/classes.rb | 177 ++++++++++++++++++ .../lib/google/apis/retail_v2/gem_version.rb | 4 +- .../google/apis/retail_v2/representations.rb | 91 +++++++++ .../lib/google/apis/retail_v2/service.rb | 176 +++++++++++++++++ 6 files changed, 487 insertions(+), 2 deletions(-) diff --git a/api_names_out.yaml b/api_names_out.yaml index 9e5324d3d29..fa182dbdab9 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -281245,6 +281245,12 @@ "/retail:v2/GoogleCloudRetailV2Audience/ageGroups/age_group": age_group "/retail:v2/GoogleCloudRetailV2Audience/genders": genders "/retail:v2/GoogleCloudRetailV2Audience/genders/gender": gender +"/retail:v2/GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsRequest": google_cloud_retail_v2_batch_update_generative_question_configs_request +"/retail:v2/GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsRequest/requests": requests +"/retail:v2/GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsRequest/requests/request": request +"/retail:v2/GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsResponse": google_cloud_retail_v2_batch_update_generative_question_configs_response +"/retail:v2/GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsResponse/generativeQuestionConfigs": generative_question_configs +"/retail:v2/GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsResponse/generativeQuestionConfigs/generative_question_config": generative_question_config "/retail:v2/GoogleCloudRetailV2BigQueryOutputResult": google_cloud_retail_v2_big_query_output_result "/retail:v2/GoogleCloudRetailV2BigQueryOutputResult/datasetId": dataset_id "/retail:v2/GoogleCloudRetailV2BigQueryOutputResult/tableId": table_id @@ -281397,6 +281403,19 @@ "/retail:v2/GoogleCloudRetailV2GcsSource/dataSchema": data_schema "/retail:v2/GoogleCloudRetailV2GcsSource/inputUris": input_uris "/retail:v2/GoogleCloudRetailV2GcsSource/inputUris/input_uri": input_uri +"/retail:v2/GoogleCloudRetailV2GenerativeQuestionConfig": google_cloud_retail_v2_generative_question_config +"/retail:v2/GoogleCloudRetailV2GenerativeQuestionConfig/allowedInConversation": allowed_in_conversation +"/retail:v2/GoogleCloudRetailV2GenerativeQuestionConfig/catalog": catalog +"/retail:v2/GoogleCloudRetailV2GenerativeQuestionConfig/exampleValues": example_values +"/retail:v2/GoogleCloudRetailV2GenerativeQuestionConfig/exampleValues/example_value": example_value +"/retail:v2/GoogleCloudRetailV2GenerativeQuestionConfig/facet": facet +"/retail:v2/GoogleCloudRetailV2GenerativeQuestionConfig/finalQuestion": final_question +"/retail:v2/GoogleCloudRetailV2GenerativeQuestionConfig/frequency": frequency +"/retail:v2/GoogleCloudRetailV2GenerativeQuestionConfig/generatedQuestion": generated_question +"/retail:v2/GoogleCloudRetailV2GenerativeQuestionsFeatureConfig": google_cloud_retail_v2_generative_questions_feature_config +"/retail:v2/GoogleCloudRetailV2GenerativeQuestionsFeatureConfig/catalog": catalog +"/retail:v2/GoogleCloudRetailV2GenerativeQuestionsFeatureConfig/featureEnabled": feature_enabled +"/retail:v2/GoogleCloudRetailV2GenerativeQuestionsFeatureConfig/minimumProducts": minimum_products "/retail:v2/GoogleCloudRetailV2GetDefaultBranchResponse": google_cloud_retail_v2_get_default_branch_response "/retail:v2/GoogleCloudRetailV2GetDefaultBranchResponse/branch": branch "/retail:v2/GoogleCloudRetailV2GetDefaultBranchResponse/note": note @@ -281452,6 +281471,9 @@ "/retail:v2/GoogleCloudRetailV2ListControlsResponse/controls": controls "/retail:v2/GoogleCloudRetailV2ListControlsResponse/controls/control": control "/retail:v2/GoogleCloudRetailV2ListControlsResponse/nextPageToken": next_page_token +"/retail:v2/GoogleCloudRetailV2ListGenerativeQuestionConfigsResponse": google_cloud_retail_v2_list_generative_question_configs_response +"/retail:v2/GoogleCloudRetailV2ListGenerativeQuestionConfigsResponse/generativeQuestionConfigs": generative_question_configs +"/retail:v2/GoogleCloudRetailV2ListGenerativeQuestionConfigsResponse/generativeQuestionConfigs/generative_question_config": generative_question_config "/retail:v2/GoogleCloudRetailV2ListModelsResponse": google_cloud_retail_v2_list_models_response "/retail:v2/GoogleCloudRetailV2ListModelsResponse/models": models "/retail:v2/GoogleCloudRetailV2ListModelsResponse/models/model": model @@ -281912,6 +281934,9 @@ "/retail:v2/GoogleCloudRetailV2TuneModelMetadata/model": model "/retail:v2/GoogleCloudRetailV2TuneModelRequest": google_cloud_retail_v2_tune_model_request "/retail:v2/GoogleCloudRetailV2TuneModelResponse": google_cloud_retail_v2_tune_model_response +"/retail:v2/GoogleCloudRetailV2UpdateGenerativeQuestionConfigRequest": google_cloud_retail_v2_update_generative_question_config_request +"/retail:v2/GoogleCloudRetailV2UpdateGenerativeQuestionConfigRequest/generativeQuestionConfig": generative_question_config +"/retail:v2/GoogleCloudRetailV2UpdateGenerativeQuestionConfigRequest/updateMask": update_mask "/retail:v2/GoogleCloudRetailV2UserEvent": google_cloud_retail_v2_user_event "/retail:v2/GoogleCloudRetailV2UserEvent/attributes": attributes "/retail:v2/GoogleCloudRetailV2UserEvent/attributes/attribute": attribute @@ -282363,12 +282388,18 @@ "/retail:v2/retail.projects.locations.catalogs.controls.patch/updateMask": update_mask "/retail:v2/retail.projects.locations.catalogs.exportAnalyticsMetrics": export_project_location_catalog_analytics_metrics "/retail:v2/retail.projects.locations.catalogs.exportAnalyticsMetrics/catalog": catalog +"/retail:v2/retail.projects.locations.catalogs.generativeQuestion.batchUpdate": batch_project_location_catalog_generative_question_update +"/retail:v2/retail.projects.locations.catalogs.generativeQuestion.batchUpdate/parent": parent +"/retail:v2/retail.projects.locations.catalogs.generativeQuestions.list": list_project_location_catalog_generative_questions +"/retail:v2/retail.projects.locations.catalogs.generativeQuestions.list/parent": parent "/retail:v2/retail.projects.locations.catalogs.getAttributesConfig": get_project_location_catalog_attributes_config "/retail:v2/retail.projects.locations.catalogs.getAttributesConfig/name": name "/retail:v2/retail.projects.locations.catalogs.getCompletionConfig": get_project_location_catalog_completion_config "/retail:v2/retail.projects.locations.catalogs.getCompletionConfig/name": name "/retail:v2/retail.projects.locations.catalogs.getDefaultBranch": get_project_location_catalog_default_branch "/retail:v2/retail.projects.locations.catalogs.getDefaultBranch/catalog": catalog +"/retail:v2/retail.projects.locations.catalogs.getGenerativeQuestionFeature": get_project_location_catalog_generative_question_feature +"/retail:v2/retail.projects.locations.catalogs.getGenerativeQuestionFeature/catalog": catalog "/retail:v2/retail.projects.locations.catalogs.list": list_project_location_catalogs "/retail:v2/retail.projects.locations.catalogs.list/pageSize": page_size "/retail:v2/retail.projects.locations.catalogs.list/pageToken": page_token @@ -282437,6 +282468,12 @@ "/retail:v2/retail.projects.locations.catalogs.updateCompletionConfig": update_project_location_catalog_completion_config "/retail:v2/retail.projects.locations.catalogs.updateCompletionConfig/name": name "/retail:v2/retail.projects.locations.catalogs.updateCompletionConfig/updateMask": update_mask +"/retail:v2/retail.projects.locations.catalogs.updateGenerativeQuestion": update_project_location_catalog_generative_question +"/retail:v2/retail.projects.locations.catalogs.updateGenerativeQuestion/catalog": catalog +"/retail:v2/retail.projects.locations.catalogs.updateGenerativeQuestion/updateMask": update_mask +"/retail:v2/retail.projects.locations.catalogs.updateGenerativeQuestionFeature": update_project_location_catalog_generative_question_feature +"/retail:v2/retail.projects.locations.catalogs.updateGenerativeQuestionFeature/catalog": catalog +"/retail:v2/retail.projects.locations.catalogs.updateGenerativeQuestionFeature/updateMask": update_mask "/retail:v2/retail.projects.locations.catalogs.userEvents.collect": collect_project_location_catalog_user_event "/retail:v2/retail.projects.locations.catalogs.userEvents.collect/ets": ets "/retail:v2/retail.projects.locations.catalogs.userEvents.collect/parent": parent diff --git a/generated/google-apis-retail_v2/CHANGELOG.md b/generated/google-apis-retail_v2/CHANGELOG.md index ed3b1902b73..24bc2a5061a 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.102.0 (2024-09-29) + +* Regenerated from discovery document revision 20240920 + ### v0.101.0 (2024-09-22) * Regenerated from discovery document revision 20240912 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 9e85a63d391..a9c2baf9bab 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 @@ -560,6 +560,44 @@ def update!(**args) end end + # Request for BatchUpdateGenerativeQuestionConfig method. + class GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsRequest + include Google::Apis::Core::Hashable + + # Required. The updates question configs. + # Corresponds to the JSON property `requests` + # @return [Array] + attr_accessor :requests + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @requests = args[:requests] if args.key?(:requests) + end + end + + # Aggregated response for UpdateGenerativeQuestionConfig method. + class GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsResponse + include Google::Apis::Core::Hashable + + # Optional. The updates question configs. + # Corresponds to the JSON property `generativeQuestionConfigs` + # @return [Array] + attr_accessor :generative_question_configs + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @generative_question_configs = args[:generative_question_configs] if args.key?(:generative_question_configs) + end + end + # A BigQuery output result. class GoogleCloudRetailV2BigQueryOutputResult include Google::Apis::Core::Hashable @@ -1805,6 +1843,99 @@ def update!(**args) end end + # Configuration for a single generated question. + class GoogleCloudRetailV2GenerativeQuestionConfig + include Google::Apis::Core::Hashable + + # Optional. Whether the question is asked at serving time. + # Corresponds to the JSON property `allowedInConversation` + # @return [Boolean] + attr_accessor :allowed_in_conversation + alias_method :allowed_in_conversation?, :allowed_in_conversation + + # Required. Resource name of the catalog. Format: projects/`project`/locations/` + # location`/catalogs/`catalog` + # Corresponds to the JSON property `catalog` + # @return [String] + attr_accessor :catalog + + # Output only. Values that can be used to answer the question. + # Corresponds to the JSON property `exampleValues` + # @return [Array] + attr_accessor :example_values + + # Required. The facet to which the question is associated. + # Corresponds to the JSON property `facet` + # @return [String] + attr_accessor :facet + + # Optional. The question that will be used at serving time. Question can have a + # max length of 300 bytes. When not populated, generated_question should be used. + # Corresponds to the JSON property `finalQuestion` + # @return [String] + attr_accessor :final_question + + # Output only. The ratio of how often a question was asked. + # Corresponds to the JSON property `frequency` + # @return [Float] + attr_accessor :frequency + + # Output only. The LLM generated question. + # Corresponds to the JSON property `generatedQuestion` + # @return [String] + attr_accessor :generated_question + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @allowed_in_conversation = args[:allowed_in_conversation] if args.key?(:allowed_in_conversation) + @catalog = args[:catalog] if args.key?(:catalog) + @example_values = args[:example_values] if args.key?(:example_values) + @facet = args[:facet] if args.key?(:facet) + @final_question = args[:final_question] if args.key?(:final_question) + @frequency = args[:frequency] if args.key?(:frequency) + @generated_question = args[:generated_question] if args.key?(:generated_question) + end + end + + # Configuration for overall generative question feature state. + class GoogleCloudRetailV2GenerativeQuestionsFeatureConfig + include Google::Apis::Core::Hashable + + # Required. Resource name of the affected catalog. Format: projects/`project`/ + # locations/`location`/catalogs/`catalog` + # Corresponds to the JSON property `catalog` + # @return [String] + attr_accessor :catalog + + # Optional. Determines whether questions will be used at serving time. Note: + # This feature cannot be enabled until initial data requirements are satisfied. + # Corresponds to the JSON property `featureEnabled` + # @return [Boolean] + attr_accessor :feature_enabled + alias_method :feature_enabled?, :feature_enabled + + # Optional. Minimum number of products in the response to trigger follow-up + # questions. Value must be 0 or positive. + # Corresponds to the JSON property `minimumProducts` + # @return [Fixnum] + attr_accessor :minimum_products + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @catalog = args[:catalog] if args.key?(:catalog) + @feature_enabled = args[:feature_enabled] if args.key?(:feature_enabled) + @minimum_products = args[:minimum_products] if args.key?(:minimum_products) + end + end + # Response message of CatalogService.GetDefaultBranch. class GoogleCloudRetailV2GetDefaultBranchResponse include Google::Apis::Core::Hashable @@ -2235,6 +2366,25 @@ def update!(**args) end end + # Response for ListQuestions method. + class GoogleCloudRetailV2ListGenerativeQuestionConfigsResponse + include Google::Apis::Core::Hashable + + # All the questions for a given catalog. + # Corresponds to the JSON property `generativeQuestionConfigs` + # @return [Array] + attr_accessor :generative_question_configs + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @generative_question_configs = args[:generative_question_configs] if args.key?(:generative_question_configs) + end + end + # Response to a ListModelRequest. class GoogleCloudRetailV2ListModelsResponse include Google::Apis::Core::Hashable @@ -6062,6 +6212,33 @@ def update!(**args) end end + # Request for UpdateGenerativeQuestionConfig method. + class GoogleCloudRetailV2UpdateGenerativeQuestionConfigRequest + include Google::Apis::Core::Hashable + + # Configuration for a single generated question. + # Corresponds to the JSON property `generativeQuestionConfig` + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2GenerativeQuestionConfig] + attr_accessor :generative_question_config + + # 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. + # Corresponds to the JSON property `updateMask` + # @return [String] + attr_accessor :update_mask + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @generative_question_config = args[:generative_question_config] if args.key?(:generative_question_config) + @update_mask = args[:update_mask] if args.key?(:update_mask) + end + end + # UserEvent captures all metadata information Retail API needs to know about how # end users interact with customers' website. class GoogleCloudRetailV2UserEvent 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 6eeae613e45..a48ec6f09f6 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.101.0" + GEM_VERSION = "0.102.0" # Version of the code generator used to generate this client GENERATOR_VERSION = "0.15.1" # Revision of the discovery document this client was generated from - REVISION = "20240912" + REVISION = "20240920" end end end diff --git a/generated/google-apis-retail_v2/lib/google/apis/retail_v2/representations.rb b/generated/google-apis-retail_v2/lib/google/apis/retail_v2/representations.rb index fc2cc0a72f8..4723d604329 100644 --- a/generated/google-apis-retail_v2/lib/google/apis/retail_v2/representations.rb +++ b/generated/google-apis-retail_v2/lib/google/apis/retail_v2/representations.rb @@ -124,6 +124,18 @@ class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class GoogleCloudRetailV2BigQueryOutputResult class Representation < Google::Apis::Core::JsonRepresentation; end @@ -316,6 +328,18 @@ class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class GoogleCloudRetailV2GenerativeQuestionConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRetailV2GenerativeQuestionsFeatureConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class GoogleCloudRetailV2GetDefaultBranchResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -394,6 +418,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class GoogleCloudRetailV2ListGenerativeQuestionConfigsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class GoogleCloudRetailV2ListModelsResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -934,6 +964,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class GoogleCloudRetailV2UpdateGenerativeQuestionConfigRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class GoogleCloudRetailV2UserEvent class Representation < Google::Apis::Core::JsonRepresentation; end @@ -1639,6 +1675,22 @@ class Representation < Google::Apis::Core::JsonRepresentation end end + class GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :requests, as: 'requests', class: Google::Apis::RetailV2::GoogleCloudRetailV2UpdateGenerativeQuestionConfigRequest, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2UpdateGenerativeQuestionConfigRequest::Representation + + end + end + + class GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :generative_question_configs, as: 'generativeQuestionConfigs', class: Google::Apis::RetailV2::GoogleCloudRetailV2GenerativeQuestionConfig, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2GenerativeQuestionConfig::Representation + + end + end + class GoogleCloudRetailV2BigQueryOutputResult # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1948,6 +2000,28 @@ class Representation < Google::Apis::Core::JsonRepresentation end end + class GoogleCloudRetailV2GenerativeQuestionConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :allowed_in_conversation, as: 'allowedInConversation' + property :catalog, as: 'catalog' + collection :example_values, as: 'exampleValues' + property :facet, as: 'facet' + property :final_question, as: 'finalQuestion' + property :frequency, as: 'frequency' + property :generated_question, as: 'generatedQuestion' + end + end + + class GoogleCloudRetailV2GenerativeQuestionsFeatureConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :catalog, as: 'catalog' + property :feature_enabled, as: 'featureEnabled' + property :minimum_products, as: 'minimumProducts' + end + end + class GoogleCloudRetailV2GetDefaultBranchResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -2076,6 +2150,14 @@ class Representation < Google::Apis::Core::JsonRepresentation end end + class GoogleCloudRetailV2ListGenerativeQuestionConfigsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :generative_question_configs, as: 'generativeQuestionConfigs', class: Google::Apis::RetailV2::GoogleCloudRetailV2GenerativeQuestionConfig, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2GenerativeQuestionConfig::Representation + + end + end + class GoogleCloudRetailV2ListModelsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -2990,6 +3072,15 @@ class Representation < Google::Apis::Core::JsonRepresentation end end + class GoogleCloudRetailV2UpdateGenerativeQuestionConfigRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :generative_question_config, as: 'generativeQuestionConfig', class: Google::Apis::RetailV2::GoogleCloudRetailV2GenerativeQuestionConfig, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2GenerativeQuestionConfig::Representation + + property :update_mask, as: 'updateMask' + end + end + class GoogleCloudRetailV2UserEvent # @private class Representation < Google::Apis::Core::JsonRepresentation 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 d3bb1cc68f2..f79ca19cc49 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 @@ -269,6 +269,38 @@ def get_project_location_catalog_default_branch(catalog, fields: nil, quota_user execute_or_queue_command(command, &block) end + # Manages overal generative question feature state -- enables toggling feature + # on and off. + # @param [String] catalog + # Required. Resource name of the parent catalog. Format: projects/`project`/ + # locations/`location`/catalogs/`catalog` + # @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::GoogleCloudRetailV2GenerativeQuestionsFeatureConfig] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2GenerativeQuestionsFeatureConfig] + # + # @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 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 + # Lists all the Catalogs associated with the project. # @param [String] parent # Required. The account resource name with an associated location. If the caller @@ -486,6 +518,85 @@ def update_project_location_catalog_completion_config(name, google_cloud_retail_ execute_or_queue_command(command, &block) end + # Allows management of individual questions. + # @param [String] catalog + # Required. Resource name of the catalog. Format: projects/`project`/locations/` + # location`/catalogs/`catalog` + # @param [Google::Apis::RetailV2::GoogleCloudRetailV2GenerativeQuestionConfig] google_cloud_retail_v2_generative_question_config_object + # @param [String] update_mask + # 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. + # @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::GoogleCloudRetailV2GenerativeQuestionConfig] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2GenerativeQuestionConfig] + # + # @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 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 + + # Manages overal generative question feature state -- enables toggling feature + # on and off. + # @param [String] catalog + # Required. Resource name of the affected catalog. Format: projects/`project`/ + # locations/`location`/catalogs/`catalog` + # @param [Google::Apis::RetailV2::GoogleCloudRetailV2GenerativeQuestionsFeatureConfig] google_cloud_retail_v2_generative_questions_feature_config_object + # @param [String] update_mask + # Optional. Indicates which fields in the provided + # GenerativeQuestionsFeatureConfig to update. If not set or empty, all supported + # fields are updated. + # @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::GoogleCloudRetailV2GenerativeQuestionsFeatureConfig] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2GenerativeQuestionsFeatureConfig] + # + # @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 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 + # Adds the specified CatalogAttribute to the AttributesConfig. If the # CatalogAttribute to add already exists, an ALREADY_EXISTS error is returned. # @param [String] attributes_config @@ -1405,6 +1516,71 @@ def patch_project_location_catalog_control(name, google_cloud_retail_v2_control_ execute_or_queue_command(command, &block) end + # Allows management of multiple questions. + # @param [String] parent + # Optional. Resource name of the parent catalog. Format: projects/`project`/ + # locations/`location`/catalogs/`catalog` + # @param [Google::Apis::RetailV2::GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsRequest] google_cloud_retail_v2_batch_update_generative_question_configs_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::GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2BatchUpdateGenerativeQuestionConfigsResponse] + # + # @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 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 + + # Returns all questions for a given catalog. + # @param [String] parent + # Required. Resource name of the parent catalog. Format: projects/`project`/ + # locations/`location`/catalogs/`catalog` + # @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::GoogleCloudRetailV2ListGenerativeQuestionConfigsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RetailV2::GoogleCloudRetailV2ListGenerativeQuestionConfigsResponse] + # + # @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 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 + # Creates a new model. # @param [String] parent # Required. The parent resource under which to create the model. Format: `