Class v1alpha.MapsPlatformDatasetsV1AlphaClient (0.1.1)

Service definition for the Maps Platform Datasets API. v1alpha

Package

@googlemaps/maps-platform-datasets

Constructors

(constructor)(opts, gaxInstance)

constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);

Construct an instance of MapsPlatformDatasetsV1AlphaClient.

Parameters
NameDescription
opts ClientOptions
gaxInstance typeof gax | typeof gax.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 MapsPlatformDatasetsV1AlphaClient({fallback: 'rest'}, 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;

descriptors

descriptors: Descriptors;

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };

mapsPlatformDatasetsV1AlphaStub

mapsPlatformDatasetsV1AlphaStub?: Promise<{
        [name: string]: Function;
    }>;

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

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.

createDataset(request, options)

createDataset(request?: protos.google.maps.mapsplatformdatasets.v1alpha.ICreateDatasetRequest, options?: CallOptions): Promise<[
        protos.google.maps.mapsplatformdatasets.v1alpha.IDataset,
        (protos.google.maps.mapsplatformdatasets.v1alpha.ICreateDatasetRequest | undefined),
        {} | undefined
    ]>;

Create a new dataset for the specified project.

Parameters
NameDescription
request protos.google.maps.mapsplatformdatasets.v1alpha.ICreateDatasetRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.maps.mapsplatformdatasets.v1alpha.IDataset, (protos.google.maps.mapsplatformdatasets.v1alpha.ICreateDatasetRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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. Parent project that will own the dataset.
   *  Format: projects/{$project_number}
   */
  // const parent = 'abc123'
  /**
   *  Required. The dataset version to create.
   */
  // const dataset = {}

  // Imports the Mapsplatformdatasets library
  const {MapsPlatformDatasetsV1AlphaClient} = require('@googlemaps/maps-platform-datasets').v1alpha;

  // Instantiates a client
  const mapsplatformdatasetsClient = new MapsPlatformDatasetsV1AlphaClient();

  async function callCreateDataset() {
    // Construct request
    const request = {
      parent,
      dataset,
    };

    // Run request
    const response = await mapsplatformdatasetsClient.createDataset(request);
    console.log(response);
  }

  callCreateDataset();

createDataset(request, options, callback)

createDataset(request: protos.google.maps.mapsplatformdatasets.v1alpha.ICreateDatasetRequest, options: CallOptions, callback: Callback<protos.google.maps.mapsplatformdatasets.v1alpha.IDataset, protos.google.maps.mapsplatformdatasets.v1alpha.ICreateDatasetRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.maps.mapsplatformdatasets.v1alpha.ICreateDatasetRequest
options CallOptions
callback Callback<protos.google.maps.mapsplatformdatasets.v1alpha.IDataset, protos.google.maps.mapsplatformdatasets.v1alpha.ICreateDatasetRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createDataset(request, callback)

createDataset(request: protos.google.maps.mapsplatformdatasets.v1alpha.ICreateDatasetRequest, callback: Callback<protos.google.maps.mapsplatformdatasets.v1alpha.IDataset, protos.google.maps.mapsplatformdatasets.v1alpha.ICreateDatasetRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.maps.mapsplatformdatasets.v1alpha.ICreateDatasetRequest
callback Callback<protos.google.maps.mapsplatformdatasets.v1alpha.IDataset, protos.google.maps.mapsplatformdatasets.v1alpha.ICreateDatasetRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

datasetPath(project, dataset)

datasetPath(project: string, dataset: string): string;

Return a fully-qualified dataset resource name string.

Parameters
NameDescription
project string
dataset string
Returns
TypeDescription
string

{string} Resource name string.

deleteDataset(request, options)

deleteDataset(request?: protos.google.maps.mapsplatformdatasets.v1alpha.IDeleteDatasetRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        (protos.google.maps.mapsplatformdatasets.v1alpha.IDeleteDatasetRequest | undefined),
        {} | undefined
    ]>;

Delete the specified dataset and optionally all its corresponding versions.

Parameters
NameDescription
request protos.google.maps.mapsplatformdatasets.v1alpha.IDeleteDatasetRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.protobuf.IEmpty, (protos.google.maps.mapsplatformdatasets.v1alpha.IDeleteDatasetRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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. Format: projects/${project}/datasets/{dataset_id}
   */
  // const name = 'abc123'
  /**
   *  If set to true, any dataset version for this dataset will also be deleted.
   *  (Otherwise, the request will only work if the dataset has no versions.)
   */
  // const force = true

  // Imports the Mapsplatformdatasets library
  const {MapsPlatformDatasetsV1AlphaClient} = require('@googlemaps/maps-platform-datasets').v1alpha;

  // Instantiates a client
  const mapsplatformdatasetsClient = new MapsPlatformDatasetsV1AlphaClient();

  async function callDeleteDataset() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await mapsplatformdatasetsClient.deleteDataset(request);
    console.log(response);
  }

  callDeleteDataset();

deleteDataset(request, options, callback)

deleteDataset(request: protos.google.maps.mapsplatformdatasets.v1alpha.IDeleteDatasetRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.maps.mapsplatformdatasets.v1alpha.IDeleteDatasetRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.maps.mapsplatformdatasets.v1alpha.IDeleteDatasetRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.maps.mapsplatformdatasets.v1alpha.IDeleteDatasetRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteDataset(request, callback)

deleteDataset(request: protos.google.maps.mapsplatformdatasets.v1alpha.IDeleteDatasetRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.maps.mapsplatformdatasets.v1alpha.IDeleteDatasetRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.maps.mapsplatformdatasets.v1alpha.IDeleteDatasetRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.maps.mapsplatformdatasets.v1alpha.IDeleteDatasetRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteDatasetVersion(request, options)

deleteDatasetVersion(request?: protos.google.maps.mapsplatformdatasets.v1alpha.IDeleteDatasetVersionRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        (protos.google.maps.mapsplatformdatasets.v1alpha.IDeleteDatasetVersionRequest | undefined),
        {} | undefined
    ]>;

Delete a specific version of the dataset.

Parameters
NameDescription
request protos.google.maps.mapsplatformdatasets.v1alpha.IDeleteDatasetVersionRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.protobuf.IEmpty, (protos.google.maps.mapsplatformdatasets.v1alpha.IDeleteDatasetVersionRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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. Format: projects/${project}/datasets/{dataset_id}@{version-id}
   */
  // const name = 'abc123'

  // Imports the Mapsplatformdatasets library
  const {MapsPlatformDatasetsV1AlphaClient} = require('@googlemaps/maps-platform-datasets').v1alpha;

  // Instantiates a client
  const mapsplatformdatasetsClient = new MapsPlatformDatasetsV1AlphaClient();

  async function callDeleteDatasetVersion() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await mapsplatformdatasetsClient.deleteDatasetVersion(request);
    console.log(response);
  }

  callDeleteDatasetVersion();

deleteDatasetVersion(request, options, callback)

deleteDatasetVersion(request: protos.google.maps.mapsplatformdatasets.v1alpha.IDeleteDatasetVersionRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.maps.mapsplatformdatasets.v1alpha.IDeleteDatasetVersionRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.maps.mapsplatformdatasets.v1alpha.IDeleteDatasetVersionRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.maps.mapsplatformdatasets.v1alpha.IDeleteDatasetVersionRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteDatasetVersion(request, callback)

deleteDatasetVersion(request: protos.google.maps.mapsplatformdatasets.v1alpha.IDeleteDatasetVersionRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.maps.mapsplatformdatasets.v1alpha.IDeleteDatasetVersionRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.maps.mapsplatformdatasets.v1alpha.IDeleteDatasetVersionRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.maps.mapsplatformdatasets.v1alpha.IDeleteDatasetVersionRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getDataset(request, options)

getDataset(request?: protos.google.maps.mapsplatformdatasets.v1alpha.IGetDatasetRequest, options?: CallOptions): Promise<[
        protos.google.maps.mapsplatformdatasets.v1alpha.IDataset,
        (protos.google.maps.mapsplatformdatasets.v1alpha.IGetDatasetRequest | undefined),
        {} | undefined
    ]>;

Get the published or latest version of the dataset.

Parameters
NameDescription
request protos.google.maps.mapsplatformdatasets.v1alpha.IGetDatasetRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.maps.mapsplatformdatasets.v1alpha.IDataset, (protos.google.maps.mapsplatformdatasets.v1alpha.IGetDatasetRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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. Can also fetch a specified version
   *  projects/{project}/datasets/{dataset_id}
   *  projects/{project}/datasets/{dataset_id}@{version-id}
   *  In order to retrieve a previous version of the dataset, also provide
   *  the version ID.
   *  Example: projects/123/datasets/assisted-driving-preferences@c7cfa2a8
   */
  // const name = 'abc123'
  /**
   *  If specified, will fetch the dataset details of the version published for
   *  the specified use case rather than the latest, if one exists. If a
   *  published version does not exist, will default to getting the dataset
   *  details of the latest version.
   */
  // const publishedUsage = {}

  // Imports the Mapsplatformdatasets library
  const {MapsPlatformDatasetsV1AlphaClient} = require('@googlemaps/maps-platform-datasets').v1alpha;

  // Instantiates a client
  const mapsplatformdatasetsClient = new MapsPlatformDatasetsV1AlphaClient();

  async function callGetDataset() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await mapsplatformdatasetsClient.getDataset(request);
    console.log(response);
  }

  callGetDataset();

getDataset(request, options, callback)

getDataset(request: protos.google.maps.mapsplatformdatasets.v1alpha.IGetDatasetRequest, options: CallOptions, callback: Callback<protos.google.maps.mapsplatformdatasets.v1alpha.IDataset, protos.google.maps.mapsplatformdatasets.v1alpha.IGetDatasetRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.maps.mapsplatformdatasets.v1alpha.IGetDatasetRequest
options CallOptions
callback Callback<protos.google.maps.mapsplatformdatasets.v1alpha.IDataset, protos.google.maps.mapsplatformdatasets.v1alpha.IGetDatasetRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getDataset(request, callback)

getDataset(request: protos.google.maps.mapsplatformdatasets.v1alpha.IGetDatasetRequest, callback: Callback<protos.google.maps.mapsplatformdatasets.v1alpha.IDataset, protos.google.maps.mapsplatformdatasets.v1alpha.IGetDatasetRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.maps.mapsplatformdatasets.v1alpha.IGetDatasetRequest
callback Callback<protos.google.maps.mapsplatformdatasets.v1alpha.IDataset, protos.google.maps.mapsplatformdatasets.v1alpha.IGetDatasetRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

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.

listDatasets(request, options)

listDatasets(request?: protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetsRequest, options?: CallOptions): Promise<[
        protos.google.maps.mapsplatformdatasets.v1alpha.IDataset[],
        protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetsRequest | null,
        protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetsResponse
    ]>;

List all the datasets for the specified project.

Parameters
NameDescription
request protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.maps.mapsplatformdatasets.v1alpha.IDataset[], protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetsRequest | null, protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetsResponse ]>

{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 listDatasetsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listDatasets(request, options, callback)

listDatasets(request: protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetsRequest, options: CallOptions, callback: PaginationCallback<protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetsRequest, protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetsResponse | null | undefined, protos.google.maps.mapsplatformdatasets.v1alpha.IDataset>): void;
Parameters
NameDescription
request protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetsRequest
options CallOptions
callback PaginationCallback<protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetsRequest, protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetsResponse | null | undefined, protos.google.maps.mapsplatformdatasets.v1alpha.IDataset>
Returns
TypeDescription
void

listDatasets(request, callback)

listDatasets(request: protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetsRequest, callback: PaginationCallback<protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetsRequest, protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetsResponse | null | undefined, protos.google.maps.mapsplatformdatasets.v1alpha.IDataset>): void;
Parameters
NameDescription
request protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetsRequest
callback PaginationCallback<protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetsRequest, protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetsResponse | null | undefined, protos.google.maps.mapsplatformdatasets.v1alpha.IDataset>
Returns
TypeDescription
void

listDatasetsAsync(request, options)

listDatasetsAsync(request?: protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetsRequest, options?: CallOptions): AsyncIterable<protos.google.maps.mapsplatformdatasets.v1alpha.IDataset>;

Equivalent to listDatasets, but returns an iterable object.

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

Parameters
NameDescription
request protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.maps.mapsplatformdatasets.v1alpha.IDataset>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) 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 name of the project to list all the datasets for.
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of versions to return per page.
   *  If unspecified (or zero), at most 1000 datasets will be returned.
   *  The maximum value is 1000; values above 1000 will be coerced to 1000.
   */
  // const pageSize = 1234
  /**
   *  The page token, received from a previous GetDatasetVersions call.
   *  Provide this to retrieve the subsequent page.
   */
  // const pageToken = 'abc123'

  // Imports the Mapsplatformdatasets library
  const {MapsPlatformDatasetsV1AlphaClient} = require('@googlemaps/maps-platform-datasets').v1alpha;

  // Instantiates a client
  const mapsplatformdatasetsClient = new MapsPlatformDatasetsV1AlphaClient();

  async function callListDatasets() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await mapsplatformdatasetsClient.listDatasetsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListDatasets();

listDatasetsStream(request, options)

listDatasetsStream(request?: protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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 listDatasetsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listDatasetVersions(request, options)

listDatasetVersions(request?: protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetVersionsRequest, options?: CallOptions): Promise<[
        protos.google.maps.mapsplatformdatasets.v1alpha.IDataset[],
        protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetVersionsRequest | null,
        protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetVersionsResponse
    ]>;

List all the versions of a dataset.

Parameters
NameDescription
request protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetVersionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.maps.mapsplatformdatasets.v1alpha.IDataset[], protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetVersionsRequest | null, protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetVersionsResponse ]>

{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 listDatasetVersionsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listDatasetVersions(request, options, callback)

listDatasetVersions(request: protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetVersionsRequest, options: CallOptions, callback: PaginationCallback<protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetVersionsRequest, protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetVersionsResponse | null | undefined, protos.google.maps.mapsplatformdatasets.v1alpha.IDataset>): void;
Parameters
NameDescription
request protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetVersionsRequest
options CallOptions
callback PaginationCallback<protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetVersionsRequest, protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetVersionsResponse | null | undefined, protos.google.maps.mapsplatformdatasets.v1alpha.IDataset>
Returns
TypeDescription
void

listDatasetVersions(request, callback)

listDatasetVersions(request: protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetVersionsRequest, callback: PaginationCallback<protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetVersionsRequest, protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetVersionsResponse | null | undefined, protos.google.maps.mapsplatformdatasets.v1alpha.IDataset>): void;
Parameters
NameDescription
request protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetVersionsRequest
callback PaginationCallback<protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetVersionsRequest, protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetVersionsResponse | null | undefined, protos.google.maps.mapsplatformdatasets.v1alpha.IDataset>
Returns
TypeDescription
void

listDatasetVersionsAsync(request, options)

listDatasetVersionsAsync(request?: protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetVersionsRequest, options?: CallOptions): AsyncIterable<protos.google.maps.mapsplatformdatasets.v1alpha.IDataset>;

Equivalent to listDatasetVersions, but returns an iterable object.

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

Parameters
NameDescription
request protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetVersionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.maps.mapsplatformdatasets.v1alpha.IDataset>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) 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 name of the dataset to list all the versions for.
   */
  // const name = 'abc123'
  /**
   *  The maximum number of versions to return per page.
   *  If unspecified (or zero), at most 1000 versions will be returned.
   *  The maximum value is 1000; values above 1000 will be coerced to 1000.
   */
  // const pageSize = 1234
  /**
   *  The page token, received from a previous GetDatasetVersions call.
   *  Provide this to retrieve the subsequent page.
   */
  // const pageToken = 'abc123'

  // Imports the Mapsplatformdatasets library
  const {MapsPlatformDatasetsV1AlphaClient} = require('@googlemaps/maps-platform-datasets').v1alpha;

  // Instantiates a client
  const mapsplatformdatasetsClient = new MapsPlatformDatasetsV1AlphaClient();

  async function callListDatasetVersions() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const iterable = await mapsplatformdatasetsClient.listDatasetVersionsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListDatasetVersions();

listDatasetVersionsStream(request, options)

listDatasetVersionsStream(request?: protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetVersionsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.maps.mapsplatformdatasets.v1alpha.IListDatasetVersionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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 listDatasetVersionsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

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.

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.

updateDatasetMetadata(request, options)

updateDatasetMetadata(request?: protos.google.maps.mapsplatformdatasets.v1alpha.IUpdateDatasetMetadataRequest, options?: CallOptions): Promise<[
        protos.google.maps.mapsplatformdatasets.v1alpha.IDataset,
        (protos.google.maps.mapsplatformdatasets.v1alpha.IUpdateDatasetMetadataRequest | undefined),
        {} | undefined
    ]>;

Update the metadata for the dataset. To update the data use: UploadDataset.

Parameters
NameDescription
request protos.google.maps.mapsplatformdatasets.v1alpha.IUpdateDatasetMetadataRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.maps.mapsplatformdatasets.v1alpha.IDataset, (protos.google.maps.mapsplatformdatasets.v1alpha.IUpdateDatasetMetadataRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 dataset to update. The dataset's name is used to identify the dataset
   *  to be updated. The name has the format:
   *  projects/{project}/datasets/{dataset_id}
   */
  // const dataset = {}
  /**
   *  The list of fields to be updated. Support the value "*" for full
   *  replacement.
   */
  // const updateMask = {}

  // Imports the Mapsplatformdatasets library
  const {MapsPlatformDatasetsV1AlphaClient} = require('@googlemaps/maps-platform-datasets').v1alpha;

  // Instantiates a client
  const mapsplatformdatasetsClient = new MapsPlatformDatasetsV1AlphaClient();

  async function callUpdateDatasetMetadata() {
    // Construct request
    const request = {
      dataset,
    };

    // Run request
    const response = await mapsplatformdatasetsClient.updateDatasetMetadata(request);
    console.log(response);
  }

  callUpdateDatasetMetadata();

updateDatasetMetadata(request, options, callback)

updateDatasetMetadata(request: protos.google.maps.mapsplatformdatasets.v1alpha.IUpdateDatasetMetadataRequest, options: CallOptions, callback: Callback<protos.google.maps.mapsplatformdatasets.v1alpha.IDataset, protos.google.maps.mapsplatformdatasets.v1alpha.IUpdateDatasetMetadataRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.maps.mapsplatformdatasets.v1alpha.IUpdateDatasetMetadataRequest
options CallOptions
callback Callback<protos.google.maps.mapsplatformdatasets.v1alpha.IDataset, protos.google.maps.mapsplatformdatasets.v1alpha.IUpdateDatasetMetadataRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateDatasetMetadata(request, callback)

updateDatasetMetadata(request: protos.google.maps.mapsplatformdatasets.v1alpha.IUpdateDatasetMetadataRequest, callback: Callback<protos.google.maps.mapsplatformdatasets.v1alpha.IDataset, protos.google.maps.mapsplatformdatasets.v1alpha.IUpdateDatasetMetadataRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.maps.mapsplatformdatasets.v1alpha.IUpdateDatasetMetadataRequest
callback Callback<protos.google.maps.mapsplatformdatasets.v1alpha.IDataset, protos.google.maps.mapsplatformdatasets.v1alpha.IUpdateDatasetMetadataRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void