AutoML Server API.
The resource names are assigned by the server. The server never reuses names that it has created after the resources with those names are deleted.
An ID of a resource is the last element of the item's resource name. For projects/{project_id}/locations/{location_id}/datasets/{dataset_id}
, then the id for the item is {dataset_id}
.
Currently the only supported location_id
is "us-central1".
On any input that is documented to expect a string parameter in snake_case or dash-case, either of those cases is accepted. v1
Package
@google-cloud/automlConstructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
Construct an instance of AutoMlClient.
Parameters | |
---|---|
Name | Description |
opts |
ClientOptions
|
gaxInstance |
typeof gax | typeof fallback
: loaded instance of |
Properties
apiEndpoint
static get apiEndpoint(): string;
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
auth
auth: gax.GoogleAuth;
autoMlStub
autoMlStub?: 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
annotationSpecPath(project, location, dataset, annotationSpec)
annotationSpecPath(project: string, location: string, dataset: string, annotationSpec: string): string;
Return a fully-qualified annotationSpec resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
dataset |
string
|
annotationSpec |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
checkCreateDatasetProgress(name)
checkCreateDatasetProgress(name: string): Promise<LROperation<protos.google.cloud.automl.v1.Dataset, protos.google.cloud.automl.v1.OperationMetadata>>;
Check the status of the long running operation returned by createDataset()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.automl.v1.Dataset, protos.google.cloud.automl.v1.OperationMetadata>> | {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 for more details and examples. |
/**
* 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 resource name of the project to create the dataset for.
*/
// const parent = 'abc123'
/**
* Required. The dataset to create.
*/
// const dataset = {}
// Imports the Automl library
const {AutoMlClient} = require('@google-cloud/automl').v1;
// Instantiates a client
const automlClient = new AutoMlClient();
async function callCreateDataset() {
// Construct request
const request = {
parent,
dataset,
};
// Run request
const [operation] = await automlClient.createDataset(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateDataset();
checkCreateModelProgress(name)
checkCreateModelProgress(name: string): Promise<LROperation<protos.google.cloud.automl.v1.Model, protos.google.cloud.automl.v1.OperationMetadata>>;
Check the status of the long running operation returned by createModel()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.automl.v1.Model, protos.google.cloud.automl.v1.OperationMetadata>> | {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 for more details and examples. |
/**
* 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. Resource name of the parent project where the model is being created.
*/
// const parent = 'abc123'
/**
* Required. The model to create.
*/
// const model = {}
// Imports the Automl library
const {AutoMlClient} = require('@google-cloud/automl').v1;
// Instantiates a client
const automlClient = new AutoMlClient();
async function callCreateModel() {
// Construct request
const request = {
parent,
model,
};
// Run request
const [operation] = await automlClient.createModel(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateModel();
checkDeleteDatasetProgress(name)
checkDeleteDatasetProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.automl.v1.OperationMetadata>>;
Check the status of the long running operation returned by deleteDataset()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.automl.v1.OperationMetadata>> | {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 for more details and examples. |
/**
* 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 resource name of the dataset to delete.
*/
// const name = 'abc123'
// Imports the Automl library
const {AutoMlClient} = require('@google-cloud/automl').v1;
// Instantiates a client
const automlClient = new AutoMlClient();
async function callDeleteDataset() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await automlClient.deleteDataset(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteDataset();
checkDeleteModelProgress(name)
checkDeleteModelProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.automl.v1.OperationMetadata>>;
Check the status of the long running operation returned by deleteModel()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.automl.v1.OperationMetadata>> | {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 for more details and examples. |
/**
* 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. Resource name of the model being deleted.
*/
// const name = 'abc123'
// Imports the Automl library
const {AutoMlClient} = require('@google-cloud/automl').v1;
// Instantiates a client
const automlClient = new AutoMlClient();
async function callDeleteModel() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await automlClient.deleteModel(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteModel();
checkDeployModelProgress(name)
checkDeployModelProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.automl.v1.OperationMetadata>>;
Check the status of the long running operation returned by deployModel()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.automl.v1.OperationMetadata>> | {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 for more details and examples. |
/**
* 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.
*/
/**
* Model deployment metadata specific to Image Object Detection.
*/
// const imageObjectDetectionModelDeploymentMetadata = {}
/**
* Model deployment metadata specific to Image Classification.
*/
// const imageClassificationModelDeploymentMetadata = {}
/**
* Required. Resource name of the model to deploy.
*/
// const name = 'abc123'
// Imports the Automl library
const {AutoMlClient} = require('@google-cloud/automl').v1;
// Instantiates a client
const automlClient = new AutoMlClient();
async function callDeployModel() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await automlClient.deployModel(request);
const [response] = await operation.promise();
console.log(response);
}
callDeployModel();
checkExportDataProgress(name)
checkExportDataProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.automl.v1.OperationMetadata>>;
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.protobuf.Empty, protos.google.cloud.automl.v1.OperationMetadata>> | {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 for more details and examples. |
/**
* 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 resource name of the dataset.
*/
// const name = 'abc123'
/**
* Required. The desired output location.
*/
// const outputConfig = {}
// Imports the Automl library
const {AutoMlClient} = require('@google-cloud/automl').v1;
// Instantiates a client
const automlClient = new AutoMlClient();
async function callExportData() {
// Construct request
const request = {
name,
outputConfig,
};
// Run request
const [operation] = await automlClient.exportData(request);
const [response] = await operation.promise();
console.log(response);
}
callExportData();
checkExportModelProgress(name)
checkExportModelProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.automl.v1.OperationMetadata>>;
Check the status of the long running operation returned by exportModel()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.automl.v1.OperationMetadata>> | {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 for more details and examples. |
/**
* 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 resource name of the model to export.
*/
// const name = 'abc123'
/**
* Required. The desired output location and configuration.
*/
// const outputConfig = {}
// Imports the Automl library
const {AutoMlClient} = require('@google-cloud/automl').v1;
// Instantiates a client
const automlClient = new AutoMlClient();
async function callExportModel() {
// Construct request
const request = {
name,
outputConfig,
};
// Run request
const [operation] = await automlClient.exportModel(request);
const [response] = await operation.promise();
console.log(response);
}
callExportModel();
checkImportDataProgress(name)
checkImportDataProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.automl.v1.OperationMetadata>>;
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.protobuf.Empty, protos.google.cloud.automl.v1.OperationMetadata>> | {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 for more details and examples. |
/**
* 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 name. Dataset must already exist. All imported
* annotations and examples will be added.
*/
// const name = 'abc123'
/**
* Required. The desired input location and its domain specific semantics,
* if any.
*/
// const inputConfig = {}
// Imports the Automl library
const {AutoMlClient} = require('@google-cloud/automl').v1;
// Instantiates a client
const automlClient = new AutoMlClient();
async function callImportData() {
// Construct request
const request = {
name,
inputConfig,
};
// Run request
const [operation] = await automlClient.importData(request);
const [response] = await operation.promise();
console.log(response);
}
callImportData();
checkUndeployModelProgress(name)
checkUndeployModelProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.automl.v1.OperationMetadata>>;
Check the status of the long running operation returned by undeployModel()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.automl.v1.OperationMetadata>> | {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 for more details and examples. |
/**
* 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. Resource name of the model to undeploy.
*/
// const name = 'abc123'
// Imports the Automl library
const {AutoMlClient} = require('@google-cloud/automl').v1;
// Instantiates a client
const automlClient = new AutoMlClient();
async function callUndeployModel() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await automlClient.undeployModel(request);
const [response] = await operation.promise();
console.log(response);
}
callUndeployModel();
close()
close(): Promise<void>;
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. |
createDataset(request, options)
createDataset(request?: protos.google.cloud.automl.v1.ICreateDatasetRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.automl.v1.IDataset, protos.google.cloud.automl.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Creates a dataset.
Parameters | |
---|---|
Name | Description |
request |
ICreateDatasetRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.automl.v1.IDataset, protos.google.cloud.automl.v1.IOperationMetadata>,
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 |
/**
* 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 resource name of the project to create the dataset for.
*/
// const parent = 'abc123'
/**
* Required. The dataset to create.
*/
// const dataset = {}
// Imports the Automl library
const {AutoMlClient} = require('@google-cloud/automl').v1;
// Instantiates a client
const automlClient = new AutoMlClient();
async function callCreateDataset() {
// Construct request
const request = {
parent,
dataset,
};
// Run request
const [operation] = await automlClient.createDataset(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateDataset();
createDataset(request, options, callback)
createDataset(request: protos.google.cloud.automl.v1.ICreateDatasetRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.automl.v1.IDataset, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateDatasetRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.automl.v1.IDataset, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createDataset(request, callback)
createDataset(request: protos.google.cloud.automl.v1.ICreateDatasetRequest, callback: Callback<LROperation<protos.google.cloud.automl.v1.IDataset, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateDatasetRequest
|
callback |
Callback<LROperation<protos.google.cloud.automl.v1.IDataset, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createModel(request, options)
createModel(request?: protos.google.cloud.automl.v1.ICreateModelRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.automl.v1.IModel, protos.google.cloud.automl.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Creates a model. Returns a Model in the response field when it completes. When you create a model, several model evaluations are created for it: a global evaluation, and one evaluation for each annotation spec.
Parameters | |
---|---|
Name | Description |
request |
ICreateModelRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.automl.v1.IModel, protos.google.cloud.automl.v1.IOperationMetadata>,
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 |
/**
* 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. Resource name of the parent project where the model is being created.
*/
// const parent = 'abc123'
/**
* Required. The model to create.
*/
// const model = {}
// Imports the Automl library
const {AutoMlClient} = require('@google-cloud/automl').v1;
// Instantiates a client
const automlClient = new AutoMlClient();
async function callCreateModel() {
// Construct request
const request = {
parent,
model,
};
// Run request
const [operation] = await automlClient.createModel(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateModel();
createModel(request, options, callback)
createModel(request: protos.google.cloud.automl.v1.ICreateModelRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.automl.v1.IModel, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateModelRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.automl.v1.IModel, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createModel(request, callback)
createModel(request: protos.google.cloud.automl.v1.ICreateModelRequest, callback: Callback<LROperation<protos.google.cloud.automl.v1.IModel, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateModelRequest
|
callback |
Callback<LROperation<protos.google.cloud.automl.v1.IModel, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
datasetPath(project, location, dataset)
datasetPath(project: string, location: string, dataset: string): string;
Return a fully-qualified dataset resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
dataset |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
deleteDataset(request, options)
deleteDataset(request?: protos.google.cloud.automl.v1.IDeleteDatasetRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Deletes a dataset and all of its contents. Returns empty response in the response field when it completes, and delete_details
in the metadata field.
Parameters | |
---|---|
Name | Description |
request |
IDeleteDatasetRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>,
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 |
/**
* 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 resource name of the dataset to delete.
*/
// const name = 'abc123'
// Imports the Automl library
const {AutoMlClient} = require('@google-cloud/automl').v1;
// Instantiates a client
const automlClient = new AutoMlClient();
async function callDeleteDataset() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await automlClient.deleteDataset(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteDataset();
deleteDataset(request, options, callback)
deleteDataset(request: protos.google.cloud.automl.v1.IDeleteDatasetRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IDeleteDatasetRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteDataset(request, callback)
deleteDataset(request: protos.google.cloud.automl.v1.IDeleteDatasetRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IDeleteDatasetRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteModel(request, options)
deleteModel(request?: protos.google.cloud.automl.v1.IDeleteModelRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Deletes a model. Returns google.protobuf.Empty
in the response field when it completes, and delete_details
in the metadata field.
Parameters | |
---|---|
Name | Description |
request |
IDeleteModelRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>,
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 |
/**
* 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. Resource name of the model being deleted.
*/
// const name = 'abc123'
// Imports the Automl library
const {AutoMlClient} = require('@google-cloud/automl').v1;
// Instantiates a client
const automlClient = new AutoMlClient();
async function callDeleteModel() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await automlClient.deleteModel(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteModel();
deleteModel(request, options, callback)
deleteModel(request: protos.google.cloud.automl.v1.IDeleteModelRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IDeleteModelRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteModel(request, callback)
deleteModel(request: protos.google.cloud.automl.v1.IDeleteModelRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IDeleteModelRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deployModel(request, options)
deployModel(request?: protos.google.cloud.automl.v1.IDeployModelRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Deploys a model. If a model is already deployed, deploying it with the same parameters has no effect. Deploying with different parametrs (as e.g. changing ) will reset the deployment state without pausing the model's availability.
Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage deployment automatically.
Returns an empty response in the response field when it completes.
Parameters | |
---|---|
Name | Description |
request |
IDeployModelRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>,
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 |
/**
* 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.
*/
/**
* Model deployment metadata specific to Image Object Detection.
*/
// const imageObjectDetectionModelDeploymentMetadata = {}
/**
* Model deployment metadata specific to Image Classification.
*/
// const imageClassificationModelDeploymentMetadata = {}
/**
* Required. Resource name of the model to deploy.
*/
// const name = 'abc123'
// Imports the Automl library
const {AutoMlClient} = require('@google-cloud/automl').v1;
// Instantiates a client
const automlClient = new AutoMlClient();
async function callDeployModel() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await automlClient.deployModel(request);
const [response] = await operation.promise();
console.log(response);
}
callDeployModel();
deployModel(request, options, callback)
deployModel(request: protos.google.cloud.automl.v1.IDeployModelRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IDeployModelRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deployModel(request, callback)
deployModel(request: protos.google.cloud.automl.v1.IDeployModelRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IDeployModelRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
exportData(request, options)
exportData(request?: protos.google.cloud.automl.v1.IExportDataRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Exports dataset's data to the provided output location. Returns an empty response in the response field when it completes.
Parameters | |
---|---|
Name | Description |
request |
IExportDataRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>,
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 |
/**
* 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 resource name of the dataset.
*/
// const name = 'abc123'
/**
* Required. The desired output location.
*/
// const outputConfig = {}
// Imports the Automl library
const {AutoMlClient} = require('@google-cloud/automl').v1;
// Instantiates a client
const automlClient = new AutoMlClient();
async function callExportData() {
// Construct request
const request = {
name,
outputConfig,
};
// Run request
const [operation] = await automlClient.exportData(request);
const [response] = await operation.promise();
console.log(response);
}
callExportData();
exportData(request, options, callback)
exportData(request: protos.google.cloud.automl.v1.IExportDataRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IExportDataRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
exportData(request, callback)
exportData(request: protos.google.cloud.automl.v1.IExportDataRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IExportDataRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
exportModel(request, options)
exportModel(request?: protos.google.cloud.automl.v1.IExportModelRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Exports a trained, "export-able", model to a user specified Google Cloud Storage location. A model is considered export-able if and only if it has an export format defined for it in ModelExportOutputConfig.
Returns an empty response in the response field when it completes.
Parameters | |
---|---|
Name | Description |
request |
IExportModelRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>,
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 |
/**
* 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 resource name of the model to export.
*/
// const name = 'abc123'
/**
* Required. The desired output location and configuration.
*/
// const outputConfig = {}
// Imports the Automl library
const {AutoMlClient} = require('@google-cloud/automl').v1;
// Instantiates a client
const automlClient = new AutoMlClient();
async function callExportModel() {
// Construct request
const request = {
name,
outputConfig,
};
// Run request
const [operation] = await automlClient.exportModel(request);
const [response] = await operation.promise();
console.log(response);
}
callExportModel();
exportModel(request, options, callback)
exportModel(request: protos.google.cloud.automl.v1.IExportModelRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IExportModelRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
exportModel(request, callback)
exportModel(request: protos.google.cloud.automl.v1.IExportModelRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IExportModelRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getAnnotationSpec(request, options)
getAnnotationSpec(request?: protos.google.cloud.automl.v1.IGetAnnotationSpecRequest, options?: CallOptions): Promise<[
protos.google.cloud.automl.v1.IAnnotationSpec,
protos.google.cloud.automl.v1.IGetAnnotationSpecRequest | undefined,
{} | undefined
]>;
Gets an annotation spec.
Parameters | |
---|---|
Name | Description |
request |
IGetAnnotationSpecRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.automl.v1.IAnnotationSpec,
protos.google.cloud.automl.v1.IGetAnnotationSpecRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing AnnotationSpec. Please see the documentation for more details and examples. |
/**
* 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 resource name of the annotation spec to retrieve.
*/
// const name = 'abc123'
// Imports the Automl library
const {AutoMlClient} = require('@google-cloud/automl').v1;
// Instantiates a client
const automlClient = new AutoMlClient();
async function callGetAnnotationSpec() {
// Construct request
const request = {
name,
};
// Run request
const response = await automlClient.getAnnotationSpec(request);
console.log(response);
}
callGetAnnotationSpec();
getAnnotationSpec(request, options, callback)
getAnnotationSpec(request: protos.google.cloud.automl.v1.IGetAnnotationSpecRequest, options: CallOptions, callback: Callback<protos.google.cloud.automl.v1.IAnnotationSpec, protos.google.cloud.automl.v1.IGetAnnotationSpecRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IGetAnnotationSpecRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.automl.v1.IAnnotationSpec, protos.google.cloud.automl.v1.IGetAnnotationSpecRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getAnnotationSpec(request, callback)
getAnnotationSpec(request: protos.google.cloud.automl.v1.IGetAnnotationSpecRequest, callback: Callback<protos.google.cloud.automl.v1.IAnnotationSpec, protos.google.cloud.automl.v1.IGetAnnotationSpecRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IGetAnnotationSpecRequest
|
callback |
Callback<protos.google.cloud.automl.v1.IAnnotationSpec, protos.google.cloud.automl.v1.IGetAnnotationSpecRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getDataset(request, options)
getDataset(request?: protos.google.cloud.automl.v1.IGetDatasetRequest, options?: CallOptions): Promise<[
protos.google.cloud.automl.v1.IDataset,
protos.google.cloud.automl.v1.IGetDatasetRequest | undefined,
{} | undefined
]>;
Gets a dataset.
Parameters | |
---|---|
Name | Description |
request |
IGetDatasetRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.automl.v1.IDataset,
protos.google.cloud.automl.v1.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 for more details and examples. |
/**
* 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 resource name of the dataset to retrieve.
*/
// const name = 'abc123'
// Imports the Automl library
const {AutoMlClient} = require('@google-cloud/automl').v1;
// Instantiates a client
const automlClient = new AutoMlClient();
async function callGetDataset() {
// Construct request
const request = {
name,
};
// Run request
const response = await automlClient.getDataset(request);
console.log(response);
}
callGetDataset();
getDataset(request, options, callback)
getDataset(request: protos.google.cloud.automl.v1.IGetDatasetRequest, options: CallOptions, callback: Callback<protos.google.cloud.automl.v1.IDataset, protos.google.cloud.automl.v1.IGetDatasetRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IGetDatasetRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.automl.v1.IDataset, protos.google.cloud.automl.v1.IGetDatasetRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getDataset(request, callback)
getDataset(request: protos.google.cloud.automl.v1.IGetDatasetRequest, callback: Callback<protos.google.cloud.automl.v1.IDataset, protos.google.cloud.automl.v1.IGetDatasetRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IGetDatasetRequest
|
callback |
Callback<protos.google.cloud.automl.v1.IDataset, protos.google.cloud.automl.v1.IGetDatasetRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getModel(request, options)
getModel(request?: protos.google.cloud.automl.v1.IGetModelRequest, options?: CallOptions): Promise<[
protos.google.cloud.automl.v1.IModel,
protos.google.cloud.automl.v1.IGetModelRequest | undefined,
{} | undefined
]>;
Gets a model.
Parameters | |
---|---|
Name | Description |
request |
IGetModelRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.automl.v1.IModel,
protos.google.cloud.automl.v1.IGetModelRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* 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. Resource name of the model.
*/
// const name = 'abc123'
// Imports the Automl library
const {AutoMlClient} = require('@google-cloud/automl').v1;
// Instantiates a client
const automlClient = new AutoMlClient();
async function callGetModel() {
// Construct request
const request = {
name,
};
// Run request
const response = await automlClient.getModel(request);
console.log(response);
}
callGetModel();
getModel(request, options, callback)
getModel(request: protos.google.cloud.automl.v1.IGetModelRequest, options: CallOptions, callback: Callback<protos.google.cloud.automl.v1.IModel, protos.google.cloud.automl.v1.IGetModelRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IGetModelRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.automl.v1.IModel, protos.google.cloud.automl.v1.IGetModelRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getModel(request, callback)
getModel(request: protos.google.cloud.automl.v1.IGetModelRequest, callback: Callback<protos.google.cloud.automl.v1.IModel, protos.google.cloud.automl.v1.IGetModelRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IGetModelRequest
|
callback |
Callback<protos.google.cloud.automl.v1.IModel, protos.google.cloud.automl.v1.IGetModelRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getModelEvaluation(request, options)
getModelEvaluation(request?: protos.google.cloud.automl.v1.IGetModelEvaluationRequest, options?: CallOptions): Promise<[
protos.google.cloud.automl.v1.IModelEvaluation,
protos.google.cloud.automl.v1.IGetModelEvaluationRequest | undefined,
{} | undefined
]>;
Gets a model evaluation.
Parameters | |
---|---|
Name | Description |
request |
IGetModelEvaluationRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.automl.v1.IModelEvaluation,
protos.google.cloud.automl.v1.IGetModelEvaluationRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing ModelEvaluation. Please see the documentation for more details and examples. |
/**
* 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. Resource name for the model evaluation.
*/
// const name = 'abc123'
// Imports the Automl library
const {AutoMlClient} = require('@google-cloud/automl').v1;
// Instantiates a client
const automlClient = new AutoMlClient();
async function callGetModelEvaluation() {
// Construct request
const request = {
name,
};
// Run request
const response = await automlClient.getModelEvaluation(request);
console.log(response);
}
callGetModelEvaluation();
getModelEvaluation(request, options, callback)
getModelEvaluation(request: protos.google.cloud.automl.v1.IGetModelEvaluationRequest, options: CallOptions, callback: Callback<protos.google.cloud.automl.v1.IModelEvaluation, protos.google.cloud.automl.v1.IGetModelEvaluationRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IGetModelEvaluationRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.automl.v1.IModelEvaluation, protos.google.cloud.automl.v1.IGetModelEvaluationRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getModelEvaluation(request, callback)
getModelEvaluation(request: protos.google.cloud.automl.v1.IGetModelEvaluationRequest, callback: Callback<protos.google.cloud.automl.v1.IModelEvaluation, protos.google.cloud.automl.v1.IGetModelEvaluationRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IGetModelEvaluationRequest
|
callback |
Callback<protos.google.cloud.automl.v1.IModelEvaluation, protos.google.cloud.automl.v1.IGetModelEvaluationRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
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 | |
---|---|
Type | Description |
void |
importData(request, options)
importData(request?: protos.google.cloud.automl.v1.IImportDataRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Imports data into a dataset. For Tables this method can only be called on an empty Dataset.
For Tables: * A schema_inference_version parameter must be explicitly set. Returns an empty response in the response field when it completes.
Parameters | |
---|---|
Name | Description |
request |
IImportDataRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>,
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 |
/**
* 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 name. Dataset must already exist. All imported
* annotations and examples will be added.
*/
// const name = 'abc123'
/**
* Required. The desired input location and its domain specific semantics,
* if any.
*/
// const inputConfig = {}
// Imports the Automl library
const {AutoMlClient} = require('@google-cloud/automl').v1;
// Instantiates a client
const automlClient = new AutoMlClient();
async function callImportData() {
// Construct request
const request = {
name,
inputConfig,
};
// Run request
const [operation] = await automlClient.importData(request);
const [response] = await operation.promise();
console.log(response);
}
callImportData();
importData(request, options, callback)
importData(request: protos.google.cloud.automl.v1.IImportDataRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IImportDataRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
importData(request, callback)
importData(request: protos.google.cloud.automl.v1.IImportDataRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IImportDataRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
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. |
listDatasets(request, options)
listDatasets(request?: protos.google.cloud.automl.v1.IListDatasetsRequest, options?: CallOptions): Promise<[
protos.google.cloud.automl.v1.IDataset[],
protos.google.cloud.automl.v1.IListDatasetsRequest | null,
protos.google.cloud.automl.v1.IListDatasetsResponse
]>;
Lists datasets in a project.
Parameters | |
---|---|
Name | Description |
request |
IListDatasetsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.automl.v1.IDataset[],
protos.google.cloud.automl.v1.IListDatasetsRequest | null,
protos.google.cloud.automl.v1.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 |
listDatasets(request, options, callback)
listDatasets(request: protos.google.cloud.automl.v1.IListDatasetsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.automl.v1.IListDatasetsRequest, protos.google.cloud.automl.v1.IListDatasetsResponse | null | undefined, protos.google.cloud.automl.v1.IDataset>): void;
Parameters | |
---|---|
Name | Description |
request |
IListDatasetsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.automl.v1.IListDatasetsRequest, protos.google.cloud.automl.v1.IListDatasetsResponse | null | undefined, protos.google.cloud.automl.v1.IDataset>
|
Returns | |
---|---|
Type | Description |
void |
listDatasets(request, callback)
listDatasets(request: protos.google.cloud.automl.v1.IListDatasetsRequest, callback: PaginationCallback<protos.google.cloud.automl.v1.IListDatasetsRequest, protos.google.cloud.automl.v1.IListDatasetsResponse | null | undefined, protos.google.cloud.automl.v1.IDataset>): void;
Parameters | |
---|---|
Name | Description |
request |
IListDatasetsRequest
|
callback |
PaginationCallback<protos.google.cloud.automl.v1.IListDatasetsRequest, protos.google.cloud.automl.v1.IListDatasetsResponse | null | undefined, protos.google.cloud.automl.v1.IDataset>
|
Returns | |
---|---|
Type | Description |
void |
listDatasetsAsync(request, options)
listDatasetsAsync(request?: protos.google.cloud.automl.v1.IListDatasetsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.automl.v1.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 |
IListDatasetsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.automl.v1.IDataset> | {Object} An iterable Object that allows async iteration. 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 for more details and examples. |
/**
* 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 resource name of the project from which to list datasets.
*/
// const parent = 'abc123'
/**
* An expression for filtering the results of the request.
* * `dataset_metadata` - for existence of the case (e.g.
* `image_classification_dataset_metadata:*`). Some examples of using the filter are:
* * `translation_dataset_metadata:*` --> The dataset has
* `translation_dataset_metadata`.
*/
// const filter = 'abc123'
/**
* Requested page size. Server may return fewer results than requested.
* If unspecified, server will pick a default size.
*/
// const pageSize = 1234
/**
* A token identifying a page of results for the server to return
* Typically obtained via
* ListDatasetsResponse.next_page_token google.cloud.automl.v1.ListDatasetsResponse.next_page_token of the previous
* AutoMl.ListDatasets google.cloud.automl.v1.AutoMl.ListDatasets call.
*/
// const pageToken = 'abc123'
// Imports the Automl library
const {AutoMlClient} = require('@google-cloud/automl').v1;
// Instantiates a client
const automlClient = new AutoMlClient();
async function callListDatasets() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = await automlClient.listDatasetsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListDatasets();
listDatasetsStream(request, options)
listDatasetsStream(request?: protos.google.cloud.automl.v1.IListDatasetsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
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 |
listModelEvaluations(request, options)
listModelEvaluations(request?: protos.google.cloud.automl.v1.IListModelEvaluationsRequest, options?: CallOptions): Promise<[
protos.google.cloud.automl.v1.IModelEvaluation[],
protos.google.cloud.automl.v1.IListModelEvaluationsRequest | null,
protos.google.cloud.automl.v1.IListModelEvaluationsResponse
]>;
Lists model evaluations.
Parameters | |
---|---|
Name | Description |
request |
IListModelEvaluationsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.automl.v1.IModelEvaluation[],
protos.google.cloud.automl.v1.IListModelEvaluationsRequest | null,
protos.google.cloud.automl.v1.IListModelEvaluationsResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of ModelEvaluation. 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 |
listModelEvaluations(request, options, callback)
listModelEvaluations(request: protos.google.cloud.automl.v1.IListModelEvaluationsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.automl.v1.IListModelEvaluationsRequest, protos.google.cloud.automl.v1.IListModelEvaluationsResponse | null | undefined, protos.google.cloud.automl.v1.IModelEvaluation>): void;
Parameters | |
---|---|
Name | Description |
request |
IListModelEvaluationsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.automl.v1.IListModelEvaluationsRequest, protos.google.cloud.automl.v1.IListModelEvaluationsResponse | null | undefined, protos.google.cloud.automl.v1.IModelEvaluation>
|
Returns | |
---|---|
Type | Description |
void |
listModelEvaluations(request, callback)
listModelEvaluations(request: protos.google.cloud.automl.v1.IListModelEvaluationsRequest, callback: PaginationCallback<protos.google.cloud.automl.v1.IListModelEvaluationsRequest, protos.google.cloud.automl.v1.IListModelEvaluationsResponse | null | undefined, protos.google.cloud.automl.v1.IModelEvaluation>): void;
Parameters | |
---|---|
Name | Description |
request |
IListModelEvaluationsRequest
|
callback |
PaginationCallback<protos.google.cloud.automl.v1.IListModelEvaluationsRequest, protos.google.cloud.automl.v1.IListModelEvaluationsResponse | null | undefined, protos.google.cloud.automl.v1.IModelEvaluation>
|
Returns | |
---|---|
Type | Description |
void |
listModelEvaluationsAsync(request, options)
listModelEvaluationsAsync(request?: protos.google.cloud.automl.v1.IListModelEvaluationsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.automl.v1.IModelEvaluation>;
Equivalent to listModelEvaluations
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
IListModelEvaluationsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.automl.v1.IModelEvaluation> | {Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing ModelEvaluation. 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 for more details and examples. |
/**
* 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. Resource name of the model to list the model evaluations for.
* If modelId is set as "-", this will list model evaluations from across all
* models of the parent location.
*/
// const parent = 'abc123'
/**
* Required. An expression for filtering the results of the request.
* * `annotation_spec_id` - for =, != or existence. See example below for
* the last.
* Some examples of using the filter are:
* * `annotation_spec_id!=4` --> The model evaluation was done for
* annotation spec with ID different than 4.
* * `NOT annotation_spec_id:*` --> The model evaluation was done for
* aggregate of all annotation specs.
*/
// const filter = 'abc123'
/**
* Requested page size.
*/
// const pageSize = 1234
/**
* A token identifying a page of results for the server to return.
* Typically obtained via
* ListModelEvaluationsResponse.next_page_token google.cloud.automl.v1.ListModelEvaluationsResponse.next_page_token of the previous
* AutoMl.ListModelEvaluations google.cloud.automl.v1.AutoMl.ListModelEvaluations call.
*/
// const pageToken = 'abc123'
// Imports the Automl library
const {AutoMlClient} = require('@google-cloud/automl').v1;
// Instantiates a client
const automlClient = new AutoMlClient();
async function callListModelEvaluations() {
// Construct request
const request = {
parent,
filter,
};
// Run request
const iterable = await automlClient.listModelEvaluationsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListModelEvaluations();
listModelEvaluationsStream(request, options)
listModelEvaluationsStream(request?: protos.google.cloud.automl.v1.IListModelEvaluationsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
IListModelEvaluationsRequest
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 ModelEvaluation 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 |
listModels(request, options)
listModels(request?: protos.google.cloud.automl.v1.IListModelsRequest, options?: CallOptions): Promise<[
protos.google.cloud.automl.v1.IModel[],
protos.google.cloud.automl.v1.IListModelsRequest | null,
protos.google.cloud.automl.v1.IListModelsResponse
]>;
Lists models.
Parameters | |
---|---|
Name | Description |
request |
IListModelsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.automl.v1.IModel[],
protos.google.cloud.automl.v1.IListModelsRequest | null,
protos.google.cloud.automl.v1.IListModelsResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of . 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 |
listModels(request, options, callback)
listModels(request: protos.google.cloud.automl.v1.IListModelsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.automl.v1.IListModelsRequest, protos.google.cloud.automl.v1.IListModelsResponse | null | undefined, protos.google.cloud.automl.v1.IModel>): void;
Parameters | |
---|---|
Name | Description |
request |
IListModelsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.automl.v1.IListModelsRequest, protos.google.cloud.automl.v1.IListModelsResponse | null | undefined, protos.google.cloud.automl.v1.IModel>
|
Returns | |
---|---|
Type | Description |
void |
listModels(request, callback)
listModels(request: protos.google.cloud.automl.v1.IListModelsRequest, callback: PaginationCallback<protos.google.cloud.automl.v1.IListModelsRequest, protos.google.cloud.automl.v1.IListModelsResponse | null | undefined, protos.google.cloud.automl.v1.IModel>): void;
Parameters | |
---|---|
Name | Description |
request |
IListModelsRequest
|
callback |
PaginationCallback<protos.google.cloud.automl.v1.IListModelsRequest, protos.google.cloud.automl.v1.IListModelsResponse | null | undefined, protos.google.cloud.automl.v1.IModel>
|
Returns | |
---|---|
Type | Description |
void |
listModelsAsync(request, options)
listModelsAsync(request?: protos.google.cloud.automl.v1.IListModelsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.automl.v1.IModel>;
Equivalent to listModels
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
IListModelsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.automl.v1.IModel> | {Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . 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 for more details and examples. |
/**
* 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. Resource name of the project, from which to list the models.
*/
// const parent = 'abc123'
/**
* An expression for filtering the results of the request.
* * `model_metadata` - for existence of the case (e.g.
* `video_classification_model_metadata:*`).
* * `dataset_id` - for = or !=. Some examples of using the filter are:
* * `image_classification_model_metadata:*` --> The model has
* `image_classification_model_metadata`.
* * `dataset_id=5` --> The model was created from a dataset with ID 5.
*/
// const filter = 'abc123'
/**
* Requested page size.
*/
// const pageSize = 1234
/**
* A token identifying a page of results for the server to return
* Typically obtained via
* ListModelsResponse.next_page_token google.cloud.automl.v1.ListModelsResponse.next_page_token of the previous
* AutoMl.ListModels google.cloud.automl.v1.AutoMl.ListModels call.
*/
// const pageToken = 'abc123'
// Imports the Automl library
const {AutoMlClient} = require('@google-cloud/automl').v1;
// Instantiates a client
const automlClient = new AutoMlClient();
async function callListModels() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = await automlClient.listModelsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListModels();
listModelsStream(request, options)
listModelsStream(request?: protos.google.cloud.automl.v1.IListModelsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
IListModelsRequest
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 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 |
locationPath(project, location)
locationPath(project: string, location: string): string;
Return a fully-qualified location resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
matchAnnotationSpecFromAnnotationSpecName(annotationSpecName)
matchAnnotationSpecFromAnnotationSpecName(annotationSpecName: string): string | number;
Parse the annotation_spec from AnnotationSpec resource.
Parameter | |
---|---|
Name | Description |
annotationSpecName |
string
A fully-qualified path representing AnnotationSpec resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the annotation_spec. |
matchDatasetFromAnnotationSpecName(annotationSpecName)
matchDatasetFromAnnotationSpecName(annotationSpecName: string): string | number;
Parse the dataset from AnnotationSpec resource.
Parameter | |
---|---|
Name | Description |
annotationSpecName |
string
A fully-qualified path representing AnnotationSpec resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the dataset. |
matchDatasetFromDatasetName(datasetName)
matchDatasetFromDatasetName(datasetName: string): string | number;
Parse the dataset from Dataset resource.
Parameter | |
---|---|
Name | Description |
datasetName |
string
A fully-qualified path representing Dataset resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the dataset. |
matchLocationFromAnnotationSpecName(annotationSpecName)
matchLocationFromAnnotationSpecName(annotationSpecName: string): string | number;
Parse the location from AnnotationSpec resource.
Parameter | |
---|---|
Name | Description |
annotationSpecName |
string
A fully-qualified path representing AnnotationSpec resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromDatasetName(datasetName)
matchLocationFromDatasetName(datasetName: string): string | number;
Parse the location from Dataset resource.
Parameter | |
---|---|
Name | Description |
datasetName |
string
A fully-qualified path representing Dataset resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromLocationName(locationName)
matchLocationFromLocationName(locationName: string): string | number;
Parse the location from Location resource.
Parameter | |
---|---|
Name | Description |
locationName |
string
A fully-qualified path representing Location resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromModelEvaluationName(modelEvaluationName)
matchLocationFromModelEvaluationName(modelEvaluationName: string): string | number;
Parse the location from ModelEvaluation resource.
Parameter | |
---|---|
Name | Description |
modelEvaluationName |
string
A fully-qualified path representing ModelEvaluation resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromModelName(modelName)
matchLocationFromModelName(modelName: string): string | number;
Parse the location from Model resource.
Parameter | |
---|---|
Name | Description |
modelName |
string
A fully-qualified path representing Model resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchModelEvaluationFromModelEvaluationName(modelEvaluationName)
matchModelEvaluationFromModelEvaluationName(modelEvaluationName: string): string | number;
Parse the model_evaluation from ModelEvaluation resource.
Parameter | |
---|---|
Name | Description |
modelEvaluationName |
string
A fully-qualified path representing ModelEvaluation resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the model_evaluation. |
matchModelFromModelEvaluationName(modelEvaluationName)
matchModelFromModelEvaluationName(modelEvaluationName: string): string | number;
Parse the model from ModelEvaluation resource.
Parameter | |
---|---|
Name | Description |
modelEvaluationName |
string
A fully-qualified path representing ModelEvaluation resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the model. |
matchModelFromModelName(modelName)
matchModelFromModelName(modelName: string): string | number;
Parse the model from Model resource.
Parameter | |
---|---|
Name | Description |
modelName |
string
A fully-qualified path representing Model resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the model. |
matchProjectFromAnnotationSpecName(annotationSpecName)
matchProjectFromAnnotationSpecName(annotationSpecName: string): string | number;
Parse the project from AnnotationSpec resource.
Parameter | |
---|---|
Name | Description |
annotationSpecName |
string
A fully-qualified path representing AnnotationSpec resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromDatasetName(datasetName)
matchProjectFromDatasetName(datasetName: string): string | number;
Parse the project from Dataset resource.
Parameter | |
---|---|
Name | Description |
datasetName |
string
A fully-qualified path representing Dataset resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromLocationName(locationName)
matchProjectFromLocationName(locationName: string): string | number;
Parse the project from Location resource.
Parameter | |
---|---|
Name | Description |
locationName |
string
A fully-qualified path representing Location resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromModelEvaluationName(modelEvaluationName)
matchProjectFromModelEvaluationName(modelEvaluationName: string): string | number;
Parse the project from ModelEvaluation resource.
Parameter | |
---|---|
Name | Description |
modelEvaluationName |
string
A fully-qualified path representing ModelEvaluation resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromModelName(modelName)
matchProjectFromModelName(modelName: string): string | number;
Parse the project from Model resource.
Parameter | |
---|---|
Name | Description |
modelName |
string
A fully-qualified path representing Model resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
modelEvaluationPath(project, location, model, modelEvaluation)
modelEvaluationPath(project: string, location: string, model: string, modelEvaluation: string): string;
Return a fully-qualified modelEvaluation resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
model |
string
|
modelEvaluation |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
modelPath(project, location, model)
modelPath(project: string, location: string, model: string): string;
Return a fully-qualified model resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
model |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
undeployModel(request, options)
undeployModel(request?: protos.google.cloud.automl.v1.IUndeployModelRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Undeploys a model. If the model is not deployed this method has no effect.
Only applicable for Text Classification, Image Object Detection and Tables; all other domains manage deployment automatically.
Returns an empty response in the response field when it completes.
Parameters | |
---|---|
Name | Description |
request |
IUndeployModelRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>,
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 |
/**
* 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. Resource name of the model to undeploy.
*/
// const name = 'abc123'
// Imports the Automl library
const {AutoMlClient} = require('@google-cloud/automl').v1;
// Instantiates a client
const automlClient = new AutoMlClient();
async function callUndeployModel() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await automlClient.undeployModel(request);
const [response] = await operation.promise();
console.log(response);
}
callUndeployModel();
undeployModel(request, options, callback)
undeployModel(request: protos.google.cloud.automl.v1.IUndeployModelRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IUndeployModelRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
undeployModel(request, callback)
undeployModel(request: protos.google.cloud.automl.v1.IUndeployModelRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IUndeployModelRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.automl.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
updateDataset(request, options)
updateDataset(request?: protos.google.cloud.automl.v1.IUpdateDatasetRequest, options?: CallOptions): Promise<[
protos.google.cloud.automl.v1.IDataset,
protos.google.cloud.automl.v1.IUpdateDatasetRequest | undefined,
{} | undefined
]>;
Updates a dataset.
Parameters | |
---|---|
Name | Description |
request |
IUpdateDatasetRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.automl.v1.IDataset,
protos.google.cloud.automl.v1.IUpdateDatasetRequest | 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 for more details and examples. |
/**
* 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 dataset which replaces the resource on the server.
*/
// const dataset = {}
/**
* Required. The update mask applies to the resource.
*/
// const updateMask = {}
// Imports the Automl library
const {AutoMlClient} = require('@google-cloud/automl').v1;
// Instantiates a client
const automlClient = new AutoMlClient();
async function callUpdateDataset() {
// Construct request
const request = {
dataset,
updateMask,
};
// Run request
const response = await automlClient.updateDataset(request);
console.log(response);
}
callUpdateDataset();
updateDataset(request, options, callback)
updateDataset(request: protos.google.cloud.automl.v1.IUpdateDatasetRequest, options: CallOptions, callback: Callback<protos.google.cloud.automl.v1.IDataset, protos.google.cloud.automl.v1.IUpdateDatasetRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IUpdateDatasetRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.automl.v1.IDataset, protos.google.cloud.automl.v1.IUpdateDatasetRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
updateDataset(request, callback)
updateDataset(request: protos.google.cloud.automl.v1.IUpdateDatasetRequest, callback: Callback<protos.google.cloud.automl.v1.IDataset, protos.google.cloud.automl.v1.IUpdateDatasetRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IUpdateDatasetRequest
|
callback |
Callback<protos.google.cloud.automl.v1.IDataset, protos.google.cloud.automl.v1.IUpdateDatasetRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
updateModel(request, options)
updateModel(request?: protos.google.cloud.automl.v1.IUpdateModelRequest, options?: CallOptions): Promise<[
protos.google.cloud.automl.v1.IModel,
protos.google.cloud.automl.v1.IUpdateModelRequest | undefined,
{} | undefined
]>;
Updates a model.
Parameters | |
---|---|
Name | Description |
request |
IUpdateModelRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.automl.v1.IModel,
protos.google.cloud.automl.v1.IUpdateModelRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* 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 model which replaces the resource on the server.
*/
// const model = {}
/**
* Required. The update mask applies to the resource.
*/
// const updateMask = {}
// Imports the Automl library
const {AutoMlClient} = require('@google-cloud/automl').v1;
// Instantiates a client
const automlClient = new AutoMlClient();
async function callUpdateModel() {
// Construct request
const request = {
model,
updateMask,
};
// Run request
const response = await automlClient.updateModel(request);
console.log(response);
}
callUpdateModel();
updateModel(request, options, callback)
updateModel(request: protos.google.cloud.automl.v1.IUpdateModelRequest, options: CallOptions, callback: Callback<protos.google.cloud.automl.v1.IModel, protos.google.cloud.automl.v1.IUpdateModelRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IUpdateModelRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.automl.v1.IModel, protos.google.cloud.automl.v1.IUpdateModelRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
updateModel(request, callback)
updateModel(request: protos.google.cloud.automl.v1.IUpdateModelRequest, callback: Callback<protos.google.cloud.automl.v1.IModel, protos.google.cloud.automl.v1.IUpdateModelRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IUpdateModelRequest
|
callback |
Callback<protos.google.cloud.automl.v1.IModel, protos.google.cloud.automl.v1.IUpdateModelRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |