Class v1beta1.PredictionServiceClient (2.4.5)

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.

Parameter
NameDescription
opts ClientOptions

Properties

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath(), exists for compatibility reasons.

Property Value
TypeDescription
string

auth

auth: gax.GoogleAuth;
Property Value
TypeDescription
gax.GoogleAuth

descriptors

descriptors: Descriptors;
Property Value
TypeDescription
Descriptors

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };
Property Value
TypeDescription
{ [name: string]: Function; }

operationsClient

operationsClient: gax.OperationsClient;
Property Value
TypeDescription
gax.OperationsClient

pathTemplates

pathTemplates: {
        [name: string]: gax.PathTemplate;
    };
Property Value
TypeDescription
{ [name: string]: gax.PathTemplate; }

port

static get port(): number;

The port for this API service.

Property Value
TypeDescription
number

predictionServiceStub

predictionServiceStub?: Promise<{
        [name: string]: Function;
    }>;
Property Value
TypeDescription
Promise<{ [name: string]: Function; }>

scopes

static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

Property Value
TypeDescription
string[]

servicePath

static get servicePath(): string;

The DNS address for this API service.

Property Value
TypeDescription
string

warn

warn: (code: string, message: string, warnType?: string) => void;
Property Value
TypeDescription
(code: string, message: string, warnType?: string) => void

Methods

annotationSpecPath(project, location, dataset, annotationSpec)

annotationSpecPath(project: string, location: string, dataset: string, annotationSpec: string): string;

Return a fully-qualified annotationSpec resource name string.

Parameters
NameDescription
project string
location string
dataset string
annotationSpec string
Returns
TypeDescription
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]>;
Parameters
NameDescription
request protos.google.cloud.automl.v1beta1.IBatchPredictRequest
options CallOptions
Returns
TypeDescription
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;
Parameters
NameDescription
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>
Returns
TypeDescription
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;
Parameters
NameDescription
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>
Returns
TypeDescription
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().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
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.

Returns
TypeDescription
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.

Parameters
NameDescription
project string
location string
dataset string
tableSpec string
columnSpec string
Returns
TypeDescription
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.

Parameters
NameDescription
project string
location string
dataset string
Returns
TypeDescription
string

{string} Resource name string.

getProjectId()

getProjectId(): Promise<string>;
Returns
TypeDescription
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
NameDescription
callback Callback<string, undefined, undefined>
Returns
TypeDescription
void

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns
TypeDescription
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.

Parameter
NameDescription
annotationSpecName string

A fully-qualified path representing AnnotationSpec resource.

Returns
TypeDescription
string | number

{string} A string representing the annotation_spec.

matchColumnSpecFromColumnSpecName(columnSpecName)

matchColumnSpecFromColumnSpecName(columnSpecName: string): string | number;

Parse the column_spec from ColumnSpec resource.

Parameter
NameDescription
columnSpecName string

A fully-qualified path representing ColumnSpec resource.

Returns
TypeDescription
string | number

{string} A string representing the column_spec.

matchDatasetFromAnnotationSpecName(annotationSpecName)

matchDatasetFromAnnotationSpecName(annotationSpecName: string): string | number;

Parse the dataset from AnnotationSpec resource.

Parameter
NameDescription
annotationSpecName string

A fully-qualified path representing AnnotationSpec resource.

Returns
TypeDescription
string | number

{string} A string representing the dataset.

matchDatasetFromColumnSpecName(columnSpecName)

matchDatasetFromColumnSpecName(columnSpecName: string): string | number;

Parse the dataset from ColumnSpec resource.

Parameter
NameDescription
columnSpecName string

A fully-qualified path representing ColumnSpec resource.

Returns
TypeDescription
string | number

{string} A string representing the dataset.

matchDatasetFromDatasetName(datasetName)

matchDatasetFromDatasetName(datasetName: string): string | number;

Parse the dataset from Dataset resource.

Parameter
NameDescription
datasetName string

A fully-qualified path representing Dataset resource.

Returns
TypeDescription
string | number

{string} A string representing the dataset.

matchDatasetFromTableSpecName(tableSpecName)

matchDatasetFromTableSpecName(tableSpecName: string): string | number;

Parse the dataset from TableSpec resource.

Parameter
NameDescription
tableSpecName string

A fully-qualified path representing TableSpec resource.

Returns
TypeDescription
string | number

{string} A string representing the dataset.

matchLocationFromAnnotationSpecName(annotationSpecName)

matchLocationFromAnnotationSpecName(annotationSpecName: string): string | number;

Parse the location from AnnotationSpec resource.

Parameter
NameDescription
annotationSpecName string

A fully-qualified path representing AnnotationSpec resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromColumnSpecName(columnSpecName)

matchLocationFromColumnSpecName(columnSpecName: string): string | number;

Parse the location from ColumnSpec resource.

Parameter
NameDescription
columnSpecName string

A fully-qualified path representing ColumnSpec resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromDatasetName(datasetName)

matchLocationFromDatasetName(datasetName: string): string | number;

Parse the location from Dataset resource.

Parameter
NameDescription
datasetName string

A fully-qualified path representing Dataset resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromModelEvaluationName(modelEvaluationName)

matchLocationFromModelEvaluationName(modelEvaluationName: string): string | number;

Parse the location from ModelEvaluation resource.

Parameter
NameDescription
modelEvaluationName string

A fully-qualified path representing ModelEvaluation resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromModelName(modelName)

matchLocationFromModelName(modelName: string): string | number;

Parse the location from Model resource.

Parameter
NameDescription
modelName string

A fully-qualified path representing Model resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromTableSpecName(tableSpecName)

matchLocationFromTableSpecName(tableSpecName: string): string | number;

Parse the location from TableSpec resource.

Parameter
NameDescription
tableSpecName string

A fully-qualified path representing TableSpec resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchModelEvaluationFromModelEvaluationName(modelEvaluationName)

matchModelEvaluationFromModelEvaluationName(modelEvaluationName: string): string | number;

Parse the model_evaluation from ModelEvaluation resource.

Parameter
NameDescription
modelEvaluationName string

A fully-qualified path representing ModelEvaluation resource.

Returns
TypeDescription
string | number

{string} A string representing the model_evaluation.

matchModelFromModelEvaluationName(modelEvaluationName)

matchModelFromModelEvaluationName(modelEvaluationName: string): string | number;

Parse the model from ModelEvaluation resource.

Parameter
NameDescription
modelEvaluationName string

A fully-qualified path representing ModelEvaluation resource.

Returns
TypeDescription
string | number

{string} A string representing the model.

matchModelFromModelName(modelName)

matchModelFromModelName(modelName: string): string | number;

Parse the model from Model resource.

Parameter
NameDescription
modelName string

A fully-qualified path representing Model resource.

Returns
TypeDescription
string | number

{string} A string representing the model.

matchProjectFromAnnotationSpecName(annotationSpecName)

matchProjectFromAnnotationSpecName(annotationSpecName: string): string | number;

Parse the project from AnnotationSpec resource.

Parameter
NameDescription
annotationSpecName string

A fully-qualified path representing AnnotationSpec resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromColumnSpecName(columnSpecName)

matchProjectFromColumnSpecName(columnSpecName: string): string | number;

Parse the project from ColumnSpec resource.

Parameter
NameDescription
columnSpecName string

A fully-qualified path representing ColumnSpec resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromDatasetName(datasetName)

matchProjectFromDatasetName(datasetName: string): string | number;

Parse the project from Dataset resource.

Parameter
NameDescription
datasetName string

A fully-qualified path representing Dataset resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromModelEvaluationName(modelEvaluationName)

matchProjectFromModelEvaluationName(modelEvaluationName: string): string | number;

Parse the project from ModelEvaluation resource.

Parameter
NameDescription
modelEvaluationName string

A fully-qualified path representing ModelEvaluation resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromModelName(modelName)

matchProjectFromModelName(modelName: string): string | number;

Parse the project from Model resource.

Parameter
NameDescription
modelName string

A fully-qualified path representing Model resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromTableSpecName(tableSpecName)

matchProjectFromTableSpecName(tableSpecName: string): string | number;

Parse the project from TableSpec resource.

Parameter
NameDescription
tableSpecName string

A fully-qualified path representing TableSpec resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchTableSpecFromColumnSpecName(columnSpecName)

matchTableSpecFromColumnSpecName(columnSpecName: string): string | number;

Parse the table_spec from ColumnSpec resource.

Parameter
NameDescription
columnSpecName string

A fully-qualified path representing ColumnSpec resource.

Returns
TypeDescription
string | number

{string} A string representing the table_spec.

matchTableSpecFromTableSpecName(tableSpecName)

matchTableSpecFromTableSpecName(tableSpecName: string): string | number;

Parse the table_spec from TableSpec resource.

Parameter
NameDescription
tableSpecName string

A fully-qualified path representing TableSpec resource.

Returns
TypeDescription
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.

Parameters
NameDescription
project string
location string
model string
modelEvaluation string
Returns
TypeDescription
string

{string} Resource name string.

modelPath(project, location, model)

modelPath(project: string, location: string, model: string): string;

Return a fully-qualified model resource name string.

Parameters
NameDescription
project string
location string
model string
Returns
TypeDescription
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]>;
Parameters
NameDescription
request protos.google.cloud.automl.v1beta1.IPredictRequest
options CallOptions
Returns
TypeDescription
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;
Parameters
NameDescription
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>
Returns
TypeDescription
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;
Parameters
NameDescription
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>
Returns
TypeDescription
void

tableSpecPath(project, location, dataset, tableSpec)

tableSpecPath(project: string, location: string, dataset: string, tableSpec: string): string;

Return a fully-qualified tableSpec resource name string.

Parameters
NameDescription
project string
location string
dataset string
tableSpec string
Returns
TypeDescription
string

{string} Resource name string.