Service for the AI Platform Data Labeling API. v1beta1
Package
@google-cloud/datalabeling
Constructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
Construct an instance of DataLabelingServiceClient.
Parameters
Name | Description |
opts |
ClientOptions
|
gaxInstance |
typeof gax | typeof gax.fallback
: loaded instance of google-gax . Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: ``` const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new DataLabelingServiceClient({fallback: 'rest'}, gax); ```
|
Properties
apiEndpoint
static get apiEndpoint(): string;
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
auth
dataLabelingServiceStub
dataLabelingServiceStub?: Promise<{
[name: string]: Function;
}>;
descriptors
descriptors: Descriptors;
innerApiCalls
innerApiCalls: {
[name: string]: Function;
};
operationsClient
operationsClient: gax.OperationsClient;
pathTemplates
pathTemplates: {
[name: string]: gax.PathTemplate;
};
port
static get port(): number;
The port for this API service.
scopes
static get scopes(): string[];
The scopes needed to make gRPC calls for every method defined in this service.
servicePath
static get servicePath(): string;
The DNS address for this API service.
warn
warn: (code: string, message: string, warnType?: string) => void;
Methods
annotatedDatasetPath(project, dataset, annotatedDataset)
annotatedDatasetPath(project: string, dataset: string, annotatedDataset: string): string;
Return a fully-qualified annotatedDataset resource name string.
Parameters
Name | Description |
project |
string
|
dataset |
string
|
annotatedDataset |
string
|
Returns
Type | Description |
string | {string} Resource name string.
|
annotationSpecSetPath(project, annotationSpecSet)
annotationSpecSetPath(project: string, annotationSpecSet: string): string;
Return a fully-qualified annotationSpecSet resource name string.
Parameters
Name | Description |
project |
string
|
annotationSpecSet |
string
|
Returns
Type | Description |
string | {string} Resource name string.
|
checkCreateInstructionProgress(name)
checkCreateInstructionProgress(name: string): Promise<LROperation<protos.google.cloud.datalabeling.v1beta1.Instruction, protos.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata>>;
Check the status of the long running operation returned by createInstruction()
.
Parameter
Name | Description |
name |
string
The operation name that will be passed.
|
Returns
Type | Description |
Promise<LROperation<protos.google.cloud.datalabeling.v1beta1.Instruction, protos.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Instruction resource parent, format:
* projects/{project_id}
*/
// const parent = 'abc123'
/**
* Required. Instruction of how to perform the labeling task.
*/
// const instruction = {}
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callCreateInstruction() {
// Construct request
const request = {
parent,
instruction,
};
// Run request
const [operation] = await datalabelingClient.createInstruction(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateInstruction();
checkExportDataProgress(name)
checkExportDataProgress(name: string): Promise<LROperation<protos.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse, protos.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata>>;
Check the status of the long running operation returned by exportData()
.
Parameter
Name | Description |
name |
string
The operation name that will be passed.
|
Returns
Type | Description |
Promise<LROperation<protos.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse, protos.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Dataset resource name, format:
* projects/{project_id}/datasets/{dataset_id}
*/
// const name = 'abc123'
/**
* 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}
*/
// const annotatedDataset = 'abc123'
/**
* Optional. Filter is not supported at this moment.
*/
// const filter = 'abc123'
/**
* Required. Specify the output destination.
*/
// const outputConfig = {}
/**
* Email of the user who started the export task and should be notified by
* email. If empty no notification will be sent.
*/
// const userEmailAddress = 'abc123'
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callExportData() {
// Construct request
const request = {
name,
annotatedDataset,
outputConfig,
};
// Run request
const [operation] = await datalabelingClient.exportData(request);
const [response] = await operation.promise();
console.log(response);
}
callExportData();
checkImportDataProgress(name)
checkImportDataProgress(name: string): Promise<LROperation<protos.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse, protos.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata>>;
Check the status of the long running operation returned by importData()
.
Parameter
Name | Description |
name |
string
The operation name that will be passed.
|
Returns
Type | Description |
Promise<LROperation<protos.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse, protos.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Dataset resource name, format:
* projects/{project_id}/datasets/{dataset_id}
*/
// const name = 'abc123'
/**
* Required. Specify the input source of the data.
*/
// const inputConfig = {}
/**
* Email of the user who started the import task and should be notified by
* email. If empty no notification will be sent.
*/
// const userEmailAddress = 'abc123'
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callImportData() {
// Construct request
const request = {
name,
inputConfig,
};
// Run request
const [operation] = await datalabelingClient.importData(request);
const [response] = await operation.promise();
console.log(response);
}
callImportData();
checkLabelImageProgress(name)
checkLabelImageProgress(name: string): Promise<LROperation<protos.google.cloud.datalabeling.v1beta1.AnnotatedDataset, protos.google.cloud.datalabeling.v1beta1.LabelOperationMetadata>>;
Check the status of the long running operation returned by labelImage()
.
Parameter
Name | Description |
name |
string
The operation name that will be passed.
|
Returns
Type | Description |
Promise<LROperation<protos.google.cloud.datalabeling.v1beta1.AnnotatedDataset, protos.google.cloud.datalabeling.v1beta1.LabelOperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Configuration for image classification task.
* One of image_classification_config, bounding_poly_config,
* polyline_config and segmentation_config are required.
*/
// const imageClassificationConfig = {}
/**
* Configuration for bounding box and bounding poly task.
* One of image_classification_config, bounding_poly_config,
* polyline_config and segmentation_config are required.
*/
// const boundingPolyConfig = {}
/**
* Configuration for polyline task.
* One of image_classification_config, bounding_poly_config,
* polyline_config and segmentation_config are required.
*/
// const polylineConfig = {}
/**
* Configuration for segmentation task.
* One of image_classification_config, bounding_poly_config,
* polyline_config and segmentation_config are required.
*/
// const segmentationConfig = {}
/**
* Required. Name of the dataset to request labeling task, format:
* projects/{project_id}/datasets/{dataset_id}
*/
// const parent = 'abc123'
/**
* Required. Basic human annotation config.
*/
// const basicConfig = {}
/**
* Required. The type of image labeling task.
*/
// const feature = {}
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callLabelImage() {
// Construct request
const request = {
parent,
basicConfig,
feature,
};
// Run request
const [operation] = await datalabelingClient.labelImage(request);
const [response] = await operation.promise();
console.log(response);
}
callLabelImage();
checkLabelTextProgress(name)
checkLabelTextProgress(name: string): Promise<LROperation<protos.google.cloud.datalabeling.v1beta1.AnnotatedDataset, protos.google.cloud.datalabeling.v1beta1.LabelOperationMetadata>>;
Check the status of the long running operation returned by labelText()
.
Parameter
Name | Description |
name |
string
The operation name that will be passed.
|
Returns
Type | Description |
Promise<LROperation<protos.google.cloud.datalabeling.v1beta1.AnnotatedDataset, protos.google.cloud.datalabeling.v1beta1.LabelOperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Configuration for text classification task.
* One of text_classification_config and text_entity_extraction_config
* is required.
*/
// const textClassificationConfig = {}
/**
* Configuration for entity extraction task.
* One of text_classification_config and text_entity_extraction_config
* is required.
*/
// const textEntityExtractionConfig = {}
/**
* Required. Name of the data set to request labeling task, format:
* projects/{project_id}/datasets/{dataset_id}
*/
// const parent = 'abc123'
/**
* Required. Basic human annotation config.
*/
// const basicConfig = {}
/**
* Required. The type of text labeling task.
*/
// const feature = {}
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callLabelText() {
// Construct request
const request = {
parent,
basicConfig,
feature,
};
// Run request
const [operation] = await datalabelingClient.labelText(request);
const [response] = await operation.promise();
console.log(response);
}
callLabelText();
checkLabelVideoProgress(name)
checkLabelVideoProgress(name: string): Promise<LROperation<protos.google.cloud.datalabeling.v1beta1.AnnotatedDataset, protos.google.cloud.datalabeling.v1beta1.LabelOperationMetadata>>;
Check the status of the long running operation returned by labelVideo()
.
Parameter
Name | Description |
name |
string
The operation name that will be passed.
|
Returns
Type | Description |
Promise<LROperation<protos.google.cloud.datalabeling.v1beta1.AnnotatedDataset, protos.google.cloud.datalabeling.v1beta1.LabelOperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Configuration for video classification task.
* One of video_classification_config, object_detection_config,
* object_tracking_config and event_config is required.
*/
// const videoClassificationConfig = {}
/**
* Configuration for video object detection task.
* One of video_classification_config, object_detection_config,
* object_tracking_config and event_config is required.
*/
// const objectDetectionConfig = {}
/**
* Configuration for video object tracking task.
* One of video_classification_config, object_detection_config,
* object_tracking_config and event_config is required.
*/
// const objectTrackingConfig = {}
/**
* Configuration for video event task.
* One of video_classification_config, object_detection_config,
* object_tracking_config and event_config is required.
*/
// const eventConfig = {}
/**
* Required. Name of the dataset to request labeling task, format:
* projects/{project_id}/datasets/{dataset_id}
*/
// const parent = 'abc123'
/**
* Required. Basic human annotation config.
*/
// const basicConfig = {}
/**
* Required. The type of video labeling task.
*/
// const feature = {}
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callLabelVideo() {
// Construct request
const request = {
parent,
basicConfig,
feature,
};
// Run request
const [operation] = await datalabelingClient.labelVideo(request);
const [response] = await operation.promise();
console.log(response);
}
callLabelVideo();
close()
Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
Returns
Type | Description |
Promise<void> | {Promise} A promise that resolves when the client is closed.
|
createAnnotationSpecSet(request, options)
createAnnotationSpecSet(request?: protos.google.cloud.datalabeling.v1beta1.ICreateAnnotationSpecSetRequest, options?: CallOptions): Promise<[
protos.google.cloud.datalabeling.v1beta1.IAnnotationSpecSet,
(protos.google.cloud.datalabeling.v1beta1.ICreateAnnotationSpecSetRequest | undefined),
{} | undefined
]>;
Creates an annotation spec set by providing a set of labels.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.ICreateAnnotationSpecSetRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.cloud.datalabeling.v1beta1.IAnnotationSpecSet,
(protos.google.cloud.datalabeling.v1beta1.ICreateAnnotationSpecSetRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [AnnotationSpecSet]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. AnnotationSpecSet resource parent, format:
* projects/{project_id}
*/
// const parent = 'abc123'
/**
* 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.
*/
// const annotationSpecSet = {}
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callCreateAnnotationSpecSet() {
// Construct request
const request = {
parent,
annotationSpecSet,
};
// Run request
const response = await datalabelingClient.createAnnotationSpecSet(request);
console.log(response);
}
callCreateAnnotationSpecSet();
createAnnotationSpecSet(request, options, callback)
createAnnotationSpecSet(request: protos.google.cloud.datalabeling.v1beta1.ICreateAnnotationSpecSetRequest, options: CallOptions, callback: Callback<protos.google.cloud.datalabeling.v1beta1.IAnnotationSpecSet, protos.google.cloud.datalabeling.v1beta1.ICreateAnnotationSpecSetRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.ICreateAnnotationSpecSetRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.datalabeling.v1beta1.IAnnotationSpecSet, protos.google.cloud.datalabeling.v1beta1.ICreateAnnotationSpecSetRequest | null | undefined, {} | null | undefined>
|
Returns
createAnnotationSpecSet(request, callback)
createAnnotationSpecSet(request: protos.google.cloud.datalabeling.v1beta1.ICreateAnnotationSpecSetRequest, callback: Callback<protos.google.cloud.datalabeling.v1beta1.IAnnotationSpecSet, protos.google.cloud.datalabeling.v1beta1.ICreateAnnotationSpecSetRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.ICreateAnnotationSpecSetRequest
|
callback |
Callback<protos.google.cloud.datalabeling.v1beta1.IAnnotationSpecSet, protos.google.cloud.datalabeling.v1beta1.ICreateAnnotationSpecSetRequest | null | undefined, {} | null | undefined>
|
Returns
createDataset(request, options)
createDataset(request?: protos.google.cloud.datalabeling.v1beta1.ICreateDatasetRequest, options?: CallOptions): Promise<[
protos.google.cloud.datalabeling.v1beta1.IDataset,
(protos.google.cloud.datalabeling.v1beta1.ICreateDatasetRequest | undefined),
{} | undefined
]>;
Creates dataset. If success return a Dataset resource.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.ICreateDatasetRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.cloud.datalabeling.v1beta1.IDataset,
(protos.google.cloud.datalabeling.v1beta1.ICreateDatasetRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Dataset]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Dataset resource parent, format:
* projects/{project_id}
*/
// const parent = 'abc123'
/**
* Required. The dataset to be created.
*/
// const dataset = {}
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callCreateDataset() {
// Construct request
const request = {
parent,
dataset,
};
// Run request
const response = await datalabelingClient.createDataset(request);
console.log(response);
}
callCreateDataset();
createDataset(request, options, callback)
createDataset(request: protos.google.cloud.datalabeling.v1beta1.ICreateDatasetRequest, options: CallOptions, callback: Callback<protos.google.cloud.datalabeling.v1beta1.IDataset, protos.google.cloud.datalabeling.v1beta1.ICreateDatasetRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.ICreateDatasetRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.datalabeling.v1beta1.IDataset, protos.google.cloud.datalabeling.v1beta1.ICreateDatasetRequest | null | undefined, {} | null | undefined>
|
Returns
createDataset(request, callback)
createDataset(request: protos.google.cloud.datalabeling.v1beta1.ICreateDatasetRequest, callback: Callback<protos.google.cloud.datalabeling.v1beta1.IDataset, protos.google.cloud.datalabeling.v1beta1.ICreateDatasetRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.ICreateDatasetRequest
|
callback |
Callback<protos.google.cloud.datalabeling.v1beta1.IDataset, protos.google.cloud.datalabeling.v1beta1.ICreateDatasetRequest | null | undefined, {} | null | undefined>
|
Returns
createEvaluationJob(request, options)
createEvaluationJob(request?: protos.google.cloud.datalabeling.v1beta1.ICreateEvaluationJobRequest, options?: CallOptions): Promise<[
protos.google.cloud.datalabeling.v1beta1.IEvaluationJob,
(protos.google.cloud.datalabeling.v1beta1.ICreateEvaluationJobRequest | undefined),
{} | undefined
]>;
Creates an evaluation job.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.ICreateEvaluationJobRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.cloud.datalabeling.v1beta1.IEvaluationJob,
(protos.google.cloud.datalabeling.v1beta1.ICreateEvaluationJobRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [EvaluationJob]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Evaluation job resource parent. Format:
* "projects/{project_id}"
*/
// const parent = 'abc123'
/**
* Required. The evaluation job to create.
*/
// const job = {}
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callCreateEvaluationJob() {
// Construct request
const request = {
parent,
job,
};
// Run request
const response = await datalabelingClient.createEvaluationJob(request);
console.log(response);
}
callCreateEvaluationJob();
createEvaluationJob(request, options, callback)
createEvaluationJob(request: protos.google.cloud.datalabeling.v1beta1.ICreateEvaluationJobRequest, options: CallOptions, callback: Callback<protos.google.cloud.datalabeling.v1beta1.IEvaluationJob, protos.google.cloud.datalabeling.v1beta1.ICreateEvaluationJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.ICreateEvaluationJobRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.datalabeling.v1beta1.IEvaluationJob, protos.google.cloud.datalabeling.v1beta1.ICreateEvaluationJobRequest | null | undefined, {} | null | undefined>
|
Returns
createEvaluationJob(request, callback)
createEvaluationJob(request: protos.google.cloud.datalabeling.v1beta1.ICreateEvaluationJobRequest, callback: Callback<protos.google.cloud.datalabeling.v1beta1.IEvaluationJob, protos.google.cloud.datalabeling.v1beta1.ICreateEvaluationJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.ICreateEvaluationJobRequest
|
callback |
Callback<protos.google.cloud.datalabeling.v1beta1.IEvaluationJob, protos.google.cloud.datalabeling.v1beta1.ICreateEvaluationJobRequest | null | undefined, {} | null | undefined>
|
Returns
createInstruction(request, options)
createInstruction(request?: protos.google.cloud.datalabeling.v1beta1.ICreateInstructionRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.datalabeling.v1beta1.IInstruction, protos.google.cloud.datalabeling.v1beta1.ICreateInstructionMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Creates an instruction for how data should be labeled.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.ICreateInstructionRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
LROperation<protos.google.cloud.datalabeling.v1beta1.IInstruction, protos.google.cloud.datalabeling.v1beta1.ICreateInstructionMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Instruction resource parent, format:
* projects/{project_id}
*/
// const parent = 'abc123'
/**
* Required. Instruction of how to perform the labeling task.
*/
// const instruction = {}
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callCreateInstruction() {
// Construct request
const request = {
parent,
instruction,
};
// Run request
const [operation] = await datalabelingClient.createInstruction(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateInstruction();
createInstruction(request, options, callback)
createInstruction(request: protos.google.cloud.datalabeling.v1beta1.ICreateInstructionRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.datalabeling.v1beta1.IInstruction, protos.google.cloud.datalabeling.v1beta1.ICreateInstructionMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.ICreateInstructionRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.datalabeling.v1beta1.IInstruction, protos.google.cloud.datalabeling.v1beta1.ICreateInstructionMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns
createInstruction(request, callback)
createInstruction(request: protos.google.cloud.datalabeling.v1beta1.ICreateInstructionRequest, callback: Callback<LROperation<protos.google.cloud.datalabeling.v1beta1.IInstruction, protos.google.cloud.datalabeling.v1beta1.ICreateInstructionMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.ICreateInstructionRequest
|
callback |
Callback<LROperation<protos.google.cloud.datalabeling.v1beta1.IInstruction, protos.google.cloud.datalabeling.v1beta1.ICreateInstructionMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns
dataItemPath(project, dataset, dataItem)
dataItemPath(project: string, dataset: string, dataItem: string): string;
Return a fully-qualified dataItem resource name string.
Parameters
Name | Description |
project |
string
|
dataset |
string
|
dataItem |
string
|
Returns
Type | Description |
string | {string} Resource name string.
|
datasetPath(project, dataset)
datasetPath(project: string, dataset: string): string;
Return a fully-qualified dataset resource name string.
Parameters
Name | Description |
project |
string
|
dataset |
string
|
Returns
Type | Description |
string | {string} Resource name string.
|
deleteAnnotatedDataset(request, options)
deleteAnnotatedDataset(request?: protos.google.cloud.datalabeling.v1beta1.IDeleteAnnotatedDatasetRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
(protos.google.cloud.datalabeling.v1beta1.IDeleteAnnotatedDatasetRequest | undefined),
{} | undefined
]>;
Deletes an annotated dataset by resource name.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IDeleteAnnotatedDatasetRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.protobuf.IEmpty,
(protos.google.cloud.datalabeling.v1beta1.IDeleteAnnotatedDatasetRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Empty]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Name of the annotated dataset to delete, format:
* projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
* {annotated_dataset_id}
*/
// const name = 'abc123'
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callDeleteAnnotatedDataset() {
// Construct request
const request = {
name,
};
// Run request
const response = await datalabelingClient.deleteAnnotatedDataset(request);
console.log(response);
}
callDeleteAnnotatedDataset();
deleteAnnotatedDataset(request, options, callback)
deleteAnnotatedDataset(request: protos.google.cloud.datalabeling.v1beta1.IDeleteAnnotatedDatasetRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.datalabeling.v1beta1.IDeleteAnnotatedDatasetRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IDeleteAnnotatedDatasetRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.datalabeling.v1beta1.IDeleteAnnotatedDatasetRequest | null | undefined, {} | null | undefined>
|
Returns
deleteAnnotatedDataset(request, callback)
deleteAnnotatedDataset(request: protos.google.cloud.datalabeling.v1beta1.IDeleteAnnotatedDatasetRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.datalabeling.v1beta1.IDeleteAnnotatedDatasetRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IDeleteAnnotatedDatasetRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.datalabeling.v1beta1.IDeleteAnnotatedDatasetRequest | null | undefined, {} | null | undefined>
|
Returns
deleteAnnotationSpecSet(request, options)
deleteAnnotationSpecSet(request?: protos.google.cloud.datalabeling.v1beta1.IDeleteAnnotationSpecSetRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
(protos.google.cloud.datalabeling.v1beta1.IDeleteAnnotationSpecSetRequest | undefined),
{} | undefined
]>;
Deletes an annotation spec set by resource name.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IDeleteAnnotationSpecSetRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.protobuf.IEmpty,
(protos.google.cloud.datalabeling.v1beta1.IDeleteAnnotationSpecSetRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Empty]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. AnnotationSpec resource name, format:
* `projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}`.
*/
// const name = 'abc123'
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callDeleteAnnotationSpecSet() {
// Construct request
const request = {
name,
};
// Run request
const response = await datalabelingClient.deleteAnnotationSpecSet(request);
console.log(response);
}
callDeleteAnnotationSpecSet();
deleteAnnotationSpecSet(request, options, callback)
deleteAnnotationSpecSet(request: protos.google.cloud.datalabeling.v1beta1.IDeleteAnnotationSpecSetRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.datalabeling.v1beta1.IDeleteAnnotationSpecSetRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IDeleteAnnotationSpecSetRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.datalabeling.v1beta1.IDeleteAnnotationSpecSetRequest | null | undefined, {} | null | undefined>
|
Returns
deleteAnnotationSpecSet(request, callback)
deleteAnnotationSpecSet(request: protos.google.cloud.datalabeling.v1beta1.IDeleteAnnotationSpecSetRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.datalabeling.v1beta1.IDeleteAnnotationSpecSetRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IDeleteAnnotationSpecSetRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.datalabeling.v1beta1.IDeleteAnnotationSpecSetRequest | null | undefined, {} | null | undefined>
|
Returns
deleteDataset(request, options)
deleteDataset(request?: protos.google.cloud.datalabeling.v1beta1.IDeleteDatasetRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
(protos.google.cloud.datalabeling.v1beta1.IDeleteDatasetRequest | undefined),
{} | undefined
]>;
Deletes a dataset by resource name.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IDeleteDatasetRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.protobuf.IEmpty,
(protos.google.cloud.datalabeling.v1beta1.IDeleteDatasetRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Empty]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Dataset resource name, format:
* projects/{project_id}/datasets/{dataset_id}
*/
// const name = 'abc123'
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callDeleteDataset() {
// Construct request
const request = {
name,
};
// Run request
const response = await datalabelingClient.deleteDataset(request);
console.log(response);
}
callDeleteDataset();
deleteDataset(request, options, callback)
deleteDataset(request: protos.google.cloud.datalabeling.v1beta1.IDeleteDatasetRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.datalabeling.v1beta1.IDeleteDatasetRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IDeleteDatasetRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.datalabeling.v1beta1.IDeleteDatasetRequest | null | undefined, {} | null | undefined>
|
Returns
deleteDataset(request, callback)
deleteDataset(request: protos.google.cloud.datalabeling.v1beta1.IDeleteDatasetRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.datalabeling.v1beta1.IDeleteDatasetRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IDeleteDatasetRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.datalabeling.v1beta1.IDeleteDatasetRequest | null | undefined, {} | null | undefined>
|
Returns
deleteEvaluationJob(request, options)
deleteEvaluationJob(request?: protos.google.cloud.datalabeling.v1beta1.IDeleteEvaluationJobRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
(protos.google.cloud.datalabeling.v1beta1.IDeleteEvaluationJobRequest | undefined),
{} | undefined
]>;
Stops and deletes an evaluation job.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IDeleteEvaluationJobRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.protobuf.IEmpty,
(protos.google.cloud.datalabeling.v1beta1.IDeleteEvaluationJobRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Empty]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Name of the evaluation job that is going to be deleted. Format:
* "projects/{project_id}/evaluationJobs/{evaluation_job_id}"
*/
// const name = 'abc123'
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callDeleteEvaluationJob() {
// Construct request
const request = {
name,
};
// Run request
const response = await datalabelingClient.deleteEvaluationJob(request);
console.log(response);
}
callDeleteEvaluationJob();
deleteEvaluationJob(request, options, callback)
deleteEvaluationJob(request: protos.google.cloud.datalabeling.v1beta1.IDeleteEvaluationJobRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.datalabeling.v1beta1.IDeleteEvaluationJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IDeleteEvaluationJobRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.datalabeling.v1beta1.IDeleteEvaluationJobRequest | null | undefined, {} | null | undefined>
|
Returns
deleteEvaluationJob(request, callback)
deleteEvaluationJob(request: protos.google.cloud.datalabeling.v1beta1.IDeleteEvaluationJobRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.datalabeling.v1beta1.IDeleteEvaluationJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IDeleteEvaluationJobRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.datalabeling.v1beta1.IDeleteEvaluationJobRequest | null | undefined, {} | null | undefined>
|
Returns
deleteInstruction(request, options)
deleteInstruction(request?: protos.google.cloud.datalabeling.v1beta1.IDeleteInstructionRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
(protos.google.cloud.datalabeling.v1beta1.IDeleteInstructionRequest | undefined),
{} | undefined
]>;
Deletes an instruction object by resource name.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IDeleteInstructionRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.protobuf.IEmpty,
(protos.google.cloud.datalabeling.v1beta1.IDeleteInstructionRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Empty]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Instruction resource name, format:
* projects/{project_id}/instructions/{instruction_id}
*/
// const name = 'abc123'
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callDeleteInstruction() {
// Construct request
const request = {
name,
};
// Run request
const response = await datalabelingClient.deleteInstruction(request);
console.log(response);
}
callDeleteInstruction();
deleteInstruction(request, options, callback)
deleteInstruction(request: protos.google.cloud.datalabeling.v1beta1.IDeleteInstructionRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.datalabeling.v1beta1.IDeleteInstructionRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IDeleteInstructionRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.datalabeling.v1beta1.IDeleteInstructionRequest | null | undefined, {} | null | undefined>
|
Returns
deleteInstruction(request, callback)
deleteInstruction(request: protos.google.cloud.datalabeling.v1beta1.IDeleteInstructionRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.datalabeling.v1beta1.IDeleteInstructionRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IDeleteInstructionRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.datalabeling.v1beta1.IDeleteInstructionRequest | null | undefined, {} | null | undefined>
|
Returns
evaluationJobPath(project, evaluationJob)
evaluationJobPath(project: string, evaluationJob: string): string;
Return a fully-qualified evaluationJob resource name string.
Parameters
Name | Description |
project |
string
|
evaluationJob |
string
|
Returns
Type | Description |
string | {string} Resource name string.
|
evaluationPath(project, dataset, evaluation)
evaluationPath(project: string, dataset: string, evaluation: string): string;
Return a fully-qualified evaluation resource name string.
Parameters
Name | Description |
project |
string
|
dataset |
string
|
evaluation |
string
|
Returns
Type | Description |
string | {string} Resource name string.
|
examplePath(project, dataset, annotatedDataset, example)
examplePath(project: string, dataset: string, annotatedDataset: string, example: string): string;
Return a fully-qualified example resource name string.
Parameters
Name | Description |
project |
string
|
dataset |
string
|
annotatedDataset |
string
|
example |
string
|
Returns
Type | Description |
string | {string} Resource name string.
|
exportData(request, options)
exportData(request?: protos.google.cloud.datalabeling.v1beta1.IExportDataRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.datalabeling.v1beta1.IExportDataOperationResponse, protos.google.cloud.datalabeling.v1beta1.IExportDataOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Exports data and annotations from dataset.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IExportDataRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
LROperation<protos.google.cloud.datalabeling.v1beta1.IExportDataOperationResponse, protos.google.cloud.datalabeling.v1beta1.IExportDataOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Dataset resource name, format:
* projects/{project_id}/datasets/{dataset_id}
*/
// const name = 'abc123'
/**
* 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}
*/
// const annotatedDataset = 'abc123'
/**
* Optional. Filter is not supported at this moment.
*/
// const filter = 'abc123'
/**
* Required. Specify the output destination.
*/
// const outputConfig = {}
/**
* Email of the user who started the export task and should be notified by
* email. If empty no notification will be sent.
*/
// const userEmailAddress = 'abc123'
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callExportData() {
// Construct request
const request = {
name,
annotatedDataset,
outputConfig,
};
// Run request
const [operation] = await datalabelingClient.exportData(request);
const [response] = await operation.promise();
console.log(response);
}
callExportData();
exportData(request, options, callback)
exportData(request: protos.google.cloud.datalabeling.v1beta1.IExportDataRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.datalabeling.v1beta1.IExportDataOperationResponse, protos.google.cloud.datalabeling.v1beta1.IExportDataOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IExportDataRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.datalabeling.v1beta1.IExportDataOperationResponse, protos.google.cloud.datalabeling.v1beta1.IExportDataOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns
exportData(request, callback)
exportData(request: protos.google.cloud.datalabeling.v1beta1.IExportDataRequest, callback: Callback<LROperation<protos.google.cloud.datalabeling.v1beta1.IExportDataOperationResponse, protos.google.cloud.datalabeling.v1beta1.IExportDataOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IExportDataRequest
|
callback |
Callback<LROperation<protos.google.cloud.datalabeling.v1beta1.IExportDataOperationResponse, protos.google.cloud.datalabeling.v1beta1.IExportDataOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns
getAnnotatedDataset(request, options)
getAnnotatedDataset(request?: protos.google.cloud.datalabeling.v1beta1.IGetAnnotatedDatasetRequest, options?: CallOptions): Promise<[
protos.google.cloud.datalabeling.v1beta1.IAnnotatedDataset,
(protos.google.cloud.datalabeling.v1beta1.IGetAnnotatedDatasetRequest | undefined),
{} | undefined
]>;
Gets an annotated dataset by resource name.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IGetAnnotatedDatasetRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.cloud.datalabeling.v1beta1.IAnnotatedDataset,
(protos.google.cloud.datalabeling.v1beta1.IGetAnnotatedDatasetRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [AnnotatedDataset]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Name of the annotated dataset to get, format:
* projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
* {annotated_dataset_id}
*/
// const name = 'abc123'
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callGetAnnotatedDataset() {
// Construct request
const request = {
name,
};
// Run request
const response = await datalabelingClient.getAnnotatedDataset(request);
console.log(response);
}
callGetAnnotatedDataset();
getAnnotatedDataset(request, options, callback)
getAnnotatedDataset(request: protos.google.cloud.datalabeling.v1beta1.IGetAnnotatedDatasetRequest, options: CallOptions, callback: Callback<protos.google.cloud.datalabeling.v1beta1.IAnnotatedDataset, protos.google.cloud.datalabeling.v1beta1.IGetAnnotatedDatasetRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IGetAnnotatedDatasetRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.datalabeling.v1beta1.IAnnotatedDataset, protos.google.cloud.datalabeling.v1beta1.IGetAnnotatedDatasetRequest | null | undefined, {} | null | undefined>
|
Returns
getAnnotatedDataset(request, callback)
getAnnotatedDataset(request: protos.google.cloud.datalabeling.v1beta1.IGetAnnotatedDatasetRequest, callback: Callback<protos.google.cloud.datalabeling.v1beta1.IAnnotatedDataset, protos.google.cloud.datalabeling.v1beta1.IGetAnnotatedDatasetRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IGetAnnotatedDatasetRequest
|
callback |
Callback<protos.google.cloud.datalabeling.v1beta1.IAnnotatedDataset, protos.google.cloud.datalabeling.v1beta1.IGetAnnotatedDatasetRequest | null | undefined, {} | null | undefined>
|
Returns
getAnnotationSpecSet(request, options)
getAnnotationSpecSet(request?: protos.google.cloud.datalabeling.v1beta1.IGetAnnotationSpecSetRequest, options?: CallOptions): Promise<[
protos.google.cloud.datalabeling.v1beta1.IAnnotationSpecSet,
(protos.google.cloud.datalabeling.v1beta1.IGetAnnotationSpecSetRequest | undefined),
{} | undefined
]>;
Gets an annotation spec set by resource name.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IGetAnnotationSpecSetRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.cloud.datalabeling.v1beta1.IAnnotationSpecSet,
(protos.google.cloud.datalabeling.v1beta1.IGetAnnotationSpecSetRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [AnnotationSpecSet]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. AnnotationSpecSet resource name, format:
* projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
*/
// const name = 'abc123'
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callGetAnnotationSpecSet() {
// Construct request
const request = {
name,
};
// Run request
const response = await datalabelingClient.getAnnotationSpecSet(request);
console.log(response);
}
callGetAnnotationSpecSet();
getAnnotationSpecSet(request, options, callback)
getAnnotationSpecSet(request: protos.google.cloud.datalabeling.v1beta1.IGetAnnotationSpecSetRequest, options: CallOptions, callback: Callback<protos.google.cloud.datalabeling.v1beta1.IAnnotationSpecSet, protos.google.cloud.datalabeling.v1beta1.IGetAnnotationSpecSetRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IGetAnnotationSpecSetRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.datalabeling.v1beta1.IAnnotationSpecSet, protos.google.cloud.datalabeling.v1beta1.IGetAnnotationSpecSetRequest | null | undefined, {} | null | undefined>
|
Returns
getAnnotationSpecSet(request, callback)
getAnnotationSpecSet(request: protos.google.cloud.datalabeling.v1beta1.IGetAnnotationSpecSetRequest, callback: Callback<protos.google.cloud.datalabeling.v1beta1.IAnnotationSpecSet, protos.google.cloud.datalabeling.v1beta1.IGetAnnotationSpecSetRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IGetAnnotationSpecSetRequest
|
callback |
Callback<protos.google.cloud.datalabeling.v1beta1.IAnnotationSpecSet, protos.google.cloud.datalabeling.v1beta1.IGetAnnotationSpecSetRequest | null | undefined, {} | null | undefined>
|
Returns
getDataItem(request, options)
getDataItem(request?: protos.google.cloud.datalabeling.v1beta1.IGetDataItemRequest, options?: CallOptions): Promise<[
protos.google.cloud.datalabeling.v1beta1.IDataItem,
protos.google.cloud.datalabeling.v1beta1.IGetDataItemRequest | undefined,
{} | undefined
]>;
Gets a data item in a dataset by resource name. This API can be called after data are imported into dataset.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IGetDataItemRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.cloud.datalabeling.v1beta1.IDataItem,
protos.google.cloud.datalabeling.v1beta1.IGetDataItemRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [DataItem]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the data item to get, format:
* projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id}
*/
// const name = 'abc123'
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callGetDataItem() {
// Construct request
const request = {
name,
};
// Run request
const response = await datalabelingClient.getDataItem(request);
console.log(response);
}
callGetDataItem();
getDataItem(request, options, callback)
getDataItem(request: protos.google.cloud.datalabeling.v1beta1.IGetDataItemRequest, options: CallOptions, callback: Callback<protos.google.cloud.datalabeling.v1beta1.IDataItem, protos.google.cloud.datalabeling.v1beta1.IGetDataItemRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IGetDataItemRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.datalabeling.v1beta1.IDataItem, protos.google.cloud.datalabeling.v1beta1.IGetDataItemRequest | null | undefined, {} | null | undefined>
|
Returns
getDataItem(request, callback)
getDataItem(request: protos.google.cloud.datalabeling.v1beta1.IGetDataItemRequest, callback: Callback<protos.google.cloud.datalabeling.v1beta1.IDataItem, protos.google.cloud.datalabeling.v1beta1.IGetDataItemRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IGetDataItemRequest
|
callback |
Callback<protos.google.cloud.datalabeling.v1beta1.IDataItem, protos.google.cloud.datalabeling.v1beta1.IGetDataItemRequest | null | undefined, {} | null | undefined>
|
Returns
getDataset(request, options)
getDataset(request?: protos.google.cloud.datalabeling.v1beta1.IGetDatasetRequest, options?: CallOptions): Promise<[
protos.google.cloud.datalabeling.v1beta1.IDataset,
protos.google.cloud.datalabeling.v1beta1.IGetDatasetRequest | undefined,
{} | undefined
]>;
Gets dataset by resource name.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IGetDatasetRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.cloud.datalabeling.v1beta1.IDataset,
protos.google.cloud.datalabeling.v1beta1.IGetDatasetRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Dataset]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Dataset resource name, format:
* projects/{project_id}/datasets/{dataset_id}
*/
// const name = 'abc123'
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callGetDataset() {
// Construct request
const request = {
name,
};
// Run request
const response = await datalabelingClient.getDataset(request);
console.log(response);
}
callGetDataset();
getDataset(request, options, callback)
getDataset(request: protos.google.cloud.datalabeling.v1beta1.IGetDatasetRequest, options: CallOptions, callback: Callback<protos.google.cloud.datalabeling.v1beta1.IDataset, protos.google.cloud.datalabeling.v1beta1.IGetDatasetRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IGetDatasetRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.datalabeling.v1beta1.IDataset, protos.google.cloud.datalabeling.v1beta1.IGetDatasetRequest | null | undefined, {} | null | undefined>
|
Returns
getDataset(request, callback)
getDataset(request: protos.google.cloud.datalabeling.v1beta1.IGetDatasetRequest, callback: Callback<protos.google.cloud.datalabeling.v1beta1.IDataset, protos.google.cloud.datalabeling.v1beta1.IGetDatasetRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IGetDatasetRequest
|
callback |
Callback<protos.google.cloud.datalabeling.v1beta1.IDataset, protos.google.cloud.datalabeling.v1beta1.IGetDatasetRequest | null | undefined, {} | null | undefined>
|
Returns
getEvaluation(request, options)
getEvaluation(request?: protos.google.cloud.datalabeling.v1beta1.IGetEvaluationRequest, options?: CallOptions): Promise<[
protos.google.cloud.datalabeling.v1beta1.IEvaluation,
(protos.google.cloud.datalabeling.v1beta1.IGetEvaluationRequest | undefined),
{} | undefined
]>;
Gets an evaluation by resource name (to search, use ).
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IGetEvaluationRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.cloud.datalabeling.v1beta1.IEvaluation,
(protos.google.cloud.datalabeling.v1beta1.IGetEvaluationRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Evaluation]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Name of the evaluation. Format:
* "projects/{project_id}/datasets/{dataset_id}/evaluations/{evaluation_id}'
*/
// const name = 'abc123'
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callGetEvaluation() {
// Construct request
const request = {
name,
};
// Run request
const response = await datalabelingClient.getEvaluation(request);
console.log(response);
}
callGetEvaluation();
getEvaluation(request, options, callback)
getEvaluation(request: protos.google.cloud.datalabeling.v1beta1.IGetEvaluationRequest, options: CallOptions, callback: Callback<protos.google.cloud.datalabeling.v1beta1.IEvaluation, protos.google.cloud.datalabeling.v1beta1.IGetEvaluationRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IGetEvaluationRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.datalabeling.v1beta1.IEvaluation, protos.google.cloud.datalabeling.v1beta1.IGetEvaluationRequest | null | undefined, {} | null | undefined>
|
Returns
getEvaluation(request, callback)
getEvaluation(request: protos.google.cloud.datalabeling.v1beta1.IGetEvaluationRequest, callback: Callback<protos.google.cloud.datalabeling.v1beta1.IEvaluation, protos.google.cloud.datalabeling.v1beta1.IGetEvaluationRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IGetEvaluationRequest
|
callback |
Callback<protos.google.cloud.datalabeling.v1beta1.IEvaluation, protos.google.cloud.datalabeling.v1beta1.IGetEvaluationRequest | null | undefined, {} | null | undefined>
|
Returns
getEvaluationJob(request, options)
getEvaluationJob(request?: protos.google.cloud.datalabeling.v1beta1.IGetEvaluationJobRequest, options?: CallOptions): Promise<[
protos.google.cloud.datalabeling.v1beta1.IEvaluationJob,
(protos.google.cloud.datalabeling.v1beta1.IGetEvaluationJobRequest | undefined),
{} | undefined
]>;
Gets an evaluation job by resource name.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IGetEvaluationJobRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.cloud.datalabeling.v1beta1.IEvaluationJob,
(protos.google.cloud.datalabeling.v1beta1.IGetEvaluationJobRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [EvaluationJob]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Name of the evaluation job. Format:
* "projects/{project_id}/evaluationJobs/{evaluation_job_id}"
*/
// const name = 'abc123'
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callGetEvaluationJob() {
// Construct request
const request = {
name,
};
// Run request
const response = await datalabelingClient.getEvaluationJob(request);
console.log(response);
}
callGetEvaluationJob();
getEvaluationJob(request, options, callback)
getEvaluationJob(request: protos.google.cloud.datalabeling.v1beta1.IGetEvaluationJobRequest, options: CallOptions, callback: Callback<protos.google.cloud.datalabeling.v1beta1.IEvaluationJob, protos.google.cloud.datalabeling.v1beta1.IGetEvaluationJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IGetEvaluationJobRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.datalabeling.v1beta1.IEvaluationJob, protos.google.cloud.datalabeling.v1beta1.IGetEvaluationJobRequest | null | undefined, {} | null | undefined>
|
Returns
getEvaluationJob(request, callback)
getEvaluationJob(request: protos.google.cloud.datalabeling.v1beta1.IGetEvaluationJobRequest, callback: Callback<protos.google.cloud.datalabeling.v1beta1.IEvaluationJob, protos.google.cloud.datalabeling.v1beta1.IGetEvaluationJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IGetEvaluationJobRequest
|
callback |
Callback<protos.google.cloud.datalabeling.v1beta1.IEvaluationJob, protos.google.cloud.datalabeling.v1beta1.IGetEvaluationJobRequest | null | undefined, {} | null | undefined>
|
Returns
getExample(request, options)
getExample(request?: protos.google.cloud.datalabeling.v1beta1.IGetExampleRequest, options?: CallOptions): Promise<[
protos.google.cloud.datalabeling.v1beta1.IExample,
protos.google.cloud.datalabeling.v1beta1.IGetExampleRequest | undefined,
{} | undefined
]>;
Gets an example by resource name, including both data and annotation.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IGetExampleRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.cloud.datalabeling.v1beta1.IExample,
protos.google.cloud.datalabeling.v1beta1.IGetExampleRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Example]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Name of example, format:
* projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
* {annotated_dataset_id}/examples/{example_id}
*/
// const name = 'abc123'
/**
* Optional. An expression for filtering Examples. Filter by
* annotation_spec.display_name is supported. Format
* "annotation_spec.display_name = {display_name}"
*/
// const filter = 'abc123'
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callGetExample() {
// Construct request
const request = {
name,
};
// Run request
const response = await datalabelingClient.getExample(request);
console.log(response);
}
callGetExample();
getExample(request, options, callback)
getExample(request: protos.google.cloud.datalabeling.v1beta1.IGetExampleRequest, options: CallOptions, callback: Callback<protos.google.cloud.datalabeling.v1beta1.IExample, protos.google.cloud.datalabeling.v1beta1.IGetExampleRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IGetExampleRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.datalabeling.v1beta1.IExample, protos.google.cloud.datalabeling.v1beta1.IGetExampleRequest | null | undefined, {} | null | undefined>
|
Returns
getExample(request, callback)
getExample(request: protos.google.cloud.datalabeling.v1beta1.IGetExampleRequest, callback: Callback<protos.google.cloud.datalabeling.v1beta1.IExample, protos.google.cloud.datalabeling.v1beta1.IGetExampleRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IGetExampleRequest
|
callback |
Callback<protos.google.cloud.datalabeling.v1beta1.IExample, protos.google.cloud.datalabeling.v1beta1.IGetExampleRequest | null | undefined, {} | null | undefined>
|
Returns
getInstruction(request, options)
getInstruction(request?: protos.google.cloud.datalabeling.v1beta1.IGetInstructionRequest, options?: CallOptions): Promise<[
protos.google.cloud.datalabeling.v1beta1.IInstruction,
(protos.google.cloud.datalabeling.v1beta1.IGetInstructionRequest | undefined),
{} | undefined
]>;
Gets an instruction by resource name.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IGetInstructionRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.cloud.datalabeling.v1beta1.IInstruction,
(protos.google.cloud.datalabeling.v1beta1.IGetInstructionRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Instruction]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Instruction resource name, format:
* projects/{project_id}/instructions/{instruction_id}
*/
// const name = 'abc123'
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callGetInstruction() {
// Construct request
const request = {
name,
};
// Run request
const response = await datalabelingClient.getInstruction(request);
console.log(response);
}
callGetInstruction();
getInstruction(request, options, callback)
getInstruction(request: protos.google.cloud.datalabeling.v1beta1.IGetInstructionRequest, options: CallOptions, callback: Callback<protos.google.cloud.datalabeling.v1beta1.IInstruction, protos.google.cloud.datalabeling.v1beta1.IGetInstructionRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IGetInstructionRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.datalabeling.v1beta1.IInstruction, protos.google.cloud.datalabeling.v1beta1.IGetInstructionRequest | null | undefined, {} | null | undefined>
|
Returns
getInstruction(request, callback)
getInstruction(request: protos.google.cloud.datalabeling.v1beta1.IGetInstructionRequest, callback: Callback<protos.google.cloud.datalabeling.v1beta1.IInstruction, protos.google.cloud.datalabeling.v1beta1.IGetInstructionRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IGetInstructionRequest
|
callback |
Callback<protos.google.cloud.datalabeling.v1beta1.IInstruction, protos.google.cloud.datalabeling.v1beta1.IGetInstructionRequest | null | undefined, {} | null | undefined>
|
Returns
getProjectId()
getProjectId(): Promise<string>;
Returns
Type | Description |
Promise<string> | |
getProjectId(callback)
getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
Name | Description |
callback |
Callback<string, undefined, undefined>
|
Returns
importData(request, options)
importData(request?: protos.google.cloud.datalabeling.v1beta1.IImportDataRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.datalabeling.v1beta1.IImportDataOperationResponse, protos.google.cloud.datalabeling.v1beta1.IImportDataOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
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.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IImportDataRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
LROperation<protos.google.cloud.datalabeling.v1beta1.IImportDataOperationResponse, protos.google.cloud.datalabeling.v1beta1.IImportDataOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Dataset resource name, format:
* projects/{project_id}/datasets/{dataset_id}
*/
// const name = 'abc123'
/**
* Required. Specify the input source of the data.
*/
// const inputConfig = {}
/**
* Email of the user who started the import task and should be notified by
* email. If empty no notification will be sent.
*/
// const userEmailAddress = 'abc123'
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callImportData() {
// Construct request
const request = {
name,
inputConfig,
};
// Run request
const [operation] = await datalabelingClient.importData(request);
const [response] = await operation.promise();
console.log(response);
}
callImportData();
importData(request, options, callback)
importData(request: protos.google.cloud.datalabeling.v1beta1.IImportDataRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.datalabeling.v1beta1.IImportDataOperationResponse, protos.google.cloud.datalabeling.v1beta1.IImportDataOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IImportDataRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.datalabeling.v1beta1.IImportDataOperationResponse, protos.google.cloud.datalabeling.v1beta1.IImportDataOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns
importData(request, callback)
importData(request: protos.google.cloud.datalabeling.v1beta1.IImportDataRequest, callback: Callback<LROperation<protos.google.cloud.datalabeling.v1beta1.IImportDataOperationResponse, protos.google.cloud.datalabeling.v1beta1.IImportDataOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IImportDataRequest
|
callback |
Callback<LROperation<protos.google.cloud.datalabeling.v1beta1.IImportDataOperationResponse, protos.google.cloud.datalabeling.v1beta1.IImportDataOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns
initialize()
initialize(): Promise<{
[name: string]: Function;
}>;
Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.
You can await on this method if you want to make sure the client is initialized.
Returns
Type | Description |
Promise<{
[name: string]: Function;
}> | {Promise} A promise that resolves to an authenticated service stub.
|
instructionPath(project, instruction)
instructionPath(project: string, instruction: string): string;
Return a fully-qualified instruction resource name string.
Parameters
Name | Description |
project |
string
|
instruction |
string
|
Returns
Type | Description |
string | {string} Resource name string.
|
labelImage(request, options)
labelImage(request?: protos.google.cloud.datalabeling.v1beta1.ILabelImageRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.datalabeling.v1beta1.IAnnotatedDataset, protos.google.cloud.datalabeling.v1beta1.ILabelOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Starts a labeling task for image. The type of image labeling task is configured by feature in the request.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.ILabelImageRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
LROperation<protos.google.cloud.datalabeling.v1beta1.IAnnotatedDataset, protos.google.cloud.datalabeling.v1beta1.ILabelOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Configuration for image classification task.
* One of image_classification_config, bounding_poly_config,
* polyline_config and segmentation_config are required.
*/
// const imageClassificationConfig = {}
/**
* Configuration for bounding box and bounding poly task.
* One of image_classification_config, bounding_poly_config,
* polyline_config and segmentation_config are required.
*/
// const boundingPolyConfig = {}
/**
* Configuration for polyline task.
* One of image_classification_config, bounding_poly_config,
* polyline_config and segmentation_config are required.
*/
// const polylineConfig = {}
/**
* Configuration for segmentation task.
* One of image_classification_config, bounding_poly_config,
* polyline_config and segmentation_config are required.
*/
// const segmentationConfig = {}
/**
* Required. Name of the dataset to request labeling task, format:
* projects/{project_id}/datasets/{dataset_id}
*/
// const parent = 'abc123'
/**
* Required. Basic human annotation config.
*/
// const basicConfig = {}
/**
* Required. The type of image labeling task.
*/
// const feature = {}
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callLabelImage() {
// Construct request
const request = {
parent,
basicConfig,
feature,
};
// Run request
const [operation] = await datalabelingClient.labelImage(request);
const [response] = await operation.promise();
console.log(response);
}
callLabelImage();
labelImage(request, options, callback)
labelImage(request: protos.google.cloud.datalabeling.v1beta1.ILabelImageRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.datalabeling.v1beta1.IAnnotatedDataset, protos.google.cloud.datalabeling.v1beta1.ILabelOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.ILabelImageRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.datalabeling.v1beta1.IAnnotatedDataset, protos.google.cloud.datalabeling.v1beta1.ILabelOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns
labelImage(request, callback)
labelImage(request: protos.google.cloud.datalabeling.v1beta1.ILabelImageRequest, callback: Callback<LROperation<protos.google.cloud.datalabeling.v1beta1.IAnnotatedDataset, protos.google.cloud.datalabeling.v1beta1.ILabelOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.ILabelImageRequest
|
callback |
Callback<LROperation<protos.google.cloud.datalabeling.v1beta1.IAnnotatedDataset, protos.google.cloud.datalabeling.v1beta1.ILabelOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns
labelText(request, options)
labelText(request?: protos.google.cloud.datalabeling.v1beta1.ILabelTextRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.datalabeling.v1beta1.IAnnotatedDataset, protos.google.cloud.datalabeling.v1beta1.ILabelOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Starts a labeling task for text. The type of text labeling task is configured by feature in the request.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.ILabelTextRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
LROperation<protos.google.cloud.datalabeling.v1beta1.IAnnotatedDataset, protos.google.cloud.datalabeling.v1beta1.ILabelOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Configuration for text classification task.
* One of text_classification_config and text_entity_extraction_config
* is required.
*/
// const textClassificationConfig = {}
/**
* Configuration for entity extraction task.
* One of text_classification_config and text_entity_extraction_config
* is required.
*/
// const textEntityExtractionConfig = {}
/**
* Required. Name of the data set to request labeling task, format:
* projects/{project_id}/datasets/{dataset_id}
*/
// const parent = 'abc123'
/**
* Required. Basic human annotation config.
*/
// const basicConfig = {}
/**
* Required. The type of text labeling task.
*/
// const feature = {}
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callLabelText() {
// Construct request
const request = {
parent,
basicConfig,
feature,
};
// Run request
const [operation] = await datalabelingClient.labelText(request);
const [response] = await operation.promise();
console.log(response);
}
callLabelText();
labelText(request, options, callback)
labelText(request: protos.google.cloud.datalabeling.v1beta1.ILabelTextRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.datalabeling.v1beta1.IAnnotatedDataset, protos.google.cloud.datalabeling.v1beta1.ILabelOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.ILabelTextRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.datalabeling.v1beta1.IAnnotatedDataset, protos.google.cloud.datalabeling.v1beta1.ILabelOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns
labelText(request, callback)
labelText(request: protos.google.cloud.datalabeling.v1beta1.ILabelTextRequest, callback: Callback<LROperation<protos.google.cloud.datalabeling.v1beta1.IAnnotatedDataset, protos.google.cloud.datalabeling.v1beta1.ILabelOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.ILabelTextRequest
|
callback |
Callback<LROperation<protos.google.cloud.datalabeling.v1beta1.IAnnotatedDataset, protos.google.cloud.datalabeling.v1beta1.ILabelOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns
labelVideo(request, options)
labelVideo(request?: protos.google.cloud.datalabeling.v1beta1.ILabelVideoRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.datalabeling.v1beta1.IAnnotatedDataset, protos.google.cloud.datalabeling.v1beta1.ILabelOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Starts a labeling task for video. The type of video labeling task is configured by feature in the request.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.ILabelVideoRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
LROperation<protos.google.cloud.datalabeling.v1beta1.IAnnotatedDataset, protos.google.cloud.datalabeling.v1beta1.ILabelOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Configuration for video classification task.
* One of video_classification_config, object_detection_config,
* object_tracking_config and event_config is required.
*/
// const videoClassificationConfig = {}
/**
* Configuration for video object detection task.
* One of video_classification_config, object_detection_config,
* object_tracking_config and event_config is required.
*/
// const objectDetectionConfig = {}
/**
* Configuration for video object tracking task.
* One of video_classification_config, object_detection_config,
* object_tracking_config and event_config is required.
*/
// const objectTrackingConfig = {}
/**
* Configuration for video event task.
* One of video_classification_config, object_detection_config,
* object_tracking_config and event_config is required.
*/
// const eventConfig = {}
/**
* Required. Name of the dataset to request labeling task, format:
* projects/{project_id}/datasets/{dataset_id}
*/
// const parent = 'abc123'
/**
* Required. Basic human annotation config.
*/
// const basicConfig = {}
/**
* Required. The type of video labeling task.
*/
// const feature = {}
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callLabelVideo() {
// Construct request
const request = {
parent,
basicConfig,
feature,
};
// Run request
const [operation] = await datalabelingClient.labelVideo(request);
const [response] = await operation.promise();
console.log(response);
}
callLabelVideo();
labelVideo(request, options, callback)
labelVideo(request: protos.google.cloud.datalabeling.v1beta1.ILabelVideoRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.datalabeling.v1beta1.IAnnotatedDataset, protos.google.cloud.datalabeling.v1beta1.ILabelOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.ILabelVideoRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.datalabeling.v1beta1.IAnnotatedDataset, protos.google.cloud.datalabeling.v1beta1.ILabelOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns
labelVideo(request, callback)
labelVideo(request: protos.google.cloud.datalabeling.v1beta1.ILabelVideoRequest, callback: Callback<LROperation<protos.google.cloud.datalabeling.v1beta1.IAnnotatedDataset, protos.google.cloud.datalabeling.v1beta1.ILabelOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.ILabelVideoRequest
|
callback |
Callback<LROperation<protos.google.cloud.datalabeling.v1beta1.IAnnotatedDataset, protos.google.cloud.datalabeling.v1beta1.ILabelOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns
listAnnotatedDatasets(request, options)
listAnnotatedDatasets(request?: protos.google.cloud.datalabeling.v1beta1.IListAnnotatedDatasetsRequest, options?: CallOptions): Promise<[
protos.google.cloud.datalabeling.v1beta1.IAnnotatedDataset[],
protos.google.cloud.datalabeling.v1beta1.IListAnnotatedDatasetsRequest | null,
protos.google.cloud.datalabeling.v1beta1.IListAnnotatedDatasetsResponse
]>;
Lists annotated datasets for a dataset. Pagination is supported.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListAnnotatedDatasetsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.cloud.datalabeling.v1beta1.IAnnotatedDataset[],
protos.google.cloud.datalabeling.v1beta1.IListAnnotatedDatasetsRequest | null,
protos.google.cloud.datalabeling.v1beta1.IListAnnotatedDatasetsResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of [AnnotatedDataset]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listAnnotatedDatasetsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.
|
listAnnotatedDatasets(request, options, callback)
listAnnotatedDatasets(request: protos.google.cloud.datalabeling.v1beta1.IListAnnotatedDatasetsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.datalabeling.v1beta1.IListAnnotatedDatasetsRequest, protos.google.cloud.datalabeling.v1beta1.IListAnnotatedDatasetsResponse | null | undefined, protos.google.cloud.datalabeling.v1beta1.IAnnotatedDataset>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListAnnotatedDatasetsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.datalabeling.v1beta1.IListAnnotatedDatasetsRequest, protos.google.cloud.datalabeling.v1beta1.IListAnnotatedDatasetsResponse | null | undefined, protos.google.cloud.datalabeling.v1beta1.IAnnotatedDataset>
|
Returns
listAnnotatedDatasets(request, callback)
listAnnotatedDatasets(request: protos.google.cloud.datalabeling.v1beta1.IListAnnotatedDatasetsRequest, callback: PaginationCallback<protos.google.cloud.datalabeling.v1beta1.IListAnnotatedDatasetsRequest, protos.google.cloud.datalabeling.v1beta1.IListAnnotatedDatasetsResponse | null | undefined, protos.google.cloud.datalabeling.v1beta1.IAnnotatedDataset>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListAnnotatedDatasetsRequest
|
callback |
PaginationCallback<protos.google.cloud.datalabeling.v1beta1.IListAnnotatedDatasetsRequest, protos.google.cloud.datalabeling.v1beta1.IListAnnotatedDatasetsResponse | null | undefined, protos.google.cloud.datalabeling.v1beta1.IAnnotatedDataset>
|
Returns
listAnnotatedDatasetsAsync(request, options)
listAnnotatedDatasetsAsync(request?: protos.google.cloud.datalabeling.v1beta1.IListAnnotatedDatasetsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.datalabeling.v1beta1.IAnnotatedDataset>;
Equivalent to listAnnotatedDatasets
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListAnnotatedDatasetsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
AsyncIterable<protos.google.cloud.datalabeling.v1beta1.IAnnotatedDataset> | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [AnnotatedDataset]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Name of the dataset to list annotated datasets, format:
* projects/{project_id}/datasets/{dataset_id}
*/
// const parent = 'abc123'
/**
* Optional. Filter is not supported at this moment.
*/
// const filter = 'abc123'
/**
* Optional. Requested page size. Server may return fewer results than
* requested. Default value is 100.
*/
// const pageSize = 1234
/**
* Optional. A token identifying a page of results for the server to return.
* Typically obtained by
* ListAnnotatedDatasetsResponse.next_page_token google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse.next_page_token of the previous
* DataLabelingService.ListAnnotatedDatasets call.
* Return first page if empty.
*/
// const pageToken = 'abc123'
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callListAnnotatedDatasets() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = await datalabelingClient.listAnnotatedDatasetsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListAnnotatedDatasets();
listAnnotatedDatasetsStream(request, options)
listAnnotatedDatasetsStream(request?: protos.google.cloud.datalabeling.v1beta1.IListAnnotatedDatasetsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListAnnotatedDatasetsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Transform | {Stream} An object stream which emits an object representing [AnnotatedDataset] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listAnnotatedDatasetsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.
|
listAnnotationSpecSets(request, options)
listAnnotationSpecSets(request?: protos.google.cloud.datalabeling.v1beta1.IListAnnotationSpecSetsRequest, options?: CallOptions): Promise<[
protos.google.cloud.datalabeling.v1beta1.IAnnotationSpecSet[],
protos.google.cloud.datalabeling.v1beta1.IListAnnotationSpecSetsRequest | null,
protos.google.cloud.datalabeling.v1beta1.IListAnnotationSpecSetsResponse
]>;
Lists annotation spec sets for a project. Pagination is supported.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListAnnotationSpecSetsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.cloud.datalabeling.v1beta1.IAnnotationSpecSet[],
protos.google.cloud.datalabeling.v1beta1.IListAnnotationSpecSetsRequest | null,
protos.google.cloud.datalabeling.v1beta1.IListAnnotationSpecSetsResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of [AnnotationSpecSet]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listAnnotationSpecSetsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.
|
listAnnotationSpecSets(request, options, callback)
listAnnotationSpecSets(request: protos.google.cloud.datalabeling.v1beta1.IListAnnotationSpecSetsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.datalabeling.v1beta1.IListAnnotationSpecSetsRequest, protos.google.cloud.datalabeling.v1beta1.IListAnnotationSpecSetsResponse | null | undefined, protos.google.cloud.datalabeling.v1beta1.IAnnotationSpecSet>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListAnnotationSpecSetsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.datalabeling.v1beta1.IListAnnotationSpecSetsRequest, protos.google.cloud.datalabeling.v1beta1.IListAnnotationSpecSetsResponse | null | undefined, protos.google.cloud.datalabeling.v1beta1.IAnnotationSpecSet>
|
Returns
listAnnotationSpecSets(request, callback)
listAnnotationSpecSets(request: protos.google.cloud.datalabeling.v1beta1.IListAnnotationSpecSetsRequest, callback: PaginationCallback<protos.google.cloud.datalabeling.v1beta1.IListAnnotationSpecSetsRequest, protos.google.cloud.datalabeling.v1beta1.IListAnnotationSpecSetsResponse | null | undefined, protos.google.cloud.datalabeling.v1beta1.IAnnotationSpecSet>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListAnnotationSpecSetsRequest
|
callback |
PaginationCallback<protos.google.cloud.datalabeling.v1beta1.IListAnnotationSpecSetsRequest, protos.google.cloud.datalabeling.v1beta1.IListAnnotationSpecSetsResponse | null | undefined, protos.google.cloud.datalabeling.v1beta1.IAnnotationSpecSet>
|
Returns
listAnnotationSpecSetsAsync(request, options)
listAnnotationSpecSetsAsync(request?: protos.google.cloud.datalabeling.v1beta1.IListAnnotationSpecSetsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.datalabeling.v1beta1.IAnnotationSpecSet>;
Equivalent to listAnnotationSpecSets
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListAnnotationSpecSetsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
AsyncIterable<protos.google.cloud.datalabeling.v1beta1.IAnnotationSpecSet> | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [AnnotationSpecSet]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Parent of AnnotationSpecSet resource, format:
* projects/{project_id}
*/
// const parent = 'abc123'
/**
* Optional. Filter is not supported at this moment.
*/
// const filter = 'abc123'
/**
* Optional. Requested page size. Server may return fewer results than
* requested. Default value is 100.
*/
// const pageSize = 1234
/**
* Optional. A token identifying a page of results for the server to return.
* Typically obtained by
* ListAnnotationSpecSetsResponse.next_page_token google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse.next_page_token of the previous
* DataLabelingService.ListAnnotationSpecSets call.
* Return first page if empty.
*/
// const pageToken = 'abc123'
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callListAnnotationSpecSets() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = await datalabelingClient.listAnnotationSpecSetsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListAnnotationSpecSets();
listAnnotationSpecSetsStream(request, options)
listAnnotationSpecSetsStream(request?: protos.google.cloud.datalabeling.v1beta1.IListAnnotationSpecSetsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListAnnotationSpecSetsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Transform | {Stream} An object stream which emits an object representing [AnnotationSpecSet] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listAnnotationSpecSetsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.
|
listDataItems(request, options)
listDataItems(request?: protos.google.cloud.datalabeling.v1beta1.IListDataItemsRequest, options?: CallOptions): Promise<[
protos.google.cloud.datalabeling.v1beta1.IDataItem[],
protos.google.cloud.datalabeling.v1beta1.IListDataItemsRequest | null,
protos.google.cloud.datalabeling.v1beta1.IListDataItemsResponse
]>;
Lists data items in a dataset. This API can be called after data are imported into dataset. Pagination is supported.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListDataItemsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.cloud.datalabeling.v1beta1.IDataItem[],
protos.google.cloud.datalabeling.v1beta1.IListDataItemsRequest | null,
protos.google.cloud.datalabeling.v1beta1.IListDataItemsResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of [DataItem]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listDataItemsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.
|
listDataItems(request, options, callback)
listDataItems(request: protos.google.cloud.datalabeling.v1beta1.IListDataItemsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.datalabeling.v1beta1.IListDataItemsRequest, protos.google.cloud.datalabeling.v1beta1.IListDataItemsResponse | null | undefined, protos.google.cloud.datalabeling.v1beta1.IDataItem>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListDataItemsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.datalabeling.v1beta1.IListDataItemsRequest, protos.google.cloud.datalabeling.v1beta1.IListDataItemsResponse | null | undefined, protos.google.cloud.datalabeling.v1beta1.IDataItem>
|
Returns
listDataItems(request, callback)
listDataItems(request: protos.google.cloud.datalabeling.v1beta1.IListDataItemsRequest, callback: PaginationCallback<protos.google.cloud.datalabeling.v1beta1.IListDataItemsRequest, protos.google.cloud.datalabeling.v1beta1.IListDataItemsResponse | null | undefined, protos.google.cloud.datalabeling.v1beta1.IDataItem>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListDataItemsRequest
|
callback |
PaginationCallback<protos.google.cloud.datalabeling.v1beta1.IListDataItemsRequest, protos.google.cloud.datalabeling.v1beta1.IListDataItemsResponse | null | undefined, protos.google.cloud.datalabeling.v1beta1.IDataItem>
|
Returns
listDataItemsAsync(request, options)
listDataItemsAsync(request?: protos.google.cloud.datalabeling.v1beta1.IListDataItemsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.datalabeling.v1beta1.IDataItem>;
Equivalent to listDataItems
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListDataItemsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
AsyncIterable<protos.google.cloud.datalabeling.v1beta1.IDataItem> | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [DataItem]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Name of the dataset to list data items, format:
* projects/{project_id}/datasets/{dataset_id}
*/
// const parent = 'abc123'
/**
* Optional. Filter is not supported at this moment.
*/
// const filter = 'abc123'
/**
* Optional. Requested page size. Server may return fewer results than
* requested. Default value is 100.
*/
// const pageSize = 1234
/**
* Optional. A token identifying a page of results for the server to return.
* Typically obtained by
* ListDataItemsResponse.next_page_token google.cloud.datalabeling.v1beta1.ListDataItemsResponse.next_page_token of the previous
* DataLabelingService.ListDataItems call.
* Return first page if empty.
*/
// const pageToken = 'abc123'
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callListDataItems() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = await datalabelingClient.listDataItemsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListDataItems();
listDataItemsStream(request, options)
listDataItemsStream(request?: protos.google.cloud.datalabeling.v1beta1.IListDataItemsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListDataItemsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Transform | {Stream} An object stream which emits an object representing [DataItem] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listDataItemsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.
|
listDatasets(request, options)
listDatasets(request?: protos.google.cloud.datalabeling.v1beta1.IListDatasetsRequest, options?: CallOptions): Promise<[
protos.google.cloud.datalabeling.v1beta1.IDataset[],
protos.google.cloud.datalabeling.v1beta1.IListDatasetsRequest | null,
protos.google.cloud.datalabeling.v1beta1.IListDatasetsResponse
]>;
Lists datasets under a project. Pagination is supported.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListDatasetsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.cloud.datalabeling.v1beta1.IDataset[],
protos.google.cloud.datalabeling.v1beta1.IListDatasetsRequest | null,
protos.google.cloud.datalabeling.v1beta1.IListDatasetsResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of [Dataset]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listDatasetsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.
|
listDatasets(request, options, callback)
listDatasets(request: protos.google.cloud.datalabeling.v1beta1.IListDatasetsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.datalabeling.v1beta1.IListDatasetsRequest, protos.google.cloud.datalabeling.v1beta1.IListDatasetsResponse | null | undefined, protos.google.cloud.datalabeling.v1beta1.IDataset>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListDatasetsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.datalabeling.v1beta1.IListDatasetsRequest, protos.google.cloud.datalabeling.v1beta1.IListDatasetsResponse | null | undefined, protos.google.cloud.datalabeling.v1beta1.IDataset>
|
Returns
listDatasets(request, callback)
listDatasets(request: protos.google.cloud.datalabeling.v1beta1.IListDatasetsRequest, callback: PaginationCallback<protos.google.cloud.datalabeling.v1beta1.IListDatasetsRequest, protos.google.cloud.datalabeling.v1beta1.IListDatasetsResponse | null | undefined, protos.google.cloud.datalabeling.v1beta1.IDataset>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListDatasetsRequest
|
callback |
PaginationCallback<protos.google.cloud.datalabeling.v1beta1.IListDatasetsRequest, protos.google.cloud.datalabeling.v1beta1.IListDatasetsResponse | null | undefined, protos.google.cloud.datalabeling.v1beta1.IDataset>
|
Returns
listDatasetsAsync(request, options)
listDatasetsAsync(request?: protos.google.cloud.datalabeling.v1beta1.IListDatasetsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.datalabeling.v1beta1.IDataset>;
Equivalent to listDatasets
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListDatasetsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
AsyncIterable<protos.google.cloud.datalabeling.v1beta1.IDataset> | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Dataset]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Dataset resource parent, format:
* projects/{project_id}
*/
// const parent = 'abc123'
/**
* Optional. Filter on dataset is not supported at this moment.
*/
// const filter = 'abc123'
/**
* Optional. Requested page size. Server may return fewer results than
* requested. Default value is 100.
*/
// const pageSize = 1234
/**
* Optional. A token identifying a page of results for the server to return.
* Typically obtained by
* ListDatasetsResponse.next_page_token google.cloud.datalabeling.v1beta1.ListDatasetsResponse.next_page_token of the previous
* DataLabelingService.ListDatasets call.
* Returns the first page if empty.
*/
// const pageToken = 'abc123'
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callListDatasets() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = await datalabelingClient.listDatasetsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListDatasets();
listDatasetsStream(request, options)
listDatasetsStream(request?: protos.google.cloud.datalabeling.v1beta1.IListDatasetsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListDatasetsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Transform | {Stream} An object stream which emits an object representing [Dataset] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listDatasetsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.
|
listEvaluationJobs(request, options)
listEvaluationJobs(request?: protos.google.cloud.datalabeling.v1beta1.IListEvaluationJobsRequest, options?: CallOptions): Promise<[
protos.google.cloud.datalabeling.v1beta1.IEvaluationJob[],
protos.google.cloud.datalabeling.v1beta1.IListEvaluationJobsRequest | null,
protos.google.cloud.datalabeling.v1beta1.IListEvaluationJobsResponse
]>;
Lists all evaluation jobs within a project with possible filters. Pagination is supported.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListEvaluationJobsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.cloud.datalabeling.v1beta1.IEvaluationJob[],
protos.google.cloud.datalabeling.v1beta1.IListEvaluationJobsRequest | null,
protos.google.cloud.datalabeling.v1beta1.IListEvaluationJobsResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of [EvaluationJob]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listEvaluationJobsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.
|
listEvaluationJobs(request, options, callback)
listEvaluationJobs(request: protos.google.cloud.datalabeling.v1beta1.IListEvaluationJobsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.datalabeling.v1beta1.IListEvaluationJobsRequest, protos.google.cloud.datalabeling.v1beta1.IListEvaluationJobsResponse | null | undefined, protos.google.cloud.datalabeling.v1beta1.IEvaluationJob>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListEvaluationJobsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.datalabeling.v1beta1.IListEvaluationJobsRequest, protos.google.cloud.datalabeling.v1beta1.IListEvaluationJobsResponse | null | undefined, protos.google.cloud.datalabeling.v1beta1.IEvaluationJob>
|
Returns
listEvaluationJobs(request, callback)
listEvaluationJobs(request: protos.google.cloud.datalabeling.v1beta1.IListEvaluationJobsRequest, callback: PaginationCallback<protos.google.cloud.datalabeling.v1beta1.IListEvaluationJobsRequest, protos.google.cloud.datalabeling.v1beta1.IListEvaluationJobsResponse | null | undefined, protos.google.cloud.datalabeling.v1beta1.IEvaluationJob>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListEvaluationJobsRequest
|
callback |
PaginationCallback<protos.google.cloud.datalabeling.v1beta1.IListEvaluationJobsRequest, protos.google.cloud.datalabeling.v1beta1.IListEvaluationJobsResponse | null | undefined, protos.google.cloud.datalabeling.v1beta1.IEvaluationJob>
|
Returns
listEvaluationJobsAsync(request, options)
listEvaluationJobsAsync(request?: protos.google.cloud.datalabeling.v1beta1.IListEvaluationJobsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.datalabeling.v1beta1.IEvaluationJob>;
Equivalent to listEvaluationJobs
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListEvaluationJobsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
AsyncIterable<protos.google.cloud.datalabeling.v1beta1.IEvaluationJob> | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [EvaluationJob]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Evaluation job resource parent. Format:
* "projects/{project_id}"
*/
// const parent = 'abc123'
/**
* Optional. You can filter the jobs to list by model_id (also known as
* model_name, as described in
* EvaluationJob.modelVersion google.cloud.datalabeling.v1beta1.EvaluationJob.model_version) or by
* evaluation job state (as described in EvaluationJob.state google.cloud.datalabeling.v1beta1.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:
* "evaluation_job.model_id = {model_name} AND
* evaluation_job.state = {evaluation_job_state}"
*/
// const filter = 'abc123'
/**
* Optional. Requested page size. Server may return fewer results than
* requested. Default value is 100.
*/
// const pageSize = 1234
/**
* Optional. A token identifying a page of results for the server to return.
* Typically obtained by the
* nextPageToken google.cloud.datalabeling.v1beta1.ListEvaluationJobsResponse.next_page_token in the response
* to the previous request. The request returns the first page if this is
* empty.
*/
// const pageToken = 'abc123'
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callListEvaluationJobs() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = await datalabelingClient.listEvaluationJobsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListEvaluationJobs();
listEvaluationJobsStream(request, options)
listEvaluationJobsStream(request?: protos.google.cloud.datalabeling.v1beta1.IListEvaluationJobsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListEvaluationJobsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Transform | {Stream} An object stream which emits an object representing [EvaluationJob] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listEvaluationJobsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.
|
listExamples(request, options)
listExamples(request?: protos.google.cloud.datalabeling.v1beta1.IListExamplesRequest, options?: CallOptions): Promise<[
protos.google.cloud.datalabeling.v1beta1.IExample[],
protos.google.cloud.datalabeling.v1beta1.IListExamplesRequest | null,
protos.google.cloud.datalabeling.v1beta1.IListExamplesResponse
]>;
Lists examples in an annotated dataset. Pagination is supported.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListExamplesRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.cloud.datalabeling.v1beta1.IExample[],
protos.google.cloud.datalabeling.v1beta1.IListExamplesRequest | null,
protos.google.cloud.datalabeling.v1beta1.IListExamplesResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of [Example]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listExamplesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.
|
listExamples(request, options, callback)
listExamples(request: protos.google.cloud.datalabeling.v1beta1.IListExamplesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.datalabeling.v1beta1.IListExamplesRequest, protos.google.cloud.datalabeling.v1beta1.IListExamplesResponse | null | undefined, protos.google.cloud.datalabeling.v1beta1.IExample>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListExamplesRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.datalabeling.v1beta1.IListExamplesRequest, protos.google.cloud.datalabeling.v1beta1.IListExamplesResponse | null | undefined, protos.google.cloud.datalabeling.v1beta1.IExample>
|
Returns
listExamples(request, callback)
listExamples(request: protos.google.cloud.datalabeling.v1beta1.IListExamplesRequest, callback: PaginationCallback<protos.google.cloud.datalabeling.v1beta1.IListExamplesRequest, protos.google.cloud.datalabeling.v1beta1.IListExamplesResponse | null | undefined, protos.google.cloud.datalabeling.v1beta1.IExample>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListExamplesRequest
|
callback |
PaginationCallback<protos.google.cloud.datalabeling.v1beta1.IListExamplesRequest, protos.google.cloud.datalabeling.v1beta1.IListExamplesResponse | null | undefined, protos.google.cloud.datalabeling.v1beta1.IExample>
|
Returns
listExamplesAsync(request, options)
listExamplesAsync(request?: protos.google.cloud.datalabeling.v1beta1.IListExamplesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.datalabeling.v1beta1.IExample>;
Equivalent to listExamples
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListExamplesRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
AsyncIterable<protos.google.cloud.datalabeling.v1beta1.IExample> | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Example]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Example resource parent.
*/
// const parent = 'abc123'
/**
* 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}"
*/
// const filter = 'abc123'
/**
* Optional. Requested page size. Server may return fewer results than
* requested. Default value is 100.
*/
// const pageSize = 1234
/**
* Optional. A token identifying a page of results for the server to return.
* Typically obtained by
* ListExamplesResponse.next_page_token google.cloud.datalabeling.v1beta1.ListExamplesResponse.next_page_token of the previous
* DataLabelingService.ListExamples call.
* Return first page if empty.
*/
// const pageToken = 'abc123'
// Imports the Datalabeling library
const {DataLabelingServiceClient} = require('@google-cloud/datalabeling').v1beta1;
// Instantiates a client
const datalabelingClient = new DataLabelingServiceClient();
async function callListExamples() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = await datalabelingClient.listExamplesAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListExamples();
listExamplesStream(request, options)
listExamplesStream(request?: protos.google.cloud.datalabeling.v1beta1.IListExamplesRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListExamplesRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Transform | {Stream} An object stream which emits an object representing [Example] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listExamplesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.
|
listInstructions(request, options)
listInstructions(request?: protos.google.cloud.datalabeling.v1beta1.IListInstructionsRequest, options?: CallOptions): Promise<[
protos.google.cloud.datalabeling.v1beta1.IInstruction[],
protos.google.cloud.datalabeling.v1beta1.IListInstructionsRequest | null,
protos.google.cloud.datalabeling.v1beta1.IListInstructionsResponse
]>;
Lists instructions for a project. Pagination is supported.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListInstructionsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
Promise<[
protos.google.cloud.datalabeling.v1beta1.IInstruction[],
protos.google.cloud.datalabeling.v1beta1.IListInstructionsRequest | null,
protos.google.cloud.datalabeling.v1beta1.IListInstructionsResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of [Instruction]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listInstructionsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.
|
listInstructions(request, options, callback)
listInstructions(request: protos.google.cloud.datalabeling.v1beta1.IListInstructionsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.datalabeling.v1beta1.IListInstructionsRequest, protos.google.cloud.datalabeling.v1beta1.IListInstructionsResponse | null | undefined, protos.google.cloud.datalabeling.v1beta1.IInstruction>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListInstructionsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.datalabeling.v1beta1.IListInstructionsRequest, protos.google.cloud.datalabeling.v1beta1.IListInstructionsResponse | null | undefined, protos.google.cloud.datalabeling.v1beta1.IInstruction>
|
Returns
listInstructions(request, callback)
listInstructions(request: protos.google.cloud.datalabeling.v1beta1.IListInstructionsRequest, callback: PaginationCallback<protos.google.cloud.datalabeling.v1beta1.IListInstructionsRequest, protos.google.cloud.datalabeling.v1beta1.IListInstructionsResponse | null | undefined, protos.google.cloud.datalabeling.v1beta1.IInstruction>): void;
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListInstructionsRequest
|
callback |
PaginationCallback<protos.google.cloud.datalabeling.v1beta1.IListInstructionsRequest, protos.google.cloud.datalabeling.v1beta1.IListInstructionsResponse | null | undefined, protos.google.cloud.datalabeling.v1beta1.IInstruction>
|
Returns
listInstructionsAsync(request, options)
listInstructionsAsync(request?: protos.google.cloud.datalabeling.v1beta1.IListInstructionsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.datalabeling.v1beta1.IInstruction>;
Equivalent to listInstructions
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters
Name | Description |
request |
protos.google.cloud.datalabeling.v1beta1.IListInstructionsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
AsyncIterable<protos.google.cloud.datalabeling.v1beta1.IInstruction> | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Instruction]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.
|
Example
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Instruction resource parent, format: