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.
opts
ClientOptions
gaxInstance
typeof gax
| typeof 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 AutoMlClient({fallback: true}, gax); ```
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.
project
string
location
string
dataset
string
annotationSpec
string
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()
.
name
string
The operation name that will be passed.
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()
.
name
string
The operation name that will be passed.
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()
.
name
string
The operation name that will be passed.
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()
.
name
string
The operation name that will be passed.
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()
.
name
string
The operation name that will be passed.
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()
.
name
string
The operation name that will be passed.
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()
.
name
string
The operation name that will be passed.
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()
.
name
string
The operation name that will be passed.
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()
.
name
string
The operation name that will be passed.
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.
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.
request
options
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 promise()
method returns a promise you can await
for. 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
();
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
;
request
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
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
;
request
callback
Callback
< LROperation
< protos.google.cloud.automl.v1.IDataset
, protos.google.cloud.automl.v1.IOperationMetadata
>, protos.google.longrunning.IOperation
| null | undefined, {} | null | undefined>
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.
request
options
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 promise()
method returns a promise you can await
for. 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
();
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
;
request
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
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
;
request
callback
Callback
< LROperation
< protos.google.cloud.automl.v1.IModel
, protos.google.cloud.automl.v1.IOperationMetadata
>, protos.google.longrunning.IOperation
| null | undefined, {} | null | undefined>
void
datasetPath(project, location, dataset)
datasetPath
(
project
:
string
,
location
:
string
,
dataset
:
string
)
:
string
;
Return a fully-qualified dataset resource name string.
project
string
location
string
dataset
string
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.
request
options
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 promise()
method returns a promise you can await
for. 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
();
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
;
request
options
CallOptions
callback
Callback
< LROperation
< protos.google.protobuf.IEmpty
, protos.google.cloud.automl.v1.IOperationMetadata
>, protos.google.longrunning.IOperation
| null | undefined, {} | null | undefined>
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
;
request
callback
Callback
< LROperation
< protos.google.protobuf.IEmpty
, protos.google.cloud.automl.v1.IOperationMetadata
>, protos.google.longrunning.IOperation
| null | undefined, {} | null | undefined>
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.
request
options
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 promise()
method returns a promise you can await
for. 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
();
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
;
request
options
CallOptions
callback
Callback
< LROperation
< protos.google.protobuf.IEmpty
, protos.google.cloud.automl.v1.IOperationMetadata
>, protos.google.longrunning.IOperation
| null | undefined, {} | null | undefined>
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
;
request
callback
Callback
< LROperation
< protos.google.protobuf.IEmpty
, protos.google.cloud.automl.v1.IOperationMetadata
>, protos.google.longrunning.IOperation
| null | undefined, {} | null | undefined>
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.
request
options
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 promise()
method returns a promise you can await
for. 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
();
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
;
request
options
CallOptions
callback
Callback
< LROperation
< protos.google.protobuf.IEmpty
, protos.google.cloud.automl.v1.IOperationMetadata
>, protos.google.longrunning.IOperation
| null | undefined, {} | null | undefined>
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
;
request
callback
Callback
< LROperation
< protos.google.protobuf.IEmpty
, protos.google.cloud.automl.v1.IOperationMetadata
>, protos.google.longrunning.IOperation
| null | undefined, {} | null | undefined>
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.
request
options
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 promise()
method returns a promise you can await
for. 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
();
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
;
request
options
CallOptions
callback
Callback
< LROperation
< protos.google.protobuf.IEmpty
, protos.google.cloud.automl.v1.IOperationMetadata
>, protos.google.longrunning.IOperation
| null | undefined, {} | null | undefined>
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
;
request
callback
Callback
< LROperation
< protos.google.protobuf.IEmpty
, protos.google.cloud.automl.v1.IOperationMetadata
>, protos.google.longrunning.IOperation
| null | undefined, {} | null | undefined>
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.
request
options
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 promise()
method returns a promise you can await
for. 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
();
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
;
request
options
CallOptions
callback
Callback
< LROperation
< protos.google.protobuf.IEmpty
, protos.google.cloud.automl.v1.IOperationMetadata
>, protos.google.longrunning.IOperation
| null | undefined, {} | null | undefined>
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
;
request
callback
Callback
< LROperation
< protos.google.protobuf.IEmpty
, protos.google.cloud.automl.v1.IOperationMetadata
>, protos.google.longrunning.IOperation
| null | undefined, {} | null | undefined>
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.
request
options
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
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.automl.v1.IAnnotationSpec
, protos.google.cloud.automl.v1.IGetAnnotationSpecRequest
| null | undefined, {} | null | undefined>
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
;
request
callback
Callback
< protos.google.cloud.automl.v1.IAnnotationSpec
, protos.google.cloud.automl.v1.IGetAnnotationSpecRequest
| null | undefined, {} | null | undefined>
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.
request
options
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
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.automl.v1.IDataset
, protos.google.cloud.automl.v1.IGetDatasetRequest
| null | undefined, {} | null | undefined>
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
;
request
callback
Callback
< protos.google.cloud.automl.v1.IDataset
, protos.google.cloud.automl.v1.IGetDatasetRequest
| null | undefined, {} | null | undefined>
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.
request
options
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
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.automl.v1.IModel
, protos.google.cloud.automl.v1.IGetModelRequest
| null | undefined, {} | null | undefined>
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
;
request
callback
Callback
< protos.google.cloud.automl.v1.IModel
, protos.google.cloud.automl.v1.IGetModelRequest
| null | undefined, {} | null | undefined>
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.
request
options
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
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.automl.v1.IModelEvaluation
, protos.google.cloud.automl.v1.IGetModelEvaluationRequest
| null | undefined, {} | null | undefined>
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
;
request
callback
Callback
< protos.google.cloud.automl.v1.IModelEvaluation
, protos.google.cloud.automl.v1.IGetModelEvaluationRequest
| null | undefined, {} | null | undefined>
void
getProjectId()
getProjectId
()
:
Promise<string>
;
Promise
<string>
getProjectId(callback)
getProjectId
(
callback
:
Callback<string
,
undefined
,
undefined
> )
:
void
;
callback
Callback
<string, undefined, undefined>
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.
request
options
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 promise()
method returns a promise you can await
for. 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
();
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
;
request
options
CallOptions
callback
Callback
< LROperation
< protos.google.protobuf.IEmpty
, protos.google.cloud.automl.v1.IOperationMetadata
>, protos.google.longrunning.IOperation
| null | undefined, {} | null | undefined>
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
;
request
callback
Callback
< LROperation
< protos.google.protobuf.IEmpty
, protos.google.cloud.automl.v1.IOperationMetadata
>, protos.google.longrunning.IOperation
| null | undefined, {} | null | undefined>
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.
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.
request
options
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 listDatasetsAsync()
method described below for async iteration which you can stop as needed. Please see the documentation
for more details and examples.
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
;
request
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
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
;
request
callback
PaginationCallback
< protos.google.cloud.automl.v1.IListDatasetsRequest
, protos.google.cloud.automl.v1.IListDatasetsResponse
| null | undefined, protos.google.cloud.automl.v1.IDataset
>
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.
request
options
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.
request
options
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
for more details and examples.
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.
request
options
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 listModelEvaluationsAsync()
method described below for async iteration which you can stop as needed. Please see the documentation
for more details and examples.
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
;
request
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
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
;
request
callback
PaginationCallback
< protos.google.cloud.automl.v1.IListModelEvaluationsRequest
, protos.google.cloud.automl.v1.IListModelEvaluationsResponse
| null | undefined, protos.google.cloud.automl.v1.IModelEvaluation
>
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.
request
options
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.
request
options
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 listModelEvaluationsAsync()
method described below for async iteration which you can stop as needed. Please see the documentation
for more details and examples.
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.
request
options
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 listModelsAsync()
method described below for async iteration which you can stop as needed. Please see the documentation
for more details and examples.
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
;
request
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
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
;
request
callback
PaginationCallback
< protos.google.cloud.automl.v1.IListModelsRequest
, protos.google.cloud.automl.v1.IListModelsResponse
| null | undefined, protos.google.cloud.automl.v1.IModel
>
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.
request
options
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.
request
options
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 listModelsAsync()
method described below for async iteration which you can stop as needed. Please see the documentation
for more details and examples.
locationPath(project, location)
locationPath
(
project
:
string
,
location
:
string
)
:
string
;
Return a fully-qualified location resource name string.
project
string
location
string
string
{string} Resource name string.
matchAnnotationSpecFromAnnotationSpecName(annotationSpecName)
matchAnnotationSpecFromAnnotationSpecName
(
annotationSpecName
:
string
)
:
string
|
number
;
Parse the annotation_spec from AnnotationSpec resource.
annotationSpecName
string
A fully-qualified path representing AnnotationSpec resource.
string | number
{string} A string representing the annotation_spec.
matchDatasetFromAnnotationSpecName(annotationSpecName)
matchDatasetFromAnnotationSpecName
(
annotationSpecName
:
string
)
:
string
|
number
;
Parse the dataset from AnnotationSpec resource.
annotationSpecName
string
A fully-qualified path representing AnnotationSpec resource.
string | number
{string} A string representing the dataset.
matchDatasetFromDatasetName(datasetName)
matchDatasetFromDatasetName
(
datasetName
:
string
)
:
string
|
number
;
Parse the dataset from Dataset resource.
datasetName
string
A fully-qualified path representing Dataset resource.
string | number
{string} A string representing the dataset.
matchLocationFromAnnotationSpecName(annotationSpecName)
matchLocationFromAnnotationSpecName
(
annotationSpecName
:
string
)
:
string
|
number
;
Parse the location from AnnotationSpec resource.
annotationSpecName
string
A fully-qualified path representing AnnotationSpec resource.
string | number
{string} A string representing the location.
matchLocationFromDatasetName(datasetName)
matchLocationFromDatasetName
(
datasetName
:
string
)
:
string
|
number
;
Parse the location from Dataset resource.
datasetName
string
A fully-qualified path representing Dataset resource.
string | number
{string} A string representing the location.
matchLocationFromLocationName(locationName)
matchLocationFromLocationName
(
locationName
:
string
)
:
string
|
number
;
Parse the location from Location resource.
locationName
string
A fully-qualified path representing Location resource.
string | number
{string} A string representing the location.
matchLocationFromModelEvaluationName(modelEvaluationName)
matchLocationFromModelEvaluationName
(
modelEvaluationName
:
string
)
:
string
|
number
;
Parse the location from ModelEvaluation resource.
modelEvaluationName
string
A fully-qualified path representing ModelEvaluation resource.
string | number
{string} A string representing the location.
matchLocationFromModelName(modelName)
matchLocationFromModelName
(
modelName
:
string
)
:
string
|
number
;
Parse the location from Model resource.
modelName
string
A fully-qualified path representing Model resource.
string | number
{string} A string representing the location.
matchModelEvaluationFromModelEvaluationName(modelEvaluationName)
matchModelEvaluationFromModelEvaluationName
(
modelEvaluationName
:
string
)
:
string
|
number
;
Parse the model_evaluation from ModelEvaluation resource.
modelEvaluationName
string
A fully-qualified path representing ModelEvaluation resource.
string | number
{string} A string representing the model_evaluation.
matchModelFromModelEvaluationName(modelEvaluationName)
matchModelFromModelEvaluationName
(
modelEvaluationName
:
string
)
:
string
|
number
;
Parse the model from ModelEvaluation resource.
modelEvaluationName
string
A fully-qualified path representing ModelEvaluation resource.
string | number
{string} A string representing the model.
matchModelFromModelName(modelName)
matchModelFromModelName
(
modelName
:
string
)
:
string
|
number
;
Parse the model from Model resource.
modelName
string
A fully-qualified path representing Model resource.
string | number
{string} A string representing the model.
matchProjectFromAnnotationSpecName(annotationSpecName)
matchProjectFromAnnotationSpecName
(
annotationSpecName
:
string
)
:
string
|
number
;
Parse the project from AnnotationSpec resource.
annotationSpecName
string
A fully-qualified path representing AnnotationSpec resource.
string | number
{string} A string representing the project.
matchProjectFromDatasetName(datasetName)
matchProjectFromDatasetName
(
datasetName
:
string
)
:
string
|
number
;
Parse the project from Dataset resource.
datasetName
string
A fully-qualified path representing Dataset resource.
string | number
{string} A string representing the project.
matchProjectFromLocationName(locationName)
matchProjectFromLocationName
(
locationName
:
string
)
:
string
|
number
;
Parse the project from Location resource.
locationName
string
A fully-qualified path representing Location resource.
string | number
{string} A string representing the project.
matchProjectFromModelEvaluationName(modelEvaluationName)
matchProjectFromModelEvaluationName
(
modelEvaluationName
:
string
)
:
string
|
number
;
Parse the project from ModelEvaluation resource.
modelEvaluationName
string
A fully-qualified path representing ModelEvaluation resource.
string | number
{string} A string representing the project.
matchProjectFromModelName(modelName)
matchProjectFromModelName
(
modelName
:
string
)
:
string
|
number
;
Parse the project from Model resource.
modelName
string
A fully-qualified path representing Model resource.
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.
project
string
location
string
model
string
modelEvaluation
string
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.
project
string
location
string
model
string
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.
request
options
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 promise()
method returns a promise you can await
for. 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
();
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
;
request
options
CallOptions
callback
Callback
< LROperation
< protos.google.protobuf.IEmpty
, protos.google.cloud.automl.v1.IOperationMetadata
>, protos.google.longrunning.IOperation
| null | undefined, {} | null | undefined>
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
;
request
callback
Callback
< LROperation
< protos.google.protobuf.IEmpty
, protos.google.cloud.automl.v1.IOperationMetadata
>, protos.google.longrunning.IOperation
| null | undefined, {} | null | undefined>
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.
request
options
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
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.automl.v1.IDataset
, protos.google.cloud.automl.v1.IUpdateDatasetRequest
| null | undefined, {} | null | undefined>
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
;
request
callback
Callback
< protos.google.cloud.automl.v1.IDataset
, protos.google.cloud.automl.v1.IUpdateDatasetRequest
| null | undefined, {} | null | undefined>
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.
request
options
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
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.automl.v1.IModel
, protos.google.cloud.automl.v1.IUpdateModelRequest
| null | undefined, {} | null | undefined>
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
;
request
callback
Callback
< protos.google.cloud.automl.v1.IModel
, protos.google.cloud.automl.v1.IUpdateModelRequest
| null | undefined, {} | null | undefined>
void