Reference documentation and code samples for the Dialogflow V2 API class Google::Cloud::Dialogflow::V2::GeneratorEvaluations::Rest::Client.
REST client for the GeneratorEvaluations service.
Service for managing generator evaluations.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::ConfigurationConfigure the GeneratorEvaluations Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all GeneratorEvaluations clients ::Google::Cloud::Dialogflow::V2::GeneratorEvaluations::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::ConfigurationConfigure the GeneratorEvaluations 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.
- (config) — Configure the Client client.
- config (Client::Configuration)
#create_generator_evaluation
def create_generator_evaluation(request, options = nil) -> ::Gapic::Operation
def create_generator_evaluation(parent: nil, generator_evaluation: nil) -> ::Gapic::OperationCreates evaluation of a generator.
def create_generator_evaluation(request, options = nil) -> ::Gapic::Operationcreate_generator_evaluation via a request object, either of type
CreateGeneratorEvaluationRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::V2::CreateGeneratorEvaluationRequest, ::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 create_generator_evaluation(parent: nil, generator_evaluation: nil) -> ::Gapic::Operationcreate_generator_evaluation 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).
-
parent (::String) — Required. The generator resource name. Format:
projects/<Project ID>/locations/<Location ID>/generators/<Generator ID> - generator_evaluation (::Google::Cloud::Dialogflow::V2::GeneratorEvaluation, ::Hash) — Required. The generator evaluation to be created.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dialogflow/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dialogflow::V2::GeneratorEvaluations::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::V2::CreateGeneratorEvaluationRequest.new # Call the create_generator_evaluation method. result = client.create_generator_evaluation request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#delete_generator_evaluation
def delete_generator_evaluation(request, options = nil) -> ::Google::Protobuf::Empty
def delete_generator_evaluation(name: nil) -> ::Google::Protobuf::EmptyDeletes an evaluation of generator.
def delete_generator_evaluation(request, options = nil) -> ::Google::Protobuf::Emptydelete_generator_evaluation via a request object, either of type
DeleteGeneratorEvaluationRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::V2::DeleteGeneratorEvaluationRequest, ::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 delete_generator_evaluation(name: nil) -> ::Google::Protobuf::Emptydelete_generator_evaluation 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).
-
name (::String) — Required. The generator evaluation resource name. Format:
projects/<Project ID>/locations/<Location ID>/generators/<Generator ID>/ evaluations/<Evaluation ID>
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dialogflow/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dialogflow::V2::GeneratorEvaluations::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::V2::DeleteGeneratorEvaluationRequest.new # Call the delete_generator_evaluation method. result = client.delete_generator_evaluation request # The returned object is of type Google::Protobuf::Empty. p result
#get_generator_evaluation
def get_generator_evaluation(request, options = nil) -> ::Google::Cloud::Dialogflow::V2::GeneratorEvaluation
def get_generator_evaluation(name: nil) -> ::Google::Cloud::Dialogflow::V2::GeneratorEvaluationGets an evaluation of generator.
def get_generator_evaluation(request, options = nil) -> ::Google::Cloud::Dialogflow::V2::GeneratorEvaluationget_generator_evaluation via a request object, either of type
Google::Cloud::Dialogflow::V2::GetGeneratorEvaluationRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::V2::GetGeneratorEvaluationRequest, ::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_generator_evaluation(name: nil) -> ::Google::Cloud::Dialogflow::V2::GeneratorEvaluationget_generator_evaluation 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).
-
name (::String) — Required. The generator evaluation resource name. Format:
projects/<Project ID>/locations/<Location ID>/generators/<Generator ID>/evaluations/<Evaluation ID>
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dialogflow::V2::GeneratorEvaluation)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dialogflow/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dialogflow::V2::GeneratorEvaluations::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::V2::GetGeneratorEvaluationRequest.new # Call the get_generator_evaluation method. result = client.get_generator_evaluation request # The returned object is of type Google::Cloud::Dialogflow::V2::GeneratorEvaluation. p result
#initialize
def initialize() { |config| ... } -> ClientCreate a new GeneratorEvaluations REST client object.
- (config) — Configure the GeneratorEvaluations client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Dialogflow::V2::GeneratorEvaluations::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Dialogflow::V2::GeneratorEvaluations::Rest::Client.new do |config| config.timeout = 10.0 end
#list_generator_evaluations
def list_generator_evaluations(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::V2::GeneratorEvaluation>
def list_generator_evaluations(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::V2::GeneratorEvaluation>Lists evaluations of generator.
def list_generator_evaluations(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::V2::GeneratorEvaluation>list_generator_evaluations via a request object, either of type
ListGeneratorEvaluationsRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::V2::ListGeneratorEvaluationsRequest, ::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_generator_evaluations(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::V2::GeneratorEvaluation>list_generator_evaluations 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).
-
parent (::String) — Required. The generator resource name. Format:
projects/<Project ID>/locations/<Location ID>/generators/<Generator ID>Wildcard value-is supported on generator_id to list evaluations across all generators under same project. - page_size (::Integer) — Optional. Maximum number of evaluations to return in a single page. By default 100 and at most 1000.
- page_token (::String) — Optional. The next_page_token value returned from a previous list request.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::V2::GeneratorEvaluation>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::V2::GeneratorEvaluation>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dialogflow/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dialogflow::V2::GeneratorEvaluations::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::V2::ListGeneratorEvaluationsRequest.new # Call the list_generator_evaluations method. result = client.list_generator_evaluations request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::Dialogflow::V2::GeneratorEvaluation. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Rest::ClientGet the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#logger
def logger() -> LoggerThe logger used for request/response debug logging.
- (Logger)
#operations_client
def operations_client() -> ::Google::Cloud::Dialogflow::V2::GeneratorEvaluations::Rest::OperationsGet the associated client for long-running operations.
#universe_domain
def universe_domain() -> StringThe effective universe domain
- (String)