AutoML Prediction API.
On any input that is documented to expect a string parameter in snake_case or kebab-case, either of those cases is accepted. v1beta1
Package
@google-cloud/automl!Constructors
(constructor)(opts)
constructor(opts?: ClientOptions);
Construct an instance of PredictionServiceClient.
Name | Description |
opts |
ClientOptions
|
Properties
apiEndpoint
static get apiEndpoint(): string;
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
Type | Description |
string |
auth
auth: gax.GoogleAuth;
Type | Description |
gax.GoogleAuth |
descriptors
descriptors: Descriptors;
Type | Description |
Descriptors |
innerApiCalls
innerApiCalls: {
[name: string]: Function;
};
Type | Description |
{ [name: string]: Function; } |
operationsClient
operationsClient: gax.OperationsClient;
Type | Description |
gax.OperationsClient |
pathTemplates
pathTemplates: {
[name: string]: gax.PathTemplate;
};
Type | Description |
{ [name: string]: gax.PathTemplate; } |
port
static get port(): number;
The port for this API service.
Type | Description |
number |
predictionServiceStub
predictionServiceStub?: Promise<{
[name: string]: Function;
}>;
Type | Description |
Promise<{ [name: string]: Function; }> |
scopes
static get scopes(): string[];
The scopes needed to make gRPC calls for every method defined in this service.
Type | Description |
string[] |
servicePath
static get servicePath(): string;
The DNS address for this API service.
Type | Description |
string |
warn
warn: (code: string, message: string, warnType?: string) => void;
Type | Description |
(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.
Name | Description |
project |
string
|
location |
string
|
dataset |
string
|
annotationSpec |
string
|
Type | Description |
string | {string} Resource name string. |
batchPredict(request, options)
batchPredict(request?: protos.google.cloud.automl.v1beta1.IBatchPredictRequest, options?: CallOptions): Promise<[LROperation<protos.google.cloud.automl.v1beta1.IBatchPredictResult, protos.google.cloud.automl.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>;
Name | Description |
request |
protos.google.cloud.automl.v1beta1.IBatchPredictRequest
|
options |
CallOptions
|
Type | Description |
Promise<[LROperation<protos.google.cloud.automl.v1beta1.IBatchPredictResult, protos.google.cloud.automl.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]> |
batchPredict(request, options, callback)
batchPredict(request: protos.google.cloud.automl.v1beta1.IBatchPredictRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.automl.v1beta1.IBatchPredictResult, protos.google.cloud.automl.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.automl.v1beta1.IBatchPredictRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.automl.v1beta1.IBatchPredictResult, protos.google.cloud.automl.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Type | Description |
void |
batchPredict(request, callback)
batchPredict(request: protos.google.cloud.automl.v1beta1.IBatchPredictRequest, callback: Callback<LROperation<protos.google.cloud.automl.v1beta1.IBatchPredictResult, protos.google.cloud.automl.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.automl.v1beta1.IBatchPredictRequest
|
callback |
Callback<LROperation<protos.google.cloud.automl.v1beta1.IBatchPredictResult, protos.google.cloud.automl.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Type | Description |
void |
checkBatchPredictProgress(name)
checkBatchPredictProgress(name: string): Promise<LROperation<protos.google.cloud.automl.v1beta1.BatchPredictResult, protos.google.cloud.automl.v1beta1.OperationMetadata>>;
Check the status of the long running operation returned by batchPredict()
.
Name | Description |
name |
string
The operation name that will be passed. |
Type | Description |
Promise<LROperation<protos.google.cloud.automl.v1beta1.BatchPredictResult, protos.google.cloud.automl.v1beta1.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
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.
Type | Description |
Promise<void> | {Promise} A promise that resolves when the client is closed. |
columnSpecPath(project, location, dataset, tableSpec, columnSpec)
columnSpecPath(project: string, location: string, dataset: string, tableSpec: string, columnSpec: string): string;
Return a fully-qualified columnSpec resource name string.
Name | Description |
project |
string
|
location |
string
|
dataset |
string
|
tableSpec |
string
|
columnSpec |
string
|
Type | Description |
string | {string} Resource name string. |
datasetPath(project, location, dataset)
datasetPath(project: string, location: string, dataset: string): string;
Return a fully-qualified dataset resource name string.
Name | Description |
project |
string
|
location |
string
|
dataset |
string
|
Type | Description |
string | {string} Resource name string. |
getProjectId()
getProjectId(): Promise<string>;
Type | Description |
Promise<string> |
getProjectId(callback)
getProjectId(callback: Callback<string, undefined, undefined>): void;
Name | Description |
callback |
Callback<string, undefined, undefined>
|
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.
Type | Description |
Promise<{ [name: string]: Function; }> | {Promise} A promise that resolves to an authenticated service stub. |
matchAnnotationSpecFromAnnotationSpecName(annotationSpecName)
matchAnnotationSpecFromAnnotationSpecName(annotationSpecName: string): string | number;
Parse the annotation_spec from AnnotationSpec resource.
Name | Description |
annotationSpecName |
string
A fully-qualified path representing AnnotationSpec resource. |
Type | Description |
string | number | {string} A string representing the annotation_spec. |
matchColumnSpecFromColumnSpecName(columnSpecName)
matchColumnSpecFromColumnSpecName(columnSpecName: string): string | number;
Parse the column_spec from ColumnSpec resource.
Name | Description |
columnSpecName |
string
A fully-qualified path representing ColumnSpec resource. |
Type | Description |
string | number | {string} A string representing the column_spec. |
matchDatasetFromAnnotationSpecName(annotationSpecName)
matchDatasetFromAnnotationSpecName(annotationSpecName: string): string | number;
Parse the dataset from AnnotationSpec resource.
Name | Description |
annotationSpecName |
string
A fully-qualified path representing AnnotationSpec resource. |
Type | Description |
string | number | {string} A string representing the dataset. |
matchDatasetFromColumnSpecName(columnSpecName)
matchDatasetFromColumnSpecName(columnSpecName: string): string | number;
Parse the dataset from ColumnSpec resource.
Name | Description |
columnSpecName |
string
A fully-qualified path representing ColumnSpec resource. |
Type | Description |
string | number | {string} A string representing the dataset. |
matchDatasetFromDatasetName(datasetName)
matchDatasetFromDatasetName(datasetName: string): string | number;
Parse the dataset from Dataset resource.
Name | Description |
datasetName |
string
A fully-qualified path representing Dataset resource. |
Type | Description |
string | number | {string} A string representing the dataset. |
matchDatasetFromTableSpecName(tableSpecName)
matchDatasetFromTableSpecName(tableSpecName: string): string | number;
Parse the dataset from TableSpec resource.
Name | Description |
tableSpecName |
string
A fully-qualified path representing TableSpec resource. |
Type | Description |
string | number | {string} A string representing the dataset. |
matchLocationFromAnnotationSpecName(annotationSpecName)
matchLocationFromAnnotationSpecName(annotationSpecName: string): string | number;
Parse the location from AnnotationSpec resource.
Name | Description |
annotationSpecName |
string
A fully-qualified path representing AnnotationSpec resource. |
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromColumnSpecName(columnSpecName)
matchLocationFromColumnSpecName(columnSpecName: string): string | number;
Parse the location from ColumnSpec resource.
Name | Description |
columnSpecName |
string
A fully-qualified path representing ColumnSpec resource. |
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromDatasetName(datasetName)
matchLocationFromDatasetName(datasetName: string): string | number;
Parse the location from Dataset resource.
Name | Description |
datasetName |
string
A fully-qualified path representing Dataset resource. |
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromModelEvaluationName(modelEvaluationName)
matchLocationFromModelEvaluationName(modelEvaluationName: string): string | number;
Parse the location from ModelEvaluation resource.
Name | Description |
modelEvaluationName |
string
A fully-qualified path representing ModelEvaluation resource. |
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromModelName(modelName)
matchLocationFromModelName(modelName: string): string | number;
Parse the location from Model resource.
Name | Description |
modelName |
string
A fully-qualified path representing Model resource. |
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromTableSpecName(tableSpecName)
matchLocationFromTableSpecName(tableSpecName: string): string | number;
Parse the location from TableSpec resource.
Name | Description |
tableSpecName |
string
A fully-qualified path representing TableSpec resource. |
Type | Description |
string | number | {string} A string representing the location. |
matchModelEvaluationFromModelEvaluationName(modelEvaluationName)
matchModelEvaluationFromModelEvaluationName(modelEvaluationName: string): string | number;
Parse the model_evaluation from ModelEvaluation resource.
Name | Description |
modelEvaluationName |
string
A fully-qualified path representing ModelEvaluation resource. |
Type | Description |
string | number | {string} A string representing the model_evaluation. |
matchModelFromModelEvaluationName(modelEvaluationName)
matchModelFromModelEvaluationName(modelEvaluationName: string): string | number;
Parse the model from ModelEvaluation resource.
Name | Description |
modelEvaluationName |
string
A fully-qualified path representing ModelEvaluation resource. |
Type | Description |
string | number | {string} A string representing the model. |
matchModelFromModelName(modelName)
matchModelFromModelName(modelName: string): string | number;
Parse the model from Model resource.
Name | Description |
modelName |
string
A fully-qualified path representing Model resource. |
Type | Description |
string | number | {string} A string representing the model. |
matchProjectFromAnnotationSpecName(annotationSpecName)
matchProjectFromAnnotationSpecName(annotationSpecName: string): string | number;
Parse the project from AnnotationSpec resource.
Name | Description |
annotationSpecName |
string
A fully-qualified path representing AnnotationSpec resource. |
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromColumnSpecName(columnSpecName)
matchProjectFromColumnSpecName(columnSpecName: string): string | number;
Parse the project from ColumnSpec resource.
Name | Description |
columnSpecName |
string
A fully-qualified path representing ColumnSpec resource. |
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromDatasetName(datasetName)
matchProjectFromDatasetName(datasetName: string): string | number;
Parse the project from Dataset resource.
Name | Description |
datasetName |
string
A fully-qualified path representing Dataset resource. |
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromModelEvaluationName(modelEvaluationName)
matchProjectFromModelEvaluationName(modelEvaluationName: string): string | number;
Parse the project from ModelEvaluation resource.
Name | Description |
modelEvaluationName |
string
A fully-qualified path representing ModelEvaluation resource. |
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromModelName(modelName)
matchProjectFromModelName(modelName: string): string | number;
Parse the project from Model resource.
Name | Description |
modelName |
string
A fully-qualified path representing Model resource. |
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromTableSpecName(tableSpecName)
matchProjectFromTableSpecName(tableSpecName: string): string | number;
Parse the project from TableSpec resource.
Name | Description |
tableSpecName |
string
A fully-qualified path representing TableSpec resource. |
Type | Description |
string | number | {string} A string representing the project. |
matchTableSpecFromColumnSpecName(columnSpecName)
matchTableSpecFromColumnSpecName(columnSpecName: string): string | number;
Parse the table_spec from ColumnSpec resource.
Name | Description |
columnSpecName |
string
A fully-qualified path representing ColumnSpec resource. |
Type | Description |
string | number | {string} A string representing the table_spec. |
matchTableSpecFromTableSpecName(tableSpecName)
matchTableSpecFromTableSpecName(tableSpecName: string): string | number;
Parse the table_spec from TableSpec resource.
Name | Description |
tableSpecName |
string
A fully-qualified path representing TableSpec resource. |
Type | Description |
string | number | {string} A string representing the table_spec. |
modelEvaluationPath(project, location, model, modelEvaluation)
modelEvaluationPath(project: string, location: string, model: string, modelEvaluation: string): string;
Return a fully-qualified modelEvaluation resource name string.
Name | Description |
project |
string
|
location |
string
|
model |
string
|
modelEvaluation |
string
|
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.
Name | Description |
project |
string
|
location |
string
|
model |
string
|
Type | Description |
string | {string} Resource name string. |
predict(request, options)
predict(request?: protos.google.cloud.automl.v1beta1.IPredictRequest, options?: CallOptions): Promise<[protos.google.cloud.automl.v1beta1.IPredictResponse, protos.google.cloud.automl.v1beta1.IPredictRequest | undefined, {} | undefined]>;
Name | Description |
request |
protos.google.cloud.automl.v1beta1.IPredictRequest
|
options |
CallOptions
|
Type | Description |
Promise<[protos.google.cloud.automl.v1beta1.IPredictResponse, protos.google.cloud.automl.v1beta1.IPredictRequest | undefined, {} | undefined]> |
predict(request, options, callback)
predict(request: protos.google.cloud.automl.v1beta1.IPredictRequest, options: CallOptions, callback: Callback<protos.google.cloud.automl.v1beta1.IPredictResponse, protos.google.cloud.automl.v1beta1.IPredictRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.automl.v1beta1.IPredictRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.automl.v1beta1.IPredictResponse, protos.google.cloud.automl.v1beta1.IPredictRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
predict(request, callback)
predict(request: protos.google.cloud.automl.v1beta1.IPredictRequest, callback: Callback<protos.google.cloud.automl.v1beta1.IPredictResponse, protos.google.cloud.automl.v1beta1.IPredictRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.automl.v1beta1.IPredictRequest
|
callback |
Callback<protos.google.cloud.automl.v1beta1.IPredictResponse, protos.google.cloud.automl.v1beta1.IPredictRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
tableSpecPath(project, location, dataset, tableSpec)
tableSpecPath(project: string, location: string, dataset: string, tableSpec: string): string;
Return a fully-qualified tableSpec resource name string.
Name | Description |
project |
string
|
location |
string
|
dataset |
string
|
tableSpec |
string
|
Type | Description |
string | {string} Resource name string. |