AI Platform Data Labeling Service V1beta1 API - Class Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client (v0.8.1)

Reference documentation and code samples for the AI Platform Data Labeling Service V1beta1 API class Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.

Client for the DataLabelingService service.

Service for the AI Platform Data Labeling API.

Inherits

  • Object

Methods

.configure

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

Configure the DataLabelingService Client class.

See Configuration for a description of the configuration fields.

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

#configure

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

Configure the DataLabelingService Client instance.

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

See Configuration for a description of the configuration fields.

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

#create_annotation_spec_set

def create_annotation_spec_set(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet
def create_annotation_spec_set(parent: nil, annotation_spec_set: nil) -> ::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet

Creates an annotation spec set by providing a set of labels.

Overloads
def create_annotation_spec_set(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet
Pass arguments to create_annotation_spec_set via a request object, either of type CreateAnnotationSpecSetRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::CreateAnnotationSpecSetRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_annotation_spec_set(parent: nil, annotation_spec_set: nil) -> ::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet
Pass arguments to create_annotation_spec_set 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) — Required. AnnotationSpecSet resource parent, format: projects/{project_id}
  • annotation_spec_set (::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet, ::Hash) — Required. Annotation spec set to create. Annotation specs must be included. Only one annotation spec will be accepted for annotation specs with same display_name.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::CreateAnnotationSpecSetRequest.new

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

# The returned object is of type Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet.
p result

#create_dataset

def create_dataset(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::Dataset
def create_dataset(parent: nil, dataset: nil) -> ::Google::Cloud::DataLabeling::V1beta1::Dataset

Creates dataset. If success return a Dataset resource.

Overloads
def create_dataset(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::Dataset
Pass arguments to create_dataset via a request object, either of type CreateDatasetRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::CreateDatasetRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_dataset(parent: nil, dataset: nil) -> ::Google::Cloud::DataLabeling::V1beta1::Dataset
Pass arguments to create_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
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::CreateDatasetRequest.new

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

# The returned object is of type Google::Cloud::DataLabeling::V1beta1::Dataset.
p result

#create_evaluation_job

def create_evaluation_job(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob
def create_evaluation_job(parent: nil, job: nil) -> ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob

Creates an evaluation job.

Overloads
def create_evaluation_job(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob
Pass arguments to create_evaluation_job via a request object, either of type CreateEvaluationJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::CreateEvaluationJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_evaluation_job(parent: nil, job: nil) -> ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob
Pass arguments to create_evaluation_job 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
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::CreateEvaluationJobRequest.new

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

# The returned object is of type Google::Cloud::DataLabeling::V1beta1::EvaluationJob.
p result

#create_instruction

def create_instruction(request, options = nil) -> ::Gapic::Operation
def create_instruction(parent: nil, instruction: nil) -> ::Gapic::Operation

Creates an instruction for how data should be labeled.

Overloads
def create_instruction(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_instruction via a request object, either of type CreateInstructionRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::CreateInstructionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_instruction(parent: nil, instruction: nil) -> ::Gapic::Operation
Pass arguments to create_instruction 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.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::CreateInstructionRequest.new

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

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

#delete_annotated_dataset

def delete_annotated_dataset(request, options = nil) -> ::Google::Protobuf::Empty
def delete_annotated_dataset(name: nil) -> ::Google::Protobuf::Empty

Deletes an annotated dataset by resource name.

Overloads
def delete_annotated_dataset(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_annotated_dataset via a request object, either of type Google::Cloud::DataLabeling::V1beta1::DeleteAnnotatedDatasetRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::DeleteAnnotatedDatasetRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_annotated_dataset(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_annotated_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).
Parameter
  • name (::String) — Required. Name of the annotated dataset to delete, format: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::DeleteAnnotatedDatasetRequest.new

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

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

#delete_annotation_spec_set

def delete_annotation_spec_set(request, options = nil) -> ::Google::Protobuf::Empty
def delete_annotation_spec_set(name: nil) -> ::Google::Protobuf::Empty

Deletes an annotation spec set by resource name.

Overloads
def delete_annotation_spec_set(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_annotation_spec_set via a request object, either of type Google::Cloud::DataLabeling::V1beta1::DeleteAnnotationSpecSetRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::DeleteAnnotationSpecSetRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_annotation_spec_set(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_annotation_spec_set via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. AnnotationSpec resource name, format: projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::DeleteAnnotationSpecSetRequest.new

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

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

#delete_dataset

def delete_dataset(request, options = nil) -> ::Google::Protobuf::Empty
def delete_dataset(name: nil) -> ::Google::Protobuf::Empty

Deletes a dataset by resource name.

Overloads
def delete_dataset(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_dataset via a request object, either of type Google::Cloud::DataLabeling::V1beta1::DeleteDatasetRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::DeleteDatasetRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_dataset(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_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).
Parameter
  • name (::String) — Required. Dataset resource name, format: projects/{project_id}/datasets/{dataset_id}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::DeleteDatasetRequest.new

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

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

#delete_evaluation_job

def delete_evaluation_job(request, options = nil) -> ::Google::Protobuf::Empty
def delete_evaluation_job(name: nil) -> ::Google::Protobuf::Empty

Stops and deletes an evaluation job.

Overloads
def delete_evaluation_job(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_evaluation_job via a request object, either of type Google::Cloud::DataLabeling::V1beta1::DeleteEvaluationJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::DeleteEvaluationJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_evaluation_job(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_evaluation_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. Name of the evaluation job that is going to be deleted. Format:

    "projects/{project_id}/evaluationJobs/{evaluation_job_id}"

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::DeleteEvaluationJobRequest.new

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

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

#delete_instruction

def delete_instruction(request, options = nil) -> ::Google::Protobuf::Empty
def delete_instruction(name: nil) -> ::Google::Protobuf::Empty

Deletes an instruction object by resource name.

Overloads
def delete_instruction(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_instruction via a request object, either of type Google::Cloud::DataLabeling::V1beta1::DeleteInstructionRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::DeleteInstructionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_instruction(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_instruction via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. Instruction resource name, format: projects/{project_id}/instructions/{instruction_id}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::DeleteInstructionRequest.new

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

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

#export_data

def export_data(request, options = nil) -> ::Gapic::Operation
def export_data(name: nil, annotated_dataset: nil, filter: nil, output_config: nil, user_email_address: nil) -> ::Gapic::Operation

Exports data and annotations from dataset.

Overloads
def export_data(request, options = nil) -> ::Gapic::Operation
Pass arguments to export_data via a request object, either of type ExportDataRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::ExportDataRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def export_data(name: nil, annotated_dataset: nil, filter: nil, output_config: nil, user_email_address: nil) -> ::Gapic::Operation
Pass arguments to export_data 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) — Required. Dataset resource name, format: projects/{project_id}/datasets/{dataset_id}
  • annotated_dataset (::String) — Required. Annotated dataset resource name. DataItem in Dataset and their annotations in specified annotated dataset will be exported. It's in format of projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id}
  • filter (::String) — Optional. Filter is not supported at this moment.
  • output_config (::Google::Cloud::DataLabeling::V1beta1::OutputConfig, ::Hash) — Required. Specify the output destination.
  • user_email_address (::String) — Email of the user who started the export task and should be notified by email. If empty no notification will be sent.
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.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::ExportDataRequest.new

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

#get_annotated_dataset

def get_annotated_dataset(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset
def get_annotated_dataset(name: nil) -> ::Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset

Gets an annotated dataset by resource name.

Overloads
def get_annotated_dataset(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset
Pass arguments to get_annotated_dataset via a request object, either of type GetAnnotatedDatasetRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::GetAnnotatedDatasetRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_annotated_dataset(name: nil) -> ::Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset
Pass arguments to get_annotated_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).
Parameter
  • name (::String) — Required. Name of the annotated dataset to get, format: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::GetAnnotatedDatasetRequest.new

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

# The returned object is of type Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset.
p result

#get_annotation_spec_set

def get_annotation_spec_set(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet
def get_annotation_spec_set(name: nil) -> ::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet

Gets an annotation spec set by resource name.

Overloads
def get_annotation_spec_set(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet
Pass arguments to get_annotation_spec_set via a request object, either of type GetAnnotationSpecSetRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::GetAnnotationSpecSetRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_annotation_spec_set(name: nil) -> ::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet
Pass arguments to get_annotation_spec_set via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. AnnotationSpecSet resource name, format: projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::GetAnnotationSpecSetRequest.new

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

# The returned object is of type Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet.
p result

#get_data_item

def get_data_item(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::DataItem
def get_data_item(name: nil) -> ::Google::Cloud::DataLabeling::V1beta1::DataItem

Gets a data item in a dataset by resource name. This API can be called after data are imported into dataset.

Overloads
def get_data_item(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::DataItem
Pass arguments to get_data_item via a request object, either of type GetDataItemRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::GetDataItemRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_data_item(name: nil) -> ::Google::Cloud::DataLabeling::V1beta1::DataItem
Pass arguments to get_data_item via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the data item to get, format: projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::GetDataItemRequest.new

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

# The returned object is of type Google::Cloud::DataLabeling::V1beta1::DataItem.
p result

#get_dataset

def get_dataset(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::Dataset
def get_dataset(name: nil) -> ::Google::Cloud::DataLabeling::V1beta1::Dataset

Gets dataset by resource name.

Overloads
def get_dataset(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::Dataset
Pass arguments to get_dataset via a request object, either of type GetDatasetRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::GetDatasetRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_dataset(name: nil) -> ::Google::Cloud::DataLabeling::V1beta1::Dataset
Pass arguments to get_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).
Parameter
  • name (::String) — Required. Dataset resource name, format: projects/{project_id}/datasets/{dataset_id}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::GetDatasetRequest.new

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

# The returned object is of type Google::Cloud::DataLabeling::V1beta1::Dataset.
p result

#get_evaluation

def get_evaluation(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::Evaluation
def get_evaluation(name: nil) -> ::Google::Cloud::DataLabeling::V1beta1::Evaluation

Gets an evaluation by resource name (to search, use projects.evaluations.search).

Overloads
def get_evaluation(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::Evaluation
Pass arguments to get_evaluation via a request object, either of type GetEvaluationRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_evaluation(name: nil) -> ::Google::Cloud::DataLabeling::V1beta1::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).
Parameter
  • name (::String) — Required. Name of the evaluation. Format:

    "projects/{project_id}/datasets/{dataset_id}/evaluations/{evaluation_id}'

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

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

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

# The returned object is of type Google::Cloud::DataLabeling::V1beta1::Evaluation.
p result

#get_evaluation_job

def get_evaluation_job(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob
def get_evaluation_job(name: nil) -> ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob

Gets an evaluation job by resource name.

Overloads
def get_evaluation_job(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob
Pass arguments to get_evaluation_job via a request object, either of type GetEvaluationJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::GetEvaluationJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_evaluation_job(name: nil) -> ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob
Pass arguments to get_evaluation_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. Name of the evaluation job. Format:

    "projects/{project_id}/evaluationJobs/{evaluation_job_id}"

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::GetEvaluationJobRequest.new

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

# The returned object is of type Google::Cloud::DataLabeling::V1beta1::EvaluationJob.
p result

#get_example

def get_example(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::Example
def get_example(name: nil, filter: nil) -> ::Google::Cloud::DataLabeling::V1beta1::Example

Gets an example by resource name, including both data and annotation.

Overloads
def get_example(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::Example
Pass arguments to get_example via a request object, either of type GetExampleRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::GetExampleRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_example(name: nil, filter: nil) -> ::Google::Cloud::DataLabeling::V1beta1::Example
Pass arguments to get_example 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) — Required. Name of example, format: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id}/examples/{example_id}
  • filter (::String) — Optional. An expression for filtering Examples. Filter by annotation_spec.display_name is supported. Format "annotation_spec.display_name = {display_name}"
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::GetExampleRequest.new

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

# The returned object is of type Google::Cloud::DataLabeling::V1beta1::Example.
p result

#get_instruction

def get_instruction(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::Instruction
def get_instruction(name: nil) -> ::Google::Cloud::DataLabeling::V1beta1::Instruction

Gets an instruction by resource name.

Overloads
def get_instruction(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::Instruction
Pass arguments to get_instruction via a request object, either of type GetInstructionRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::GetInstructionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_instruction(name: nil) -> ::Google::Cloud::DataLabeling::V1beta1::Instruction
Pass arguments to get_instruction via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. Instruction resource name, format: projects/{project_id}/instructions/{instruction_id}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::GetInstructionRequest.new

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

# The returned object is of type Google::Cloud::DataLabeling::V1beta1::Instruction.
p result

#import_data

def import_data(request, options = nil) -> ::Gapic::Operation
def import_data(name: nil, input_config: nil, user_email_address: nil) -> ::Gapic::Operation

Imports data into dataset based on source locations defined in request. It can be called multiple times for the same dataset. Each dataset can only have one long running operation running on it. For example, no labeling task (also long running operation) can be started while importing is still ongoing. Vice versa.

Overloads
def import_data(request, options = nil) -> ::Gapic::Operation
Pass arguments to import_data via a request object, either of type ImportDataRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::ImportDataRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def import_data(name: nil, input_config: nil, user_email_address: nil) -> ::Gapic::Operation
Pass arguments to import_data 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) — Required. Dataset resource name, format: projects/{project_id}/datasets/{dataset_id}
  • input_config (::Google::Cloud::DataLabeling::V1beta1::InputConfig, ::Hash) — Required. Specify the input source of the data.
  • user_email_address (::String) — Email of the user who started the import task and should be notified by email. If empty no notification will be sent.
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.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::ImportDataRequest.new

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

#initialize

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

Create a new DataLabelingService client object.

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

# Create a client using a custom configuration
client = ::Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new do |config|
  config.timeout = 10.0
end

#label_image

def label_image(request, options = nil) -> ::Gapic::Operation
def label_image(image_classification_config: nil, bounding_poly_config: nil, polyline_config: nil, segmentation_config: nil, parent: nil, basic_config: nil, feature: nil) -> ::Gapic::Operation

Starts a labeling task for image. The type of image labeling task is configured by feature in the request.

Overloads
def label_image(request, options = nil) -> ::Gapic::Operation
Pass arguments to label_image via a request object, either of type LabelImageRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::LabelImageRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def label_image(image_classification_config: nil, bounding_poly_config: nil, polyline_config: nil, segmentation_config: nil, parent: nil, basic_config: nil, feature: nil) -> ::Gapic::Operation
Pass arguments to label_image 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.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::LabelImageRequest.new

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

#label_text

def label_text(request, options = nil) -> ::Gapic::Operation
def label_text(text_classification_config: nil, text_entity_extraction_config: nil, parent: nil, basic_config: nil, feature: nil) -> ::Gapic::Operation

Starts a labeling task for text. The type of text labeling task is configured by feature in the request.

Overloads
def label_text(request, options = nil) -> ::Gapic::Operation
Pass arguments to label_text via a request object, either of type LabelTextRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::LabelTextRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def label_text(text_classification_config: nil, text_entity_extraction_config: nil, parent: nil, basic_config: nil, feature: nil) -> ::Gapic::Operation
Pass arguments to label_text 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.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::LabelTextRequest.new

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

#label_video

def label_video(request, options = nil) -> ::Gapic::Operation
def label_video(video_classification_config: nil, object_detection_config: nil, object_tracking_config: nil, event_config: nil, parent: nil, basic_config: nil, feature: nil) -> ::Gapic::Operation

Starts a labeling task for video. The type of video labeling task is configured by feature in the request.

Overloads
def label_video(request, options = nil) -> ::Gapic::Operation
Pass arguments to label_video via a request object, either of type LabelVideoRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::LabelVideoRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def label_video(video_classification_config: nil, object_detection_config: nil, object_tracking_config: nil, event_config: nil, parent: nil, basic_config: nil, feature: nil) -> ::Gapic::Operation
Pass arguments to label_video 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.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::LabelVideoRequest.new

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

#list_annotated_datasets

def list_annotated_datasets(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset>
def list_annotated_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset>

Lists annotated datasets for a dataset. Pagination is supported.

Overloads
def list_annotated_datasets(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset>
Pass arguments to list_annotated_datasets via a request object, either of type ListAnnotatedDatasetsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::ListAnnotatedDatasetsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_annotated_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset>
Pass arguments to list_annotated_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) — Required. Name of the dataset to list annotated datasets, format: projects/{project_id}/datasets/{dataset_id}
  • filter (::String) — Optional. Filter is not supported at this moment.
  • page_size (::Integer) — Optional. Requested page size. Server may return fewer results than requested. Default value is 100.
  • page_token (::String) — Optional. A token identifying a page of results for the server to return. Typically obtained by ListAnnotatedDatasetsResponse.next_page_token of the previous [DataLabelingService.ListAnnotatedDatasets] call. Return first page if empty.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::ListAnnotatedDatasetsRequest.new

# Call the list_annotated_datasets method.
result = client.list_annotated_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::DataLabeling::V1beta1::AnnotatedDataset.
  p item
end

#list_annotation_spec_sets

def list_annotation_spec_sets(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet>
def list_annotation_spec_sets(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet>

Lists annotation spec sets for a project. Pagination is supported.

Overloads
def list_annotation_spec_sets(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet>
Pass arguments to list_annotation_spec_sets via a request object, either of type ListAnnotationSpecSetsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::ListAnnotationSpecSetsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_annotation_spec_sets(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet>
Pass arguments to list_annotation_spec_sets 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) — Required. Parent of AnnotationSpecSet resource, format: projects/{project_id}
  • filter (::String) — Optional. Filter is not supported at this moment.
  • page_size (::Integer) — Optional. Requested page size. Server may return fewer results than requested. Default value is 100.
  • page_token (::String) — Optional. A token identifying a page of results for the server to return. Typically obtained by ListAnnotationSpecSetsResponse.next_page_token of the previous [DataLabelingService.ListAnnotationSpecSets] call. Return first page if empty.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::ListAnnotationSpecSetsRequest.new

# Call the list_annotation_spec_sets method.
result = client.list_annotation_spec_sets 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::DataLabeling::V1beta1::AnnotationSpecSet.
  p item
end

#list_data_items

def list_data_items(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::DataItem>
def list_data_items(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::DataItem>

Lists data items in a dataset. This API can be called after data are imported into dataset. Pagination is supported.

Overloads
def list_data_items(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::DataItem>
Pass arguments to list_data_items via a request object, either of type ListDataItemsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::ListDataItemsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_data_items(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::DataItem>
Pass arguments to list_data_items 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) — Required. Name of the dataset to list data items, format: projects/{project_id}/datasets/{dataset_id}
  • filter (::String) — Optional. Filter is not supported at this moment.
  • page_size (::Integer) — Optional. Requested page size. Server may return fewer results than requested. Default value is 100.
  • page_token (::String) — Optional. A token identifying a page of results for the server to return. Typically obtained by ListDataItemsResponse.next_page_token of the previous [DataLabelingService.ListDataItems] call. Return first page if empty.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::ListDataItemsRequest.new

# Call the list_data_items method.
result = client.list_data_items 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::DataLabeling::V1beta1::DataItem.
  p item
end

#list_datasets

def list_datasets(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Dataset>
def list_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Dataset>

Lists datasets under a project. Pagination is supported.

Overloads
def list_datasets(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Dataset>
Pass arguments to list_datasets via a request object, either of type ListDatasetsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::ListDatasetsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Dataset>
Pass arguments to list_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) — Required. Dataset resource parent, format: projects/{project_id}
  • filter (::String) — Optional. Filter on dataset is not supported at this moment.
  • page_size (::Integer) — Optional. Requested page size. Server may return fewer results than requested. Default value is 100.
  • page_token (::String) — Optional. A token identifying a page of results for the server to return. Typically obtained by ListDatasetsResponse.next_page_token of the previous [DataLabelingService.ListDatasets] call. Returns the first page if empty.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::ListDatasetsRequest.new

# Call the list_datasets method.
result = client.list_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::DataLabeling::V1beta1::Dataset.
  p item
end

#list_evaluation_jobs

def list_evaluation_jobs(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::EvaluationJob>
def list_evaluation_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::EvaluationJob>

Lists all evaluation jobs within a project with possible filters. Pagination is supported.

Overloads
def list_evaluation_jobs(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::EvaluationJob>
Pass arguments to list_evaluation_jobs via a request object, either of type ListEvaluationJobsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::ListEvaluationJobsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_evaluation_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::EvaluationJob>
Pass arguments to list_evaluation_jobs 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) — Required. Evaluation job resource parent. Format: "projects/{project_id}"
  • filter (::String) — Optional. You can filter the jobs to list by model_id (also known as model_name, as described in EvaluationJob.modelVersion) or by evaluation job state (as described in EvaluationJob.state). To filter by both criteria, use the AND operator or the OR operator. For example, you can use the following string for your filter: "evaluationjob.model_id = {model_name} AND evaluationjob.state = {evaluation_job_state}"
  • page_size (::Integer) — Optional. Requested page size. Server may return fewer results than requested. Default value is 100.
  • page_token (::String) — Optional. A token identifying a page of results for the server to return. Typically obtained by the nextPageToken in the response to the previous request. The request returns the first page if this is empty.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::ListEvaluationJobsRequest.new

# Call the list_evaluation_jobs method.
result = client.list_evaluation_jobs 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::DataLabeling::V1beta1::EvaluationJob.
  p item
end

#list_examples

def list_examples(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Example>
def list_examples(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Example>

Lists examples in an annotated dataset. Pagination is supported.

Overloads
def list_examples(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Example>
Pass arguments to list_examples via a request object, either of type ListExamplesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::ListExamplesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_examples(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Example>
Pass arguments to list_examples 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) — Required. Example resource parent.
  • filter (::String) — Optional. An expression for filtering Examples. For annotated datasets that have annotation spec set, filter by annotation_spec.display_name is supported. Format "annotation_spec.display_name = {display_name}"
  • page_size (::Integer) — Optional. Requested page size. Server may return fewer results than requested. Default value is 100.
  • page_token (::String) — Optional. A token identifying a page of results for the server to return. Typically obtained by ListExamplesResponse.next_page_token of the previous [DataLabelingService.ListExamples] call. Return first page if empty.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::ListExamplesRequest.new

# Call the list_examples method.
result = client.list_examples 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::DataLabeling::V1beta1::Example.
  p item
end

#list_instructions

def list_instructions(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Instruction>
def list_instructions(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Instruction>

Lists instructions for a project. Pagination is supported.

Overloads
def list_instructions(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Instruction>
Pass arguments to list_instructions via a request object, either of type ListInstructionsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::ListInstructionsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_instructions(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Instruction>
Pass arguments to list_instructions 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) — Required. Instruction resource parent, format: projects/{project_id}
  • filter (::String) — Optional. Filter is not supported at this moment.
  • page_size (::Integer) — Optional. Requested page size. Server may return fewer results than requested. Default value is 100.
  • page_token (::String) — Optional. A token identifying a page of results for the server to return. Typically obtained by ListInstructionsResponse.next_page_token of the previous [DataLabelingService.ListInstructions] call. Return first page if empty.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::ListInstructionsRequest.new

# Call the list_instructions method.
result = client.list_instructions 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::DataLabeling::V1beta1::Instruction.
  p item
end

#operations_client

def operations_client() -> ::Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Operations

Get the associated client for long-running operations.

#pause_evaluation_job

def pause_evaluation_job(request, options = nil) -> ::Google::Protobuf::Empty
def pause_evaluation_job(name: nil) -> ::Google::Protobuf::Empty

Pauses an evaluation job. Pausing an evaluation job that is already in a PAUSED state is a no-op.

Overloads
def pause_evaluation_job(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to pause_evaluation_job via a request object, either of type PauseEvaluationJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::PauseEvaluationJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def pause_evaluation_job(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to pause_evaluation_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. Name of the evaluation job that is going to be paused. Format:

    "projects/{project_id}/evaluationJobs/{evaluation_job_id}"

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::PauseEvaluationJobRequest.new

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

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

#resume_evaluation_job

def resume_evaluation_job(request, options = nil) -> ::Google::Protobuf::Empty
def resume_evaluation_job(name: nil) -> ::Google::Protobuf::Empty

Resumes a paused evaluation job. A deleted evaluation job can't be resumed. Resuming a running or scheduled evaluation job is a no-op.

Overloads
def resume_evaluation_job(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to resume_evaluation_job via a request object, either of type ResumeEvaluationJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::ResumeEvaluationJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def resume_evaluation_job(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to resume_evaluation_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. Name of the evaluation job that is going to be resumed. Format:

    "projects/{project_id}/evaluationJobs/{evaluation_job_id}"

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::ResumeEvaluationJobRequest.new

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

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

#search_evaluations

def search_evaluations(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Evaluation>
def search_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Evaluation>

Searches evaluations within a project.

Overloads
def search_evaluations(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Evaluation>
Pass arguments to search_evaluations via a request object, either of type SearchEvaluationsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::SearchEvaluationsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def search_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Evaluation>
Pass arguments to search_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) — Required. Evaluation search parent (project ID). Format: "projects/{project_id}"
  • filter (::String) — Optional. To search evaluations, you can filter by the following:

    To filter by multiple critiera, use the AND operator or the OR operator. The following examples shows a string that filters by several critiera:

    "evaluationjob.evaluation_job_id = {evaluation_job_id} AND evaluationjob.model_id = {model_name} AND evaluationjob.evaluation_job_run_time_start = {timestamp_1} AND evaluationjob.evaluation_job_run_time_end = {timestamp_2} AND annotation_spec.display_name = {display_name}"

  • page_size (::Integer) — Optional. Requested page size. Server may return fewer results than requested. Default value is 100.
  • page_token (::String) — Optional. A token identifying a page of results for the server to return. Typically obtained by the nextPageToken of the response to a previous search request.

    If you don't specify this field, the API call requests the first page of the search.

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::SearchEvaluationsRequest.new

# Call the search_evaluations method.
result = client.search_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::DataLabeling::V1beta1::Evaluation.
  p item
end

#search_example_comparisons

def search_example_comparisons(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::SearchExampleComparisonsResponse::ExampleComparison>
def search_example_comparisons(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::SearchExampleComparisonsResponse::ExampleComparison>

Searches example comparisons from an evaluation. The return format is a list of example comparisons that show ground truth and prediction(s) for a single input. Search by providing an evaluation ID.

Overloads
def search_example_comparisons(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::SearchExampleComparisonsResponse::ExampleComparison>
Pass arguments to search_example_comparisons via a request object, either of type SearchExampleComparisonsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::SearchExampleComparisonsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def search_example_comparisons(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::SearchExampleComparisonsResponse::ExampleComparison>
Pass arguments to search_example_comparisons 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) — Required. Name of the Evaluation resource to search for example comparisons from. Format:

    "projects/{project_id}/datasets/{dataset_id}/evaluations/{evaluation_id}"

  • page_size (::Integer) — Optional. Requested page size. Server may return fewer results than requested. Default value is 100.
  • page_token (::String) — Optional. A token identifying a page of results for the server to return. Typically obtained by the [nextPageToken][SearchExampleComparisons.next_page_token] of the response to a previous search rquest.

    If you don't specify this field, the API call requests the first page of the search.

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::SearchExampleComparisonsRequest.new

# Call the search_example_comparisons method.
result = client.search_example_comparisons 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::DataLabeling::V1beta1::SearchExampleComparisonsResponse::ExampleComparison.
  p item
end

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)

#update_evaluation_job

def update_evaluation_job(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob
def update_evaluation_job(evaluation_job: nil, update_mask: nil) -> ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob

Updates an evaluation job. You can only update certain fields of the job's EvaluationJobConfig: humanAnnotationConfig.instruction, exampleCount, and exampleSamplePercentage.

If you want to change any other aspect of the evaluation job, you must delete the job and create a new one.

Overloads
def update_evaluation_job(request, options = nil) -> ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob
Pass arguments to update_evaluation_job via a request object, either of type UpdateEvaluationJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataLabeling::V1beta1::UpdateEvaluationJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_evaluation_job(evaluation_job: nil, update_mask: nil) -> ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob
Pass arguments to update_evaluation_job 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_job (::Google::Cloud::DataLabeling::V1beta1::EvaluationJob, ::Hash) — Required. Evaluation job that is going to be updated.
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. Mask for which fields to update. You can only provide the following fields:

    • evaluationJobConfig.humanAnnotationConfig.instruction
    • evaluationJobConfig.exampleCount
    • evaluationJobConfig.exampleSamplePercentage

    You can provide more than one of these fields by separating them with commas.

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_labeling/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataLabeling::V1beta1::UpdateEvaluationJobRequest.new

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

# The returned object is of type Google::Cloud::DataLabeling::V1beta1::EvaluationJob.
p result