Class: Google::Cloud::Ces::V1beta::EvaluationService::Client

Inherits:
Object
  • Object
show all
Includes:
Paths
Defined in:
lib/google/cloud/ces/v1beta/evaluation_service/client.rb

Overview

Client for the EvaluationService service.

EvaluationService exposes methods to perform evaluation for the CES app.

Defined Under Namespace

Classes: Configuration

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Paths

#agent_path, #app_path, #app_version_path, #changelog_path, #conversation_path, #evaluation_dataset_path, #evaluation_expectation_path, #evaluation_path, #evaluation_result_path, #evaluation_run_path, #scheduled_evaluation_run_path, #tool_path, #toolset_path

Constructor Details

#initialize {|config| ... } ⇒ Client

Create a new EvaluationService client object.

Examples:


# Create a client using the default configuration
client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::Ces::V1beta::EvaluationService::Client.new do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the EvaluationService client.

Yield Parameters:



130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 130

def initialize
  # These require statements are intentionally placed here to initialize
  # the gRPC module only when it's required.
  # See https://github.com/googleapis/toolkit/issues/446
  require "gapic/grpc"
  require "google/cloud/ces/v1beta/evaluation_service_services_pb"

  # Create the configuration object
  @config = Configuration.new Client.configure

  # Yield the configuration if needed
  yield @config if block_given?

  # Create credentials
  credentials = @config.credentials
  # Use self-signed JWT if the endpoint is unchanged from default,
  # but only if the default endpoint does not have a region prefix.
  enable_self_signed_jwt = @config.endpoint.nil? ||
                           (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
                           !@config.endpoint.split(".").first.include?("-"))
  credentials ||= Credentials.default scope: @config.scope,
                                      enable_self_signed_jwt: enable_self_signed_jwt
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
    credentials = Credentials.new credentials, scope: @config.scope
  end
  @quota_project_id = @config.quota_project
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id

  @operations_client = Operations.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @config.endpoint
    config.universe_domain = @config.universe_domain
  end

  @evaluation_service_stub = ::Gapic::ServiceStub.new(
    ::Google::Cloud::Ces::V1beta::EvaluationService::Stub,
    credentials: credentials,
    endpoint: @config.endpoint,
    endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
    universe_domain: @config.universe_domain,
    channel_args: @config.channel_args,
    interceptors: @config.interceptors,
    channel_pool_config: @config.channel_pool,
    logger: @config.logger
  )

  @evaluation_service_stub.stub_logger&.info do |entry|
    entry.set_system_name
    entry.set_service
    entry.message = "Created client for #{entry.service}"
    entry.set_credentials_fields credentials
    entry.set "customEndpoint", @config.endpoint if @config.endpoint
    entry.set "defaultTimeout", @config.timeout if @config.timeout
    entry.set "quotaProject", @quota_project_id if @quota_project_id
  end

  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @evaluation_service_stub.endpoint
    config.universe_domain = @evaluation_service_stub.universe_domain
    config.logger = @evaluation_service_stub.logger if config.respond_to? :logger=
  end
end

Instance Attribute Details

#location_clientGoogle::Cloud::Location::Locations::Client (readonly)

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

Returns:

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


208
209
210
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 208

def location_client
  @location_client
end

#operations_client::Google::Cloud::Ces::V1beta::EvaluationService::Operations (readonly)

Get the associated client for long-running operations.



201
202
203
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 201

def operations_client
  @operations_client
end

Class Method Details

.configure {|config| ... } ⇒ Client::Configuration

Configure the EvaluationService Client class.

See Configuration for a description of the configuration fields.

Examples:


# Modify the configuration for all EvaluationService clients
::Google::Cloud::Ces::V1beta::EvaluationService::Client.configure do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 63

def self.configure
  @configure ||= begin
    namespace = ["Google", "Cloud", "Ces", "V1beta"]
    parent_config = while namespace.any?
                      parent_name = namespace.join "::"
                      parent_const = const_get parent_name
                      break parent_const.configure if parent_const.respond_to? :configure
                      namespace.pop
                    end
    default_config = Client::Configuration.new parent_config

    default_config.timeout = 60.0
    default_config.retry_policy = {
      initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
    }

    default_config
  end
  yield @configure if block_given?
  @configure
end

Instance Method Details

#configure {|config| ... } ⇒ Client::Configuration

Configure the EvaluationService 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 configure.

See Configuration for a description of the configuration fields.

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



100
101
102
103
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 100

def configure
  yield @config if block_given?
  @config
end

#create_evaluation(request, options = nil) ⇒ ::Google::Cloud::Ces::V1beta::Evaluation #create_evaluation(parent: nil, evaluation_id: nil, evaluation: nil) ⇒ ::Google::Cloud::Ces::V1beta::Evaluation

Creates an evaluation.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::CreateEvaluationRequest.new

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

# The returned object is of type Google::Cloud::Ces::V1beta::Evaluation.
p result

Overloads:

  • #create_evaluation(request, options = nil) ⇒ ::Google::Cloud::Ces::V1beta::Evaluation

    Pass arguments to create_evaluation via a request object, either of type CreateEvaluationRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::CreateEvaluationRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_evaluation(parent: nil, evaluation_id: nil, evaluation: nil) ⇒ ::Google::Cloud::Ces::V1beta::Evaluation

    Pass arguments to create_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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The app to create the evaluation for. Format: projects/{project}/locations/{location}/apps/{app}

    • evaluation_id (::String) (defaults to: nil)

      Optional. The ID to use for the evaluation, which will become the final component of the evaluation's resource name. If not provided, a unique ID will be automatically assigned for the evaluation.

    • evaluation (::Google::Cloud::Ces::V1beta::Evaluation, ::Hash) (defaults to: nil)

      Required. The evaluation to create.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 505

def create_evaluation request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateEvaluationRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_evaluation..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_evaluation.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_evaluation.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :create_evaluation, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_evaluation_dataset(request, options = nil) ⇒ ::Google::Cloud::Ces::V1beta::EvaluationDataset #create_evaluation_dataset(parent: nil, evaluation_dataset_id: nil, evaluation_dataset: nil) ⇒ ::Google::Cloud::Ces::V1beta::EvaluationDataset

Creates an evaluation dataset.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest.new

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

# The returned object is of type Google::Cloud::Ces::V1beta::EvaluationDataset.
p result

Overloads:

  • #create_evaluation_dataset(request, options = nil) ⇒ ::Google::Cloud::Ces::V1beta::EvaluationDataset

    Pass arguments to create_evaluation_dataset via a request object, either of type CreateEvaluationDatasetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_evaluation_dataset(parent: nil, evaluation_dataset_id: nil, evaluation_dataset: nil) ⇒ ::Google::Cloud::Ces::V1beta::EvaluationDataset

    Pass arguments to create_evaluation_dataset 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:

    • parent (::String) (defaults to: nil)

      Required. The app to create the evaluation for. Format: projects/{project}/locations/{location}/apps/{app}

    • evaluation_dataset_id (::String) (defaults to: nil)

      Optional. The ID to use for the evaluation dataset, which will become the final component of the evaluation dataset's resource name. If not provided, a unique ID will be automatically assigned for the evaluation.

    • evaluation_dataset (::Google::Cloud::Ces::V1beta::EvaluationDataset, ::Hash) (defaults to: nil)

      Required. The evaluation dataset to create.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 812

def create_evaluation_dataset request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_evaluation_dataset..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_evaluation_dataset.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_evaluation_dataset.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :create_evaluation_dataset, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_evaluation_expectation(request, options = nil) ⇒ ::Google::Cloud::Ces::V1beta::EvaluationExpectation #create_evaluation_expectation(parent: nil, evaluation_expectation_id: nil, evaluation_expectation: nil) ⇒ ::Google::Cloud::Ces::V1beta::EvaluationExpectation

Creates an evaluation expectation.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest.new

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

# The returned object is of type Google::Cloud::Ces::V1beta::EvaluationExpectation.
p result

Overloads:

  • #create_evaluation_expectation(request, options = nil) ⇒ ::Google::Cloud::Ces::V1beta::EvaluationExpectation

    Pass arguments to create_evaluation_expectation via a request object, either of type CreateEvaluationExpectationRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_evaluation_expectation(parent: nil, evaluation_expectation_id: nil, evaluation_expectation: nil) ⇒ ::Google::Cloud::Ces::V1beta::EvaluationExpectation

    Pass arguments to create_evaluation_expectation 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:

    • parent (::String) (defaults to: nil)

      Required. The app to create the evaluation expectation for. Format: projects/{project}/locations/{location}/apps/{app}

    • evaluation_expectation_id (::String) (defaults to: nil)

      Optional. The ID to use for the evaluation expectation, which will become the final component of the evaluation expectation's resource name. If not provided, a unique ID will be automatically assigned for the evaluation expectation.

    • evaluation_expectation (::Google::Cloud::Ces::V1beta::EvaluationExpectation, ::Hash) (defaults to: nil)

      Required. The evaluation expectation to create.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 2434

def create_evaluation_expectation request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_evaluation_expectation..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_evaluation_expectation.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_evaluation_expectation.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :create_evaluation_expectation, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_scheduled_evaluation_run(request, options = nil) ⇒ ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun #create_scheduled_evaluation_run(parent: nil, scheduled_evaluation_run_id: nil, scheduled_evaluation_run: nil) ⇒ ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun

Creates a scheduled evaluation run.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest.new

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

# The returned object is of type Google::Cloud::Ces::V1beta::ScheduledEvaluationRun.
p result

Overloads:

  • #create_scheduled_evaluation_run(request, options = nil) ⇒ ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun

    Pass arguments to create_scheduled_evaluation_run via a request object, either of type CreateScheduledEvaluationRunRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_scheduled_evaluation_run(parent: nil, scheduled_evaluation_run_id: nil, scheduled_evaluation_run: nil) ⇒ ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun

    Pass arguments to create_scheduled_evaluation_run 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:

    • parent (::String) (defaults to: nil)

      Required. The app to create the scheduled evaluation run for. Format: projects/{project}/locations/{location}/apps/{app}

    • scheduled_evaluation_run_id (::String) (defaults to: nil)

      Optional. The ID to use for the scheduled evaluation run, which will become the final component of the scheduled evaluation run's resource name. If not provided, a unique ID will be automatically assigned.

    • scheduled_evaluation_run (::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun, ::Hash) (defaults to: nil)

      Required. The scheduled evaluation run to create.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 2705

def create_scheduled_evaluation_run request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_scheduled_evaluation_run..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_scheduled_evaluation_run.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_scheduled_evaluation_run.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :create_scheduled_evaluation_run, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_evaluation(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_evaluation(name: nil, force: nil, etag: nil) ⇒ ::Google::Protobuf::Empty

Deletes an evaluation.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::DeleteEvaluationRequest.new

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

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_evaluation(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_evaluation via a request object, either of type DeleteEvaluationRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_evaluation(name: nil, force: nil, etag: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the evaluation to delete.

    • force (::Boolean) (defaults to: nil)

      Optional. Indicates whether to forcefully delete the evaluation, even if it is still referenced by evaluation datasets.

      • If force = false, the deletion will fail if any datasets still reference the evaluation.
      • If force = true, all existing references from datasets will be removed and the evaluation will be deleted.
    • etag (::String) (defaults to: nil)

      Optional. The current etag of the evaluation. If an etag is not provided, the deletion will overwrite any concurrent changes. If an etag is provided and does not match the current etag of the evaluation, deletion will be blocked and an ABORTED error will be returned.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 1086

def delete_evaluation request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_evaluation..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_evaluation.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_evaluation.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :delete_evaluation, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_evaluation_dataset(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_evaluation_dataset(name: nil, etag: nil) ⇒ ::Google::Protobuf::Empty

Deletes an evaluation dataset.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest.new

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

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_evaluation_dataset(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_evaluation_dataset via a request object, either of type DeleteEvaluationDatasetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_evaluation_dataset(name: nil, etag: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_evaluation_dataset 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:

    • name (::String) (defaults to: nil)

      Required. The resource name of the evaluation dataset to delete.

    • etag (::String) (defaults to: nil)

      Optional. The current etag of the evaluation dataset. If an etag is not provided, the deletion will overwrite any concurrent changes. If an etag is provided and does not match the current etag of the evaluation dataset, deletion will be blocked and an ABORTED error will be returned.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 1261

def delete_evaluation_dataset request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_evaluation_dataset..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_evaluation_dataset.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_evaluation_dataset.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :delete_evaluation_dataset, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_evaluation_expectation(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_evaluation_expectation(name: nil, etag: nil) ⇒ ::Google::Protobuf::Empty

Deletes an evaluation expectation.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest.new

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

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_evaluation_expectation(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_evaluation_expectation via a request object, either of type DeleteEvaluationExpectationRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_evaluation_expectation(name: nil, etag: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_evaluation_expectation 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:

    • name (::String) (defaults to: nil)

      Required. The resource name of the evaluation expectation to delete.

    • etag (::String) (defaults to: nil)

      Optional. The current etag of the evaluation expectation. If an etag is not provided, the deletion will overwrite any concurrent changes. If an etag is provided and does not match the current etag of the evaluation expectation, deletion will be blocked and an ABORTED error will be returned.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 2612

def delete_evaluation_expectation request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_evaluation_expectation..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_evaluation_expectation.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_evaluation_expectation.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :delete_evaluation_expectation, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_evaluation_result(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_evaluation_result(name: nil) ⇒ ::Google::Protobuf::Empty

Deletes an evaluation result.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest.new

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

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_evaluation_result(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_evaluation_result via a request object, either of type DeleteEvaluationResultRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_evaluation_result(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_evaluation_result 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:

    • name (::String) (defaults to: nil)

      Required. The resource name of the evaluation result to delete.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 1171

def delete_evaluation_result request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_evaluation_result..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_evaluation_result.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_evaluation_result.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :delete_evaluation_result, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_evaluation_run(request, options = nil) ⇒ ::Gapic::Operation #delete_evaluation_run(name: nil) ⇒ ::Gapic::Operation

Deletes an evaluation run.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest.new

# Call the delete_evaluation_run method.
result = client.delete_evaluation_run 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

Overloads:

  • #delete_evaluation_run(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_evaluation_run via a request object, either of type DeleteEvaluationRunRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_evaluation_run(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_evaluation_run 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:

    • name (::String) (defaults to: nil)

      Required. The resource name of the evaluation run to delete.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 1353

def delete_evaluation_run request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_evaluation_run..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_evaluation_run.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_evaluation_run.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :delete_evaluation_run, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_scheduled_evaluation_run(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_scheduled_evaluation_run(name: nil, etag: nil) ⇒ ::Google::Protobuf::Empty

Deletes a scheduled evaluation run.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest.new

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

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_scheduled_evaluation_run(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_scheduled_evaluation_run via a request object, either of type DeleteScheduledEvaluationRunRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_scheduled_evaluation_run(name: nil, etag: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_scheduled_evaluation_run 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:

    • name (::String) (defaults to: nil)

      Required. The resource name of the scheduled evaluation run to delete.

    • etag (::String) (defaults to: nil)

      Optional. The etag of the ScheduledEvaluationRun. If provided, it must match the server's etag.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 3080

def delete_scheduled_evaluation_run request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_scheduled_evaluation_run..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_scheduled_evaluation_run.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_scheduled_evaluation_run.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :delete_scheduled_evaluation_run, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#export_evaluation_results(request, options = nil) ⇒ ::Gapic::Operation #export_evaluation_results(parent: nil, names: nil, export_options: nil) ⇒ ::Gapic::Operation

Exports evaluations results.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest.new

# Call the export_evaluation_results method.
result = client.export_evaluation_results 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

Overloads:

  • #export_evaluation_results(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to export_evaluation_results via a request object, either of type Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #export_evaluation_results(parent: nil, names: nil, export_options: nil) ⇒ ::Gapic::Operation

    Pass arguments to export_evaluation_results 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:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the evaluation to export evaluation results from. Format: projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}

    • names (::Array<::String>) (defaults to: nil)

      Required. The resource names of the evaluation results to export.

    • export_options (::Google::Cloud::Ces::V1beta::ExportOptions, ::Hash) (defaults to: nil)

      Optional. The export options for the evaluation results.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 3473

def export_evaluation_results request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.export_evaluation_results..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.export_evaluation_results.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.export_evaluation_results.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :export_evaluation_results, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#export_evaluation_runs(request, options = nil) ⇒ ::Gapic::Operation #export_evaluation_runs(parent: nil, names: nil, export_options: nil) ⇒ ::Gapic::Operation

Exports evaluations runs.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest.new

# Call the export_evaluation_runs method.
result = client.export_evaluation_runs 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

Overloads:

  • #export_evaluation_runs(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to export_evaluation_runs via a request object, either of type Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #export_evaluation_runs(parent: nil, names: nil, export_options: nil) ⇒ ::Gapic::Operation

    Pass arguments to export_evaluation_runs 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:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the app to export evaluation runs from. Format: projects/{project}/locations/{location}/apps/{app}

    • names (::Array<::String>) (defaults to: nil)

      Required. The resource names of the evaluation runs to export.

    • export_options (::Google::Cloud::Ces::V1beta::ExportOptions, ::Hash) (defaults to: nil)

      Optional. The export options for the evaluation runs.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 3373

def export_evaluation_runs request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.export_evaluation_runs..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.export_evaluation_runs.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.export_evaluation_runs.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :export_evaluation_runs, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#export_evaluations(request, options = nil) ⇒ ::Gapic::Operation #export_evaluations(parent: nil, names: nil, export_options: nil, include_evaluation_results: nil, include_evaluations: nil) ⇒ ::Gapic::Operation

Exports evaluations.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::ExportEvaluationsRequest.new

# Call the export_evaluations method.
result = client.export_evaluations 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

Overloads:

  • #export_evaluations(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to export_evaluations via a request object, either of type Google::Cloud::Ces::V1beta::ExportEvaluationsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #export_evaluations(parent: nil, names: nil, export_options: nil, include_evaluation_results: nil, include_evaluations: nil) ⇒ ::Gapic::Operation

    Pass arguments to export_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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the app to export evaluations from. Format: projects/{project}/locations/{location}/apps/{app}

    • names (::Array<::String>) (defaults to: nil)

      Required. The resource names of the evaluations to export.

    • export_options (::Google::Cloud::Ces::V1beta::ExportOptions, ::Hash) (defaults to: nil)

      Optional. The export options for the evaluations.

    • include_evaluation_results (::Boolean) (defaults to: nil)

      Optional. Includes evaluation results in the export. At least one of include_evaluation_results or include_evaluations must be set.

    • include_evaluations (::Boolean) (defaults to: nil)

      Optional. Includes evaluations in the export. At least one of include_evaluation_results or include_evaluations must be set.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 3274

def export_evaluations request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.export_evaluations..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.export_evaluations.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.export_evaluations.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :export_evaluations, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#generate_evaluation(request, options = nil) ⇒ ::Gapic::Operation #generate_evaluation(conversation: nil, source: nil, evaluation_type: nil) ⇒ ::Gapic::Operation

Creates a golden evaluation from a conversation.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::GenerateEvaluationRequest.new

# Call the generate_evaluation method.
result = client.generate_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

Overloads:

  • #generate_evaluation(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to generate_evaluation via a request object, either of type GenerateEvaluationRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #generate_evaluation(conversation: nil, source: nil, evaluation_type: nil) ⇒ ::Gapic::Operation

    Pass arguments to generate_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).

    Parameters:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 605

def generate_evaluation request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.generate_evaluation..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.conversation
    header_params["conversation"] = request.conversation
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.generate_evaluation.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.generate_evaluation.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :generate_evaluation, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_evaluation(request, options = nil) ⇒ ::Google::Cloud::Ces::V1beta::Evaluation #get_evaluation(name: nil) ⇒ ::Google::Cloud::Ces::V1beta::Evaluation

Gets details of the specified evaluation.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::GetEvaluationRequest.new

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

# The returned object is of type Google::Cloud::Ces::V1beta::Evaluation.
p result

Overloads:

  • #get_evaluation(request, options = nil) ⇒ ::Google::Cloud::Ces::V1beta::Evaluation

    Pass arguments to get_evaluation via a request object, either of type GetEvaluationRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::GetEvaluationRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_evaluation(name: nil) ⇒ ::Google::Cloud::Ces::V1beta::Evaluation

    Pass arguments to get_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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the evaluation to retrieve.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 1440

def get_evaluation request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetEvaluationRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_evaluation..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_evaluation.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_evaluation.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :get_evaluation, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_evaluation_dataset(request, options = nil) ⇒ ::Google::Cloud::Ces::V1beta::EvaluationDataset #get_evaluation_dataset(name: nil) ⇒ ::Google::Cloud::Ces::V1beta::EvaluationDataset

Gets details of the specified evaluation dataset.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest.new

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

# The returned object is of type Google::Cloud::Ces::V1beta::EvaluationDataset.
p result

Overloads:

  • #get_evaluation_dataset(request, options = nil) ⇒ ::Google::Cloud::Ces::V1beta::EvaluationDataset

    Pass arguments to get_evaluation_dataset via a request object, either of type GetEvaluationDatasetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_evaluation_dataset(name: nil) ⇒ ::Google::Cloud::Ces::V1beta::EvaluationDataset

    Pass arguments to get_evaluation_dataset 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:

    • name (::String) (defaults to: nil)

      Required. The resource name of the evaluation dataset to retrieve.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 1610

def get_evaluation_dataset request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_evaluation_dataset..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_evaluation_dataset.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_evaluation_dataset.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :get_evaluation_dataset, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_evaluation_expectation(request, options = nil) ⇒ ::Google::Cloud::Ces::V1beta::EvaluationExpectation #get_evaluation_expectation(name: nil) ⇒ ::Google::Cloud::Ces::V1beta::EvaluationExpectation

Gets details of the specified evaluation expectation.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest.new

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

# The returned object is of type Google::Cloud::Ces::V1beta::EvaluationExpectation.
p result

Overloads:

  • #get_evaluation_expectation(request, options = nil) ⇒ ::Google::Cloud::Ces::V1beta::EvaluationExpectation

    Pass arguments to get_evaluation_expectation via a request object, either of type GetEvaluationExpectationRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_evaluation_expectation(name: nil) ⇒ ::Google::Cloud::Ces::V1beta::EvaluationExpectation

    Pass arguments to get_evaluation_expectation 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:

    • name (::String) (defaults to: nil)

      Required. The resource name of the evaluation expectation to retrieve.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 2340

def get_evaluation_expectation request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_evaluation_expectation..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_evaluation_expectation.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_evaluation_expectation.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :get_evaluation_expectation, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_evaluation_result(request, options = nil) ⇒ ::Google::Cloud::Ces::V1beta::EvaluationResult #get_evaluation_result(name: nil) ⇒ ::Google::Cloud::Ces::V1beta::EvaluationResult

Gets details of the specified evaluation result.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::GetEvaluationResultRequest.new

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

# The returned object is of type Google::Cloud::Ces::V1beta::EvaluationResult.
p result

Overloads:

  • #get_evaluation_result(request, options = nil) ⇒ ::Google::Cloud::Ces::V1beta::EvaluationResult

    Pass arguments to get_evaluation_result via a request object, either of type GetEvaluationResultRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_evaluation_result(name: nil) ⇒ ::Google::Cloud::Ces::V1beta::EvaluationResult

    Pass arguments to get_evaluation_result 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:

    • name (::String) (defaults to: nil)

      Required. The resource name of the evaluation result to retrieve.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 1525

def get_evaluation_result request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_evaluation_result..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_evaluation_result.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_evaluation_result.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :get_evaluation_result, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_evaluation_run(request, options = nil) ⇒ ::Google::Cloud::Ces::V1beta::EvaluationRun #get_evaluation_run(name: nil) ⇒ ::Google::Cloud::Ces::V1beta::EvaluationRun

Gets details of the specified evaluation run.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::GetEvaluationRunRequest.new

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

# The returned object is of type Google::Cloud::Ces::V1beta::EvaluationRun.
p result

Overloads:

  • #get_evaluation_run(request, options = nil) ⇒ ::Google::Cloud::Ces::V1beta::EvaluationRun

    Pass arguments to get_evaluation_run via a request object, either of type GetEvaluationRunRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_evaluation_run(name: nil) ⇒ ::Google::Cloud::Ces::V1beta::EvaluationRun

    Pass arguments to get_evaluation_run 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:

    • name (::String) (defaults to: nil)

      Required. The resource name of the evaluation run to retrieve.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 1695

def get_evaluation_run request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_evaluation_run..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_evaluation_run.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_evaluation_run.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :get_evaluation_run, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_scheduled_evaluation_run(request, options = nil) ⇒ ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun #get_scheduled_evaluation_run(name: nil) ⇒ ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun

Gets details of the specified scheduled evaluation run.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest.new

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

# The returned object is of type Google::Cloud::Ces::V1beta::ScheduledEvaluationRun.
p result

Overloads:

  • #get_scheduled_evaluation_run(request, options = nil) ⇒ ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun

    Pass arguments to get_scheduled_evaluation_run via a request object, either of type GetScheduledEvaluationRunRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_scheduled_evaluation_run(name: nil) ⇒ ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun

    Pass arguments to get_scheduled_evaluation_run 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:

    • name (::String) (defaults to: nil)

      Required. The resource name of the scheduled evaluation run to retrieve.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 2790

def get_scheduled_evaluation_run request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_scheduled_evaluation_run..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_scheduled_evaluation_run.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_scheduled_evaluation_run.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :get_scheduled_evaluation_run, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#import_evaluations(request, options = nil) ⇒ ::Gapic::Operation #import_evaluations(conversation_list: nil, gcs_uri: nil, csv_content: nil, parent: nil, import_options: nil) ⇒ ::Gapic::Operation

Imports evaluations into the app.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::ImportEvaluationsRequest.new

# Call the import_evaluations method.
result = client.import_evaluations 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

Overloads:

  • #import_evaluations(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to import_evaluations via a request object, either of type ImportEvaluationsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #import_evaluations(conversation_list: nil, gcs_uri: nil, csv_content: nil, parent: nil, import_options: nil) ⇒ ::Gapic::Operation

    Pass arguments to import_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).

    Parameters:

    • conversation_list (::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest::ConversationList, ::Hash) (defaults to: nil)

      The conversations to import the evaluations from.

      Note: The following parameters are mutually exclusive: conversation_list, gcs_uri, csv_content. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.

    • gcs_uri (::String) (defaults to: nil)

      The Google Cloud Storage URI from which to import evaluations. The format of this URI must be gs://<bucket-name>/<object-name>.

      Note: The following parameters are mutually exclusive: gcs_uri, conversation_list, csv_content. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.

    • csv_content (::String) (defaults to: nil)

      Raw bytes representing the csv file with the evaluations structure.

      Note: The following parameters are mutually exclusive: csv_content, conversation_list, gcs_uri. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.

    • parent (::String) (defaults to: nil)

      Required. The app to import the evaluations into. Format: projects/{project}/locations/{location}/apps/{app}

    • import_options (::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest::ImportOptions, ::Hash) (defaults to: nil)

      Optional. Options governing the import process for the evaluations.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 717

def import_evaluations request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.import_evaluations..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.import_evaluations.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.import_evaluations.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :import_evaluations, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_evaluation_datasets(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationDataset> #list_evaluation_datasets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationDataset>

Lists all evaluation datasets in the given app.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest.new

# Call the list_evaluation_datasets method.
result = client.list_evaluation_datasets 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::Ces::V1beta::EvaluationDataset.
  p item
end

Overloads:

  • #list_evaluation_datasets(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationDataset>

    Pass arguments to list_evaluation_datasets via a request object, either of type ListEvaluationDatasetsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_evaluation_datasets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationDataset>

    Pass arguments to list_evaluation_datasets 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:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the app to list evaluation datasets from.

    • page_size (::Integer) (defaults to: nil)

      Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      Optional. The next_page_token value returned from a previous list EvaluationService.ListEvaluationDatasets call.

    • filter (::String) (defaults to: nil)

      Optional. Filter to be applied when listing the evaluation datasets. See https://google.aip.dev/160 for more details.

    • order_by (::String) (defaults to: nil)

      Optional. Field to sort by. Only "name" and "create_time", and "update_time" are supported. Time fields are ordered in descending order, and the name field is ordered in ascending order. If not included, "update_time" will be the default. See https://google.aip.dev/132#ordering for more details.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 2034

def list_evaluation_datasets request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_evaluation_datasets..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_evaluation_datasets.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_evaluation_datasets.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :list_evaluation_datasets, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @evaluation_service_stub, :list_evaluation_datasets, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_evaluation_expectations(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationExpectation> #list_evaluation_expectations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationExpectation>

Lists all evaluation expectations in the given app.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest.new

# Call the list_evaluation_expectations method.
result = client.list_evaluation_expectations 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::Ces::V1beta::EvaluationExpectation.
  p item
end

Overloads:

  • #list_evaluation_expectations(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationExpectation>

    Pass arguments to list_evaluation_expectations via a request object, either of type ListEvaluationExpectationsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_evaluation_expectations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationExpectation>

    Pass arguments to list_evaluation_expectations 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:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the app to list evaluation expectations from.

    • page_size (::Integer) (defaults to: nil)

      Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      Optional. The next_page_token value returned from a previous list EvaluationService.ListEvaluationExpectations call.

    • filter (::String) (defaults to: nil)

      Optional. Filter to be applied when listing the evaluation expectations. See https://google.aip.dev/160 for more details.

    • order_by (::String) (defaults to: nil)

      Optional. Field to sort by. Only "name" and "create_time", and "update_time" are supported. Time fields are ordered in descending order, and the name field is ordered in ascending order. If not included, "update_time" will be the default. See https://google.aip.dev/132#ordering for more details.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 2253

def list_evaluation_expectations request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_evaluation_expectations..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_evaluation_expectations.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_evaluation_expectations.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :list_evaluation_expectations, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @evaluation_service_stub, :list_evaluation_expectations, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_evaluation_results(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationResult> #list_evaluation_results(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationResult>

Lists all evaluation results for a given evaluation.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest.new

# Call the list_evaluation_results method.
result = client.list_evaluation_results 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::Ces::V1beta::EvaluationResult.
  p item
end

Overloads:

  • #list_evaluation_results(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationResult>

    Pass arguments to list_evaluation_results via a request object, either of type ListEvaluationResultsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_evaluation_results(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationResult>

    Pass arguments to list_evaluation_results 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:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the evaluation to list evaluation results from. To filter by evaluation run, use - as the evaluation ID and specify the evaluation run ID in the filter. For example: projects/{project}/locations/{location}/apps/{app}/evaluations/-

    • page_size (::Integer) (defaults to: nil)

      Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      Optional. The next_page_token value returned from a previous list EvaluationService.ListEvaluationResults call.

    • filter (::String) (defaults to: nil)

      Optional. Filter to be applied when listing the evaluation results. See https://google.aip.dev/160 for more details.

    • order_by (::String) (defaults to: nil)

      Optional. Field to sort by. Only "name" and "create_time", and "update_time" are supported. Time fields are ordered in descending order, and the name field is ordered in ascending order. If not included, "update_time" will be the default. See https://google.aip.dev/132#ordering for more details.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 1925

def list_evaluation_results request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_evaluation_results..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_evaluation_results.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_evaluation_results.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :list_evaluation_results, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @evaluation_service_stub, :list_evaluation_results, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_evaluation_runs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationRun> #list_evaluation_runs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationRun>

Lists all evaluation runs in the given app.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest.new

# Call the list_evaluation_runs method.
result = client.list_evaluation_runs 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::Ces::V1beta::EvaluationRun.
  p item
end

Overloads:

  • #list_evaluation_runs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationRun>

    Pass arguments to list_evaluation_runs via a request object, either of type ListEvaluationRunsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_evaluation_runs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationRun>

    Pass arguments to list_evaluation_runs 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:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the app to list evaluation runs from.

    • page_size (::Integer) (defaults to: nil)

      Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      Optional. The next_page_token value returned from a previous list EvaluationService.ListEvaluationRuns call.

    • filter (::String) (defaults to: nil)

      Optional. Filter to be applied when listing the evaluation runs. See https://google.aip.dev/160 for more details.

    • order_by (::String) (defaults to: nil)

      Optional. Field to sort by. Only "name" and "create_time", and "update_time" are supported. Time fields are ordered in descending order, and the name field is ordered in ascending order. If not included, "update_time" will be the default. See https://google.aip.dev/132#ordering for more details.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 2143

def list_evaluation_runs request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_evaluation_runs..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_evaluation_runs.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_evaluation_runs.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :list_evaluation_runs, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @evaluation_service_stub, :list_evaluation_runs, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_evaluations(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Evaluation> #list_evaluations(parent: nil, page_size: nil, page_token: nil, filter: nil, evaluation_filter: nil, evaluation_run_filter: nil, order_by: nil, last_ten_results: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Evaluation>

Lists all evaluations in the given app.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::ListEvaluationsRequest.new

# Call the list_evaluations method.
result = client.list_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::Ces::V1beta::Evaluation.
  p item
end

Overloads:

  • #list_evaluations(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Evaluation>

    Pass arguments to list_evaluations via a request object, either of type ListEvaluationsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::ListEvaluationsRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_evaluations(parent: nil, page_size: nil, page_token: nil, filter: nil, evaluation_filter: nil, evaluation_run_filter: nil, order_by: nil, last_ten_results: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::Evaluation>

    Pass arguments to list_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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the app to list evaluations from.

    • page_size (::Integer) (defaults to: nil)

      Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      Optional. The next_page_token value returned from a previous list EvaluationService.ListEvaluations call.

    • filter (::String) (defaults to: nil)

      Optional. Deprecated: Use evaluation_filter and evaluation_run_filter instead.

    • evaluation_filter (::String) (defaults to: nil)

      Optional. Filter to be applied on the evaluation when listing the evaluations. See https://google.aip.dev/160 for more details. Supported fields: evaluation_datasets

    • evaluation_run_filter (::String) (defaults to: nil)

      Optional. Filter string for fields on the associated EvaluationRun resources. See https://google.aip.dev/160 for more details. Supported fields: create_time, initiated_by, app_version_display_name

    • order_by (::String) (defaults to: nil)

      Optional. Field to sort by. Only "name" and "create_time", and "update_time" are supported. Time fields are ordered in descending order, and the name field is ordered in ascending order. If not included, "update_time" will be the default. See https://google.aip.dev/132#ordering for more details.

    • last_ten_results (::Boolean) (defaults to: nil)

      Optional. Whether to include the last 10 evaluation results for each evaluation in the response.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 1813

def list_evaluations request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListEvaluationsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_evaluations..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_evaluations.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_evaluations.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :list_evaluations, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @evaluation_service_stub, :list_evaluations, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_scheduled_evaluation_runs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun> #list_scheduled_evaluation_runs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun>

Lists all scheduled evaluation runs in the given app.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest.new

# Call the list_scheduled_evaluation_runs method.
result = client.list_scheduled_evaluation_runs 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::Ces::V1beta::ScheduledEvaluationRun.
  p item
end

Overloads:

  • #list_scheduled_evaluation_runs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun>

    Pass arguments to list_scheduled_evaluation_runs via a request object, either of type ListScheduledEvaluationRunsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_scheduled_evaluation_runs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun>

    Pass arguments to list_scheduled_evaluation_runs 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:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the app to list scheduled evaluation runs from.

    • page_size (::Integer) (defaults to: nil)

      Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      Optional. The next_page_token value returned from a previous list EvaluationService.ListScheduledEvaluationRuns call.

    • filter (::String) (defaults to: nil)

      Optional. Filter to be applied when listing the scheduled evaluation runs. See https://google.aip.dev/160 for more details. Currently supports filtering by:

      • request.evaluations:evaluation_id
      • request.evaluation_dataset:evaluation_dataset_id
    • order_by (::String) (defaults to: nil)

      Optional. Field to sort by. Supported fields are: "name" (ascending), "create_time" (descending), "update_time" (descending), "next_scheduled_execution" (ascending), and "last_completed_run.create_time" (descending). If not included, "update_time" will be the default. See https://google.aip.dev/132#ordering for more details.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 2902

def list_scheduled_evaluation_runs request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_scheduled_evaluation_runs..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_scheduled_evaluation_runs.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_scheduled_evaluation_runs.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :list_scheduled_evaluation_runs, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @evaluation_service_stub, :list_scheduled_evaluation_runs, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#loggerLogger

The logger used for request/response debug logging.

Returns:

  • (Logger)


215
216
217
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 215

def logger
  @evaluation_service_stub.logger
end

#run_evaluation(request, options = nil) ⇒ ::Gapic::Operation #run_evaluation(app: nil, evaluations: nil, evaluation_dataset: nil, display_name: nil, app_version: nil, config: nil, run_count: nil, persona_run_configs: nil, optimization_config: nil, scheduled_evaluation_run: nil, golden_run_method: nil, generate_latency_report: nil, evaluation_run_caching_settings: nil) ⇒ ::Gapic::Operation

Runs an evaluation of the app.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::RunEvaluationRequest.new

# Call the run_evaluation method.
result = client.run_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

Overloads:

  • #run_evaluation(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to run_evaluation via a request object, either of type RunEvaluationRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::RunEvaluationRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #run_evaluation(app: nil, evaluations: nil, evaluation_dataset: nil, display_name: nil, app_version: nil, config: nil, run_count: nil, persona_run_configs: nil, optimization_config: nil, scheduled_evaluation_run: nil, golden_run_method: nil, generate_latency_report: nil, evaluation_run_caching_settings: nil) ⇒ ::Gapic::Operation

    Pass arguments to run_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).

    Parameters:

    • app (::String) (defaults to: nil)

      Required. The app to evaluate. Format: projects/{project}/locations/{location}/apps/{app}

    • evaluations (::Array<::String>) (defaults to: nil)

      Optional. List of evaluations to run. Format: projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}

    • evaluation_dataset (::String) (defaults to: nil)

      Optional. An evaluation dataset to run. Format: projects/{project}/locations/{location}/apps/{app}/evaluationDatasets/{evaluationDataset}

    • display_name (::String) (defaults to: nil)

      Optional. The display name of the evaluation run.

    • app_version (::String) (defaults to: nil)

      Optional. The app version to evaluate. Format: projects/{project}/locations/{location}/apps/{app}/versions/{version}

    • config (::Google::Cloud::Ces::V1beta::EvaluationConfig, ::Hash) (defaults to: nil)

      Optional. The configuration to use for the run.

    • run_count (::Integer) (defaults to: nil)

      Optional. The number of times to run the evaluation. If not set, the default value is 1 per golden, and 5 per scenario.

    • persona_run_configs (::Array<::Google::Cloud::Ces::V1beta::PersonaRunConfig, ::Hash>) (defaults to: nil)

      Optional. The configuration to use for the run per persona.

    • optimization_config (::Google::Cloud::Ces::V1beta::OptimizationConfig, ::Hash) (defaults to: nil)

      Optional. Configuration for running the optimization step after the evaluation run. If not set, the optimization step will not be run.

    • scheduled_evaluation_run (::String) (defaults to: nil)

      Optional. The resource name of the ScheduledEvaluationRun that is triggering this evaluation run.

      If this field is set, the scheduled_evaluation_run field on the created EvaluationRun resource will be populated from this value. Format: projects/{project}/locations/{location}/apps/{app}/scheduledEvaluationRuns/{scheduled_evaluation_run}

    • golden_run_method (::Google::Cloud::Ces::V1beta::GoldenRunMethod) (defaults to: nil)

      Optional. The method to run the evaluation if it is a golden evaluation. If not set, default to STABLE.

    • generate_latency_report (::Boolean) (defaults to: nil)

      Optional. Whether to generate a latency report for the evaluation run.

    • evaluation_run_caching_settings (::Google::Cloud::Ces::V1beta::EvaluationRunCachingSettings, ::Hash) (defaults to: nil)

      Optional. The caching settings to use for the evaluation run.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 313

def run_evaluation request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RunEvaluationRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.run_evaluation..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.app
    header_params["app"] = request.app
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.run_evaluation.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.run_evaluation.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :run_evaluation, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#run_evaluation_result_metrics(request, options = nil) ⇒ ::Gapic::Operation #run_evaluation_result_metrics(evaluation_result_id: nil) ⇒ ::Gapic::Operation

Runs metrics on an existing evaluation result.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest.new

# Call the run_evaluation_result_metrics method.
result = client.run_evaluation_result_metrics 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

Overloads:

  • #run_evaluation_result_metrics(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to run_evaluation_result_metrics via a request object, either of type RunEvaluationResultMetricsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #run_evaluation_result_metrics(evaluation_result_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to run_evaluation_result_metrics 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:

    • evaluation_result_id (::String) (defaults to: nil)

      Required. The evaluation result to run metrics for. Format: projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}/results/{evaluation_result_id}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 3569

def run_evaluation_result_metrics request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.run_evaluation_result_metrics..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.evaluation_result_id
    header_params["evaluation_result_id"] = request.evaluation_result_id
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.run_evaluation_result_metrics.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.run_evaluation_result_metrics.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :run_evaluation_result_metrics, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#test_persona_voice(request, options = nil) ⇒ ::Google::Cloud::Ces::V1beta::TestPersonaVoiceResponse #test_persona_voice(app: nil, persona_id: nil, text: nil) ⇒ ::Google::Cloud::Ces::V1beta::TestPersonaVoiceResponse

Tests the voice of a persona. Also accepts a default persona.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest.new

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

# The returned object is of type Google::Cloud::Ces::V1beta::TestPersonaVoiceResponse.
p result

Overloads:

  • #test_persona_voice(request, options = nil) ⇒ ::Google::Cloud::Ces::V1beta::TestPersonaVoiceResponse

    Pass arguments to test_persona_voice via a request object, either of type TestPersonaVoiceRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #test_persona_voice(app: nil, persona_id: nil, text: nil) ⇒ ::Google::Cloud::Ces::V1beta::TestPersonaVoiceResponse

    Pass arguments to test_persona_voice 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:

    • app (::String) (defaults to: nil)

      Required. the resource name of the app to test the persona voice for. Format: projects/{project}/locations/{location}/apps/{app}

    • persona_id (::String) (defaults to: nil)

      Required. The persona ID to test the voice for. Also accepts "default".

    • text (::String) (defaults to: nil)

      Required. The text to test the voice for.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 3171

def test_persona_voice request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.test_persona_voice..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.app
    header_params["app"] = request.app
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.test_persona_voice.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.test_persona_voice.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :test_persona_voice, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#universe_domainString

The effective universe domain

Returns:

  • (String)


110
111
112
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 110

def universe_domain
  @evaluation_service_stub.universe_domain
end

#update_evaluation(request, options = nil) ⇒ ::Google::Cloud::Ces::V1beta::Evaluation #update_evaluation(evaluation: nil, update_mask: nil) ⇒ ::Google::Cloud::Ces::V1beta::Evaluation

Updates an evaluation.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::UpdateEvaluationRequest.new

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

# The returned object is of type Google::Cloud::Ces::V1beta::Evaluation.
p result

Overloads:

  • #update_evaluation(request, options = nil) ⇒ ::Google::Cloud::Ces::V1beta::Evaluation

    Pass arguments to update_evaluation via a request object, either of type UpdateEvaluationRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_evaluation(evaluation: nil, update_mask: nil) ⇒ ::Google::Cloud::Ces::V1beta::Evaluation

    Pass arguments to update_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).

    Parameters:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 900

def update_evaluation request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_evaluation..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.evaluation&.name
    header_params["evaluation.name"] = request.evaluation.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_evaluation.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_evaluation.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :update_evaluation, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_evaluation_dataset(request, options = nil) ⇒ ::Google::Cloud::Ces::V1beta::EvaluationDataset #update_evaluation_dataset(evaluation_dataset: nil, update_mask: nil) ⇒ ::Google::Cloud::Ces::V1beta::EvaluationDataset

Updates an evaluation dataset.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest.new

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

# The returned object is of type Google::Cloud::Ces::V1beta::EvaluationDataset.
p result

Overloads:

  • #update_evaluation_dataset(request, options = nil) ⇒ ::Google::Cloud::Ces::V1beta::EvaluationDataset

    Pass arguments to update_evaluation_dataset via a request object, either of type UpdateEvaluationDatasetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_evaluation_dataset(evaluation_dataset: nil, update_mask: nil) ⇒ ::Google::Cloud::Ces::V1beta::EvaluationDataset

    Pass arguments to update_evaluation_dataset 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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 988

def update_evaluation_dataset request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_evaluation_dataset..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.evaluation_dataset&.name
    header_params["evaluation_dataset.name"] = request.evaluation_dataset.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_evaluation_dataset.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_evaluation_dataset.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :update_evaluation_dataset, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_evaluation_expectation(request, options = nil) ⇒ ::Google::Cloud::Ces::V1beta::EvaluationExpectation #update_evaluation_expectation(evaluation_expectation: nil, update_mask: nil) ⇒ ::Google::Cloud::Ces::V1beta::EvaluationExpectation

Updates an evaluation expectation.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest.new

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

# The returned object is of type Google::Cloud::Ces::V1beta::EvaluationExpectation.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 2522

def update_evaluation_expectation request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_evaluation_expectation..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.evaluation_expectation&.name
    header_params["evaluation_expectation.name"] = request.evaluation_expectation.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_evaluation_expectation.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_evaluation_expectation.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :update_evaluation_expectation, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_scheduled_evaluation_run(request, options = nil) ⇒ ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun #update_scheduled_evaluation_run(scheduled_evaluation_run: nil, update_mask: nil) ⇒ ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun

Updates a scheduled evaluation run.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest.new

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

# The returned object is of type Google::Cloud::Ces::V1beta::ScheduledEvaluationRun.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 2992

def update_scheduled_evaluation_run request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_scheduled_evaluation_run..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.scheduled_evaluation_run&.name
    header_params["scheduled_evaluation_run.name"] = request.scheduled_evaluation_run.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_scheduled_evaluation_run.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_scheduled_evaluation_run.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :update_scheduled_evaluation_run, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#upload_evaluation_audio(request, options = nil) ⇒ ::Google::Cloud::Ces::V1beta::UploadEvaluationAudioResponse #upload_evaluation_audio(name: nil, audio_content: nil, previous_audio_gcs_uri: nil) ⇒ ::Google::Cloud::Ces::V1beta::UploadEvaluationAudioResponse

Uploads audio for use in Golden Evaluations. Stores the audio in the Cloud Storage bucket defined in 'App.logging_settings.evaluation_audio_recording_config.gcs_bucket' and returns a transcript.

Examples:

Basic example

require "google/cloud/ces/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Ces::V1beta::EvaluationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest.new

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

# The returned object is of type Google::Cloud::Ces::V1beta::UploadEvaluationAudioResponse.
p result

Overloads:

  • #upload_evaluation_audio(request, options = nil) ⇒ ::Google::Cloud::Ces::V1beta::UploadEvaluationAudioResponse

    Pass arguments to upload_evaluation_audio via a request object, either of type UploadEvaluationAudioRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #upload_evaluation_audio(name: nil, audio_content: nil, previous_audio_gcs_uri: nil) ⇒ ::Google::Cloud::Ces::V1beta::UploadEvaluationAudioResponse

    Pass arguments to upload_evaluation_audio 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:

    • name (::String) (defaults to: nil)

      Required. The resource name of the Evaluation for which to upload the evaluation audio. Format: projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}

    • audio_content (::String) (defaults to: nil)

      Required. The raw audio bytes. The format of the audio must be single-channel LINEAR16 with a sample rate of 16kHz (default InputAudioConfig).

    • previous_audio_gcs_uri (::String) (defaults to: nil)

      Optional. The Google Cloud Storage URI of the previously uploaded audio file to be deleted. Format: gs://<bucket-name>/<object-name>

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
# File 'lib/google/cloud/ces/v1beta/evaluation_service/client.rb', line 412

def upload_evaluation_audio request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.upload_evaluation_audio..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1beta::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.upload_evaluation_audio.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.upload_evaluation_audio.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @evaluation_service_stub.call_rpc :upload_evaluation_audio, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end