Retail V2 API - Class Google::Cloud::Retail::V2::GenerativeQuestionService::Rest::Client (v1.1.0)

Reference documentation and code samples for the Retail V2 API class Google::Cloud::Retail::V2::GenerativeQuestionService::Rest::Client.

REST client for the GenerativeQuestionService service.

Service for managing LLM generated questions in search serving.

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the GenerativeQuestionService Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all GenerativeQuestionService clients
::Google::Cloud::Retail::V2::GenerativeQuestionService::Rest::Client.configure do |config|
  config.timeout = 10.0
end

#batch_update_generative_question_configs

def batch_update_generative_question_configs(request, options = nil) -> ::Google::Cloud::Retail::V2::BatchUpdateGenerativeQuestionConfigsResponse
def batch_update_generative_question_configs(parent: nil, requests: nil) -> ::Google::Cloud::Retail::V2::BatchUpdateGenerativeQuestionConfigsResponse

Allows management of multiple questions.

Overloads
def batch_update_generative_question_configs(request, options = nil) -> ::Google::Cloud::Retail::V2::BatchUpdateGenerativeQuestionConfigsResponse
Pass arguments to batch_update_generative_question_configs via a request object, either of type BatchUpdateGenerativeQuestionConfigsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Retail::V2::BatchUpdateGenerativeQuestionConfigsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def batch_update_generative_question_configs(parent: nil, requests: nil) -> ::Google::Cloud::Retail::V2::BatchUpdateGenerativeQuestionConfigsResponse
Pass arguments to batch_update_generative_question_configs via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/retail/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Retail::V2::GenerativeQuestionService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Retail::V2::BatchUpdateGenerativeQuestionConfigsRequest.new

# Call the batch_update_generative_question_configs method.
result = client.batch_update_generative_question_configs request

# The returned object is of type Google::Cloud::Retail::V2::BatchUpdateGenerativeQuestionConfigsResponse.
p result

#configure

def configure() { |config| ... } -> Client::Configuration

Configure the GenerativeQuestionService Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#get_generative_questions_feature_config

def get_generative_questions_feature_config(request, options = nil) -> ::Google::Cloud::Retail::V2::GenerativeQuestionsFeatureConfig
def get_generative_questions_feature_config(catalog: nil) -> ::Google::Cloud::Retail::V2::GenerativeQuestionsFeatureConfig

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

Overloads
def get_generative_questions_feature_config(request, options = nil) -> ::Google::Cloud::Retail::V2::GenerativeQuestionsFeatureConfig
Pass arguments to get_generative_questions_feature_config via a request object, either of type Google::Cloud::Retail::V2::GetGenerativeQuestionsFeatureConfigRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Retail::V2::GetGenerativeQuestionsFeatureConfigRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_generative_questions_feature_config(catalog: nil) -> ::Google::Cloud::Retail::V2::GenerativeQuestionsFeatureConfig
Pass arguments to get_generative_questions_feature_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • catalog (::String) — Required. Resource name of the parent catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/retail/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Retail::V2::GenerativeQuestionService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Retail::V2::GetGenerativeQuestionsFeatureConfigRequest.new

# Call the get_generative_questions_feature_config method.
result = client.get_generative_questions_feature_config request

# The returned object is of type Google::Cloud::Retail::V2::GenerativeQuestionsFeatureConfig.
p result

#initialize

def initialize() { |config| ... } -> Client

Create a new GenerativeQuestionService REST client object.

Yields
  • (config) — Configure the GenerativeQuestionService client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::Retail::V2::GenerativeQuestionService::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::Retail::V2::GenerativeQuestionService::Rest::Client.new do |config|
  config.timeout = 10.0
end

#list_generative_question_configs

def list_generative_question_configs(request, options = nil) -> ::Google::Cloud::Retail::V2::ListGenerativeQuestionConfigsResponse
def list_generative_question_configs(parent: nil) -> ::Google::Cloud::Retail::V2::ListGenerativeQuestionConfigsResponse

Returns all questions for a given catalog.

Overloads
def list_generative_question_configs(request, options = nil) -> ::Google::Cloud::Retail::V2::ListGenerativeQuestionConfigsResponse
Pass arguments to list_generative_question_configs via a request object, either of type ListGenerativeQuestionConfigsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Retail::V2::ListGenerativeQuestionConfigsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_generative_question_configs(parent: nil) -> ::Google::Cloud::Retail::V2::ListGenerativeQuestionConfigsResponse
Pass arguments to list_generative_question_configs via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • parent (::String) — Required. Resource name of the parent catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/retail/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Retail::V2::GenerativeQuestionService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Retail::V2::ListGenerativeQuestionConfigsRequest.new

# Call the list_generative_question_configs method.
result = client.list_generative_question_configs request

# The returned object is of type Google::Cloud::Retail::V2::ListGenerativeQuestionConfigsResponse.
p result

#location_client

def location_client() -> Google::Cloud::Location::Locations::Rest::Client

Get the associated client for mix-in of the Locations.

Returns
  • (Google::Cloud::Location::Locations::Rest::Client)

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)

#update_generative_question_config

def update_generative_question_config(request, options = nil) -> ::Google::Cloud::Retail::V2::GenerativeQuestionConfig
def update_generative_question_config(generative_question_config: nil, update_mask: nil) -> ::Google::Cloud::Retail::V2::GenerativeQuestionConfig

Allows management of individual questions.

Overloads
def update_generative_question_config(request, options = nil) -> ::Google::Cloud::Retail::V2::GenerativeQuestionConfig
Pass arguments to update_generative_question_config via a request object, either of type UpdateGenerativeQuestionConfigRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Retail::V2::UpdateGenerativeQuestionConfigRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_generative_question_config(generative_question_config: nil, update_mask: nil) -> ::Google::Cloud::Retail::V2::GenerativeQuestionConfig
Pass arguments to update_generative_question_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/retail/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Retail::V2::GenerativeQuestionService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Retail::V2::UpdateGenerativeQuestionConfigRequest.new

# Call the update_generative_question_config method.
result = client.update_generative_question_config request

# The returned object is of type Google::Cloud::Retail::V2::GenerativeQuestionConfig.
p result

#update_generative_questions_feature_config

def update_generative_questions_feature_config(request, options = nil) -> ::Google::Cloud::Retail::V2::GenerativeQuestionsFeatureConfig
def update_generative_questions_feature_config(generative_questions_feature_config: nil, update_mask: nil) -> ::Google::Cloud::Retail::V2::GenerativeQuestionsFeatureConfig

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

Overloads
def update_generative_questions_feature_config(request, options = nil) -> ::Google::Cloud::Retail::V2::GenerativeQuestionsFeatureConfig
Pass arguments to update_generative_questions_feature_config via a request object, either of type UpdateGenerativeQuestionsFeatureConfigRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Retail::V2::UpdateGenerativeQuestionsFeatureConfigRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_generative_questions_feature_config(generative_questions_feature_config: nil, update_mask: nil) -> ::Google::Cloud::Retail::V2::GenerativeQuestionsFeatureConfig
Pass arguments to update_generative_questions_feature_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/retail/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Retail::V2::GenerativeQuestionService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Retail::V2::UpdateGenerativeQuestionsFeatureConfigRequest.new

# Call the update_generative_questions_feature_config method.
result = client.update_generative_questions_feature_config request

# The returned object is of type Google::Cloud::Retail::V2::GenerativeQuestionsFeatureConfig.
p result