AutoMlClient

AutoMlClient

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.

Constructor

new AutoMlClient(optionsopt, gaxInstanceopt)

Construct an instance of AutoMlClient.

Parameters:
Name Type Attributes Description
options object <optional>

The configuration object. The options accepted by the constructor are described in detail in this document. The common options are:

Properties
Name Type Attributes Description
credentials object <optional>

Credentials object.

Properties
Name Type Attributes Description
client_email string <optional>
private_key string <optional>
email string <optional>

Account email address. Required when using a .pem or .p12 keyFilename.

keyFilename string <optional>

Full path to the a .json, .pem, or .p12 key downloaded from the Google Developers Console. If you provide a path to a JSON file, the projectId option below is not necessary. NOTE: .pem and .p12 require you to specify options.email as well.

port number <optional>

The port on which to connect to the remote host.

projectId string <optional>

The project ID from the Google Developer's Console, e.g. 'grape-spaceship-123'. We will also check the environment variable GCLOUD_PROJECT for your project ID. If your app is running in an environment which supports Application Default Credentials, your project ID will be detected automatically.

apiEndpoint string <optional>

The domain name of the API remote host.

clientConfig gax.ClientConfig <optional>

Client configuration override. Follows the structure of gapicConfig.

fallback boolean <optional>

Use HTTP/1.1 REST mode. For more information, please check the documentation.

gaxInstance gax <optional>

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);

Members

apiEndpoint

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

port

The port for this API service.

scopes

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

servicePath

The DNS address for this API service.

Methods

annotationSpecPath(project, location, dataset, annotation_spec) → {string}

Return a fully-qualified annotationSpec resource name string.

Parameters:
Name Type Description
project string
location string
dataset string
annotation_spec string
Returns:
Type Description
string

Resource name string.

(async) checkCreateDatasetProgress(name) → {Promise}

Check the status of the long running operation returned by createDataset().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
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.
Example
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The 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();

(async) checkCreateModelProgress(name) → {Promise}

Check the status of the long running operation returned by createModel().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
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.
Example
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. 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();

(async) checkDeleteDatasetProgress(name) → {Promise}

Check the status of the long running operation returned by deleteDataset().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
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.
Example
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The 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();

(async) checkDeleteModelProgress(name) → {Promise}

Check the status of the long running operation returned by deleteModel().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
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.
Example
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. 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();

(async) checkDeployModelProgress(name) → {Promise}

Check the status of the long running operation returned by deployModel().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
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.
Example
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  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();

(async) checkExportDataProgress(name) → {Promise}

Check the status of the long running operation returned by exportData().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
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.
Example
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The 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();

(async) checkExportModelProgress(name) → {Promise}

Check the status of the long running operation returned by exportModel().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
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.
Example
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The 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();

(async) checkImportDataProgress(name) → {Promise}

Check the status of the long running operation returned by importData().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
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.
Example
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Dataset 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();

(async) checkUndeployModelProgress(name) → {Promise}

Check the status of the long running operation returned by undeployModel().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
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.
Example
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. 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() → {Promise}

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns:
Type Description
Promise

A promise that resolves when the client is closed.

datasetPath(project, location, dataset) → {string}

Return a fully-qualified dataset resource name string.

Parameters:
Name Type Description
project string
location string
dataset string
Returns:
Type Description
string

Resource name string.

getProjectId() → {Promise}

Return the project ID used by this class.

Returns:
Type Description
Promise

A promise that resolves to string containing the project ID.

initialize() → {Promise}

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

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

Returns:
Type Description
Promise

A promise that resolves to an authenticated service stub.

listDatasetsAsync(request, optionsopt) → {Object}

Equivalent to listDatasets, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The resource name of the project from which to list datasets.

filter string

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`.
pageSize number

Requested page size. Server may return fewer results than requested. If unspecified, server will pick a default size.

pageToken string

A token identifying a page of results for the server to return Typically obtained via ListDatasetsResponse.next_page_token of the previous AutoMl.ListDatasets call.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
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.

Example
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The 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, optionsopt) → {Stream}

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The resource name of the project from which to list datasets.

filter string

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`.
pageSize number

Requested page size. Server may return fewer results than requested. If unspecified, server will pick a default size.

pageToken string

A token identifying a page of results for the server to return Typically obtained via ListDatasetsResponse.next_page_token of the previous AutoMl.ListDatasets call.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
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.

listModelEvaluationsAsync(request, optionsopt) → {Object}

Equivalent to listModelEvaluations, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

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.

filter string

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.
pageSize number

Requested page size.

pageToken string

A token identifying a page of results for the server to return. Typically obtained via ListModelEvaluationsResponse.next_page_token of the previous AutoMl.ListModelEvaluations call.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
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.

Example
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. 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, optionsopt) → {Stream}

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

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.

filter string

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.
pageSize number

Requested page size.

pageToken string

A token identifying a page of results for the server to return. Typically obtained via ListModelEvaluationsResponse.next_page_token of the previous AutoMl.ListModelEvaluations call.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
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.

listModelsAsync(request, optionsopt) → {Object}

Equivalent to listModels, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Resource name of the project, from which to list the models.

filter string

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.
pageSize number

Requested page size.

pageToken string

A token identifying a page of results for the server to return Typically obtained via ListModelsResponse.next_page_token of the previous AutoMl.ListModels call.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing Model. 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.

Example
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. 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, optionsopt) → {Stream}

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Resource name of the project, from which to list the models.

filter string

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.
pageSize number

Requested page size.

pageToken string

A token identifying a page of results for the server to return Typically obtained via ListModelsResponse.next_page_token of the previous AutoMl.ListModels call.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing Model 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) → {string}

Return a fully-qualified location resource name string.

Parameters:
Name Type Description
project string
location string
Returns:
Type Description
string

Resource name string.

matchAnnotationSpecFromAnnotationSpecName(annotationSpecName) → {string}

Parse the annotation_spec from AnnotationSpec resource.

Parameters:
Name Type Description
annotationSpecName string

A fully-qualified path representing AnnotationSpec resource.

Returns:
Type Description
string

A string representing the annotation_spec.

matchDatasetFromAnnotationSpecName(annotationSpecName) → {string}

Parse the dataset from AnnotationSpec resource.

Parameters:
Name Type Description
annotationSpecName string

A fully-qualified path representing AnnotationSpec resource.

Returns:
Type Description
string

A string representing the dataset.

matchDatasetFromDatasetName(datasetName) → {string}

Parse the dataset from Dataset resource.

Parameters:
Name Type Description
datasetName string

A fully-qualified path representing Dataset resource.

Returns:
Type Description
string

A string representing the dataset.

matchLocationFromAnnotationSpecName(annotationSpecName) → {string}

Parse the location from AnnotationSpec resource.

Parameters:
Name Type Description
annotationSpecName string

A fully-qualified path representing AnnotationSpec resource.

Returns:
Type Description
string

A string representing the location.

matchLocationFromDatasetName(datasetName) → {string}

Parse the location from Dataset resource.

Parameters:
Name Type Description
datasetName string

A fully-qualified path representing Dataset resource.

Returns:
Type Description
string

A string representing the location.

matchLocationFromLocationName(locationName) → {string}

Parse the location from Location resource.

Parameters:
Name Type Description
locationName string

A fully-qualified path representing Location resource.

Returns:
Type Description
string

A string representing the location.

matchLocationFromModelEvaluationName(modelEvaluationName) → {string}

Parse the location from ModelEvaluation resource.

Parameters:
Name Type Description
modelEvaluationName string

A fully-qualified path representing ModelEvaluation resource.

Returns:
Type Description
string

A string representing the location.

matchLocationFromModelName(modelName) → {string}

Parse the location from Model resource.

Parameters:
Name Type Description
modelName string

A fully-qualified path representing Model resource.

Returns:
Type Description
string

A string representing the location.

matchModelEvaluationFromModelEvaluationName(modelEvaluationName) → {string}

Parse the model_evaluation from ModelEvaluation resource.

Parameters:
Name Type Description
modelEvaluationName string

A fully-qualified path representing ModelEvaluation resource.

Returns:
Type Description
string

A string representing the model_evaluation.

matchModelFromModelEvaluationName(modelEvaluationName) → {string}

Parse the model from ModelEvaluation resource.

Parameters:
Name Type Description
modelEvaluationName string

A fully-qualified path representing ModelEvaluation resource.

Returns:
Type Description
string

A string representing the model.

matchModelFromModelName(modelName) → {string}

Parse the model from Model resource.

Parameters:
Name Type Description
modelName string

A fully-qualified path representing Model resource.

Returns:
Type Description
string

A string representing the model.

matchProjectFromAnnotationSpecName(annotationSpecName) → {string}

Parse the project from AnnotationSpec resource.

Parameters:
Name Type Description
annotationSpecName string

A fully-qualified path representing AnnotationSpec resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromDatasetName(datasetName) → {string}

Parse the project from Dataset resource.

Parameters:
Name Type Description
datasetName string

A fully-qualified path representing Dataset resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromLocationName(locationName) → {string}

Parse the project from Location resource.

Parameters:
Name Type Description
locationName string

A fully-qualified path representing Location resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromModelEvaluationName(modelEvaluationName) → {string}

Parse the project from ModelEvaluation resource.

Parameters:
Name Type Description
modelEvaluationName string

A fully-qualified path representing ModelEvaluation resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromModelName(modelName) → {string}

Parse the project from Model resource.

Parameters:
Name Type Description
modelName string

A fully-qualified path representing Model resource.

Returns:
Type Description
string

A string representing the project.

modelEvaluationPath(project, location, model, model_evaluation) → {string}

Return a fully-qualified modelEvaluation resource name string.

Parameters:
Name Type Description
project string
location string
model string
model_evaluation string
Returns:
Type Description
string

Resource name string.

modelPath(project, location, model) → {string}

Return a fully-qualified model resource name string.

Parameters:
Name Type Description
project string
location string
model string
Returns:
Type Description
string

Resource name string.