Class v1alpha1.TablesServiceClient

The Tables Service provides an API for reading and updating tables. It defines the following resource model:

  • The API has a collection of resources, named tables/*

  • Each Table has a collection of resources, named tables/* /rows/*

  • The API has a collection of resources, named workspaces/*. v1alpha1

Package

@google/area120-tables

Constructors

(constructor)(opts)

constructor(opts?: ClientOptions);

Construct an instance of TablesServiceClient.

Parameter
NameDescription
opts ClientOptions

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

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.

tablesServiceStub

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

warn

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

Methods

batchCreateRows(request, options)

batchCreateRows(request?: protos.google.area120.tables.v1alpha1.IBatchCreateRowsRequest, options?: CallOptions): Promise<[protos.google.area120.tables.v1alpha1.IBatchCreateRowsResponse, protos.google.area120.tables.v1alpha1.IBatchCreateRowsRequest | undefined, {} | undefined]>;

Creates multiple rows.

Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IBatchCreateRowsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.area120.tables.v1alpha1.IBatchCreateRowsResponse, protos.google.area120.tables.v1alpha1.IBatchCreateRowsRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [BatchCreateRowsResponse]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent table where the rows will be created.
   *  Format: tables/{table}
   */
  // const parent = 'abc123'
  /**
   *  Required. The request message specifying the rows to create.
   *  A maximum of 500 rows can be created in a single batch.
   */
  // const requests = 1234

  // Imports the Tables library
  const {TablesServiceClient} = require('@google/area120-tables').v1alpha1;

  // Instantiates a client
  const tablesClient = new TablesServiceClient();

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

    // Run request
    const response = await tablesClient.batchCreateRows(request);
    console.log(response);
  }

  callBatchCreateRows();

batchCreateRows(request, options, callback)

batchCreateRows(request: protos.google.area120.tables.v1alpha1.IBatchCreateRowsRequest, options: CallOptions, callback: Callback<protos.google.area120.tables.v1alpha1.IBatchCreateRowsResponse, protos.google.area120.tables.v1alpha1.IBatchCreateRowsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IBatchCreateRowsRequest
options CallOptions
callback Callback<protos.google.area120.tables.v1alpha1.IBatchCreateRowsResponse, protos.google.area120.tables.v1alpha1.IBatchCreateRowsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

batchCreateRows(request, callback)

batchCreateRows(request: protos.google.area120.tables.v1alpha1.IBatchCreateRowsRequest, callback: Callback<protos.google.area120.tables.v1alpha1.IBatchCreateRowsResponse, protos.google.area120.tables.v1alpha1.IBatchCreateRowsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IBatchCreateRowsRequest
callback Callback<protos.google.area120.tables.v1alpha1.IBatchCreateRowsResponse, protos.google.area120.tables.v1alpha1.IBatchCreateRowsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

batchDeleteRows(request, options)

batchDeleteRows(request?: protos.google.area120.tables.v1alpha1.IBatchDeleteRowsRequest, options?: CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.area120.tables.v1alpha1.IBatchDeleteRowsRequest | undefined, {} | undefined]>;

Deletes multiple rows.

Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IBatchDeleteRowsRequest

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.area120.tables.v1alpha1.IBatchDeleteRowsRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Empty]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent table shared by all rows being deleted.
   *  Format: tables/{table}
   */
  // const parent = 'abc123'
  /**
   *  Required. The names of the rows to delete. All rows must belong to the parent table
   *  or else the entire batch will fail. A maximum of 500 rows can be deleted
   *  in a batch.
   *  Format: tables/{table}/rows/{row}
   */
  // const names = 'abc123'

  // Imports the Tables library
  const {TablesServiceClient} = require('@google/area120-tables').v1alpha1;

  // Instantiates a client
  const tablesClient = new TablesServiceClient();

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

    // Run request
    const response = await tablesClient.batchDeleteRows(request);
    console.log(response);
  }

  callBatchDeleteRows();

batchDeleteRows(request, options, callback)

batchDeleteRows(request: protos.google.area120.tables.v1alpha1.IBatchDeleteRowsRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.area120.tables.v1alpha1.IBatchDeleteRowsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IBatchDeleteRowsRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.area120.tables.v1alpha1.IBatchDeleteRowsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

batchDeleteRows(request, callback)

batchDeleteRows(request: protos.google.area120.tables.v1alpha1.IBatchDeleteRowsRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.area120.tables.v1alpha1.IBatchDeleteRowsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IBatchDeleteRowsRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.area120.tables.v1alpha1.IBatchDeleteRowsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

batchUpdateRows(request, options)

batchUpdateRows(request?: protos.google.area120.tables.v1alpha1.IBatchUpdateRowsRequest, options?: CallOptions): Promise<[protos.google.area120.tables.v1alpha1.IBatchUpdateRowsResponse, protos.google.area120.tables.v1alpha1.IBatchUpdateRowsRequest | undefined, {} | undefined]>;

Updates multiple rows.

Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IBatchUpdateRowsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.area120.tables.v1alpha1.IBatchUpdateRowsResponse, protos.google.area120.tables.v1alpha1.IBatchUpdateRowsRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [BatchUpdateRowsResponse]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent table shared by all rows being updated.
   *  Format: tables/{table}
   */
  // const parent = 'abc123'
  /**
   *  Required. The request messages specifying the rows to update.
   *  A maximum of 500 rows can be modified in a single batch.
   */
  // const requests = 1234

  // Imports the Tables library
  const {TablesServiceClient} = require('@google/area120-tables').v1alpha1;

  // Instantiates a client
  const tablesClient = new TablesServiceClient();

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

    // Run request
    const response = await tablesClient.batchUpdateRows(request);
    console.log(response);
  }

  callBatchUpdateRows();

batchUpdateRows(request, options, callback)

batchUpdateRows(request: protos.google.area120.tables.v1alpha1.IBatchUpdateRowsRequest, options: CallOptions, callback: Callback<protos.google.area120.tables.v1alpha1.IBatchUpdateRowsResponse, protos.google.area120.tables.v1alpha1.IBatchUpdateRowsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IBatchUpdateRowsRequest
options CallOptions
callback Callback<protos.google.area120.tables.v1alpha1.IBatchUpdateRowsResponse, protos.google.area120.tables.v1alpha1.IBatchUpdateRowsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

batchUpdateRows(request, callback)

batchUpdateRows(request: protos.google.area120.tables.v1alpha1.IBatchUpdateRowsRequest, callback: Callback<protos.google.area120.tables.v1alpha1.IBatchUpdateRowsResponse, protos.google.area120.tables.v1alpha1.IBatchUpdateRowsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IBatchUpdateRowsRequest
callback Callback<protos.google.area120.tables.v1alpha1.IBatchUpdateRowsResponse, protos.google.area120.tables.v1alpha1.IBatchUpdateRowsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

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.

createRow(request, options)

createRow(request?: protos.google.area120.tables.v1alpha1.ICreateRowRequest, options?: CallOptions): Promise<[protos.google.area120.tables.v1alpha1.IRow, protos.google.area120.tables.v1alpha1.ICreateRowRequest | undefined, {} | undefined]>;

Creates a row.

Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.ICreateRowRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.area120.tables.v1alpha1.IRow, protos.google.area120.tables.v1alpha1.ICreateRowRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Row]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent table where this row will be created.
   *  Format: tables/{table}
   */
  // const parent = 'abc123'
  /**
   *  Required. The row to create.
   */
  // const row = {}
  /**
   *  Optional. Column key to use for values in the row.
   *  Defaults to user entered name.
   */
  // const view = {}

  // Imports the Tables library
  const {TablesServiceClient} = require('@google/area120-tables').v1alpha1;

  // Instantiates a client
  const tablesClient = new TablesServiceClient();

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

    // Run request
    const response = await tablesClient.createRow(request);
    console.log(response);
  }

  callCreateRow();

createRow(request, options, callback)

createRow(request: protos.google.area120.tables.v1alpha1.ICreateRowRequest, options: CallOptions, callback: Callback<protos.google.area120.tables.v1alpha1.IRow, protos.google.area120.tables.v1alpha1.ICreateRowRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.ICreateRowRequest
options CallOptions
callback Callback<protos.google.area120.tables.v1alpha1.IRow, protos.google.area120.tables.v1alpha1.ICreateRowRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createRow(request, callback)

createRow(request: protos.google.area120.tables.v1alpha1.ICreateRowRequest, callback: Callback<protos.google.area120.tables.v1alpha1.IRow, protos.google.area120.tables.v1alpha1.ICreateRowRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.ICreateRowRequest
callback Callback<protos.google.area120.tables.v1alpha1.IRow, protos.google.area120.tables.v1alpha1.ICreateRowRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteRow(request, options)

deleteRow(request?: protos.google.area120.tables.v1alpha1.IDeleteRowRequest, options?: CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.area120.tables.v1alpha1.IDeleteRowRequest | undefined, {} | undefined]>;

Deletes a row.

Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IDeleteRowRequest

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.area120.tables.v1alpha1.IDeleteRowRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Empty]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the row to delete.
   *  Format: tables/{table}/rows/{row}
   */
  // const name = 'abc123'

  // Imports the Tables library
  const {TablesServiceClient} = require('@google/area120-tables').v1alpha1;

  // Instantiates a client
  const tablesClient = new TablesServiceClient();

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

    // Run request
    const response = await tablesClient.deleteRow(request);
    console.log(response);
  }

  callDeleteRow();

deleteRow(request, options, callback)

deleteRow(request: protos.google.area120.tables.v1alpha1.IDeleteRowRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.area120.tables.v1alpha1.IDeleteRowRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IDeleteRowRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.area120.tables.v1alpha1.IDeleteRowRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteRow(request, callback)

deleteRow(request: protos.google.area120.tables.v1alpha1.IDeleteRowRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.area120.tables.v1alpha1.IDeleteRowRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IDeleteRowRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.area120.tables.v1alpha1.IDeleteRowRequest | 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

getRow(request, options)

getRow(request?: protos.google.area120.tables.v1alpha1.IGetRowRequest, options?: CallOptions): Promise<[protos.google.area120.tables.v1alpha1.IRow, protos.google.area120.tables.v1alpha1.IGetRowRequest | undefined, {} | undefined]>;

Gets a row. Returns NOT_FOUND if the row does not exist in the table.

Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IGetRowRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.area120.tables.v1alpha1.IRow, protos.google.area120.tables.v1alpha1.IGetRowRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Row]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the row to retrieve.
   *  Format: tables/{table}/rows/{row}
   */
  // const name = 'abc123'
  /**
   *  Optional. Column key to use for values in the row.
   *  Defaults to user entered name.
   */
  // const view = {}

  // Imports the Tables library
  const {TablesServiceClient} = require('@google/area120-tables').v1alpha1;

  // Instantiates a client
  const tablesClient = new TablesServiceClient();

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

    // Run request
    const response = await tablesClient.getRow(request);
    console.log(response);
  }

  callGetRow();

getRow(request, options, callback)

getRow(request: protos.google.area120.tables.v1alpha1.IGetRowRequest, options: CallOptions, callback: Callback<protos.google.area120.tables.v1alpha1.IRow, protos.google.area120.tables.v1alpha1.IGetRowRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IGetRowRequest
options CallOptions
callback Callback<protos.google.area120.tables.v1alpha1.IRow, protos.google.area120.tables.v1alpha1.IGetRowRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getRow(request, callback)

getRow(request: protos.google.area120.tables.v1alpha1.IGetRowRequest, callback: Callback<protos.google.area120.tables.v1alpha1.IRow, protos.google.area120.tables.v1alpha1.IGetRowRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IGetRowRequest
callback Callback<protos.google.area120.tables.v1alpha1.IRow, protos.google.area120.tables.v1alpha1.IGetRowRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getTable(request, options)

getTable(request?: protos.google.area120.tables.v1alpha1.IGetTableRequest, options?: CallOptions): Promise<[protos.google.area120.tables.v1alpha1.ITable, protos.google.area120.tables.v1alpha1.IGetTableRequest | undefined, {} | undefined]>;

Gets a table. Returns NOT_FOUND if the table does not exist.

Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IGetTableRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.area120.tables.v1alpha1.ITable, protos.google.area120.tables.v1alpha1.IGetTableRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Table]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the table to retrieve.
   *  Format: tables/{table}
   */
  // const name = 'abc123'

  // Imports the Tables library
  const {TablesServiceClient} = require('@google/area120-tables').v1alpha1;

  // Instantiates a client
  const tablesClient = new TablesServiceClient();

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

    // Run request
    const response = await tablesClient.getTable(request);
    console.log(response);
  }

  callGetTable();

getTable(request, options, callback)

getTable(request: protos.google.area120.tables.v1alpha1.IGetTableRequest, options: CallOptions, callback: Callback<protos.google.area120.tables.v1alpha1.ITable, protos.google.area120.tables.v1alpha1.IGetTableRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IGetTableRequest
options CallOptions
callback Callback<protos.google.area120.tables.v1alpha1.ITable, protos.google.area120.tables.v1alpha1.IGetTableRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getTable(request, callback)

getTable(request: protos.google.area120.tables.v1alpha1.IGetTableRequest, callback: Callback<protos.google.area120.tables.v1alpha1.ITable, protos.google.area120.tables.v1alpha1.IGetTableRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IGetTableRequest
callback Callback<protos.google.area120.tables.v1alpha1.ITable, protos.google.area120.tables.v1alpha1.IGetTableRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getWorkspace(request, options)

getWorkspace(request?: protos.google.area120.tables.v1alpha1.IGetWorkspaceRequest, options?: CallOptions): Promise<[protos.google.area120.tables.v1alpha1.IWorkspace, protos.google.area120.tables.v1alpha1.IGetWorkspaceRequest | undefined, {} | undefined]>;

Gets a workspace. Returns NOT_FOUND if the workspace does not exist.

Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IGetWorkspaceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.area120.tables.v1alpha1.IWorkspace, protos.google.area120.tables.v1alpha1.IGetWorkspaceRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Workspace]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the workspace to retrieve.
   *  Format: workspaces/{workspace}
   */
  // const name = 'abc123'

  // Imports the Tables library
  const {TablesServiceClient} = require('@google/area120-tables').v1alpha1;

  // Instantiates a client
  const tablesClient = new TablesServiceClient();

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

    // Run request
    const response = await tablesClient.getWorkspace(request);
    console.log(response);
  }

  callGetWorkspace();

getWorkspace(request, options, callback)

getWorkspace(request: protos.google.area120.tables.v1alpha1.IGetWorkspaceRequest, options: CallOptions, callback: Callback<protos.google.area120.tables.v1alpha1.IWorkspace, protos.google.area120.tables.v1alpha1.IGetWorkspaceRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IGetWorkspaceRequest
options CallOptions
callback Callback<protos.google.area120.tables.v1alpha1.IWorkspace, protos.google.area120.tables.v1alpha1.IGetWorkspaceRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getWorkspace(request, callback)

getWorkspace(request: protos.google.area120.tables.v1alpha1.IGetWorkspaceRequest, callback: Callback<protos.google.area120.tables.v1alpha1.IWorkspace, protos.google.area120.tables.v1alpha1.IGetWorkspaceRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IGetWorkspaceRequest
callback Callback<protos.google.area120.tables.v1alpha1.IWorkspace, protos.google.area120.tables.v1alpha1.IGetWorkspaceRequest | null | undefined, {} | null | 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.

listRows(request, options)

listRows(request?: protos.google.area120.tables.v1alpha1.IListRowsRequest, options?: CallOptions): Promise<[protos.google.area120.tables.v1alpha1.IRow[], protos.google.area120.tables.v1alpha1.IListRowsRequest | null, protos.google.area120.tables.v1alpha1.IListRowsResponse]>;

Lists rows in a table. Returns NOT_FOUND if the table does not exist.

Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IListRowsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.area120.tables.v1alpha1.IRow[], protos.google.area120.tables.v1alpha1.IListRowsRequest | null, protos.google.area120.tables.v1alpha1.IListRowsResponse]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [Row]. 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 listRowsAsync() 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.

listRows(request, options, callback)

listRows(request: protos.google.area120.tables.v1alpha1.IListRowsRequest, options: CallOptions, callback: PaginationCallback<protos.google.area120.tables.v1alpha1.IListRowsRequest, protos.google.area120.tables.v1alpha1.IListRowsResponse | null | undefined, protos.google.area120.tables.v1alpha1.IRow>): void;
Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IListRowsRequest
options CallOptions
callback PaginationCallback<protos.google.area120.tables.v1alpha1.IListRowsRequest, protos.google.area120.tables.v1alpha1.IListRowsResponse | null | undefined, protos.google.area120.tables.v1alpha1.IRow>
Returns
TypeDescription
void

listRows(request, callback)

listRows(request: protos.google.area120.tables.v1alpha1.IListRowsRequest, callback: PaginationCallback<protos.google.area120.tables.v1alpha1.IListRowsRequest, protos.google.area120.tables.v1alpha1.IListRowsResponse | null | undefined, protos.google.area120.tables.v1alpha1.IRow>): void;
Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IListRowsRequest
callback PaginationCallback<protos.google.area120.tables.v1alpha1.IListRowsRequest, protos.google.area120.tables.v1alpha1.IListRowsResponse | null | undefined, protos.google.area120.tables.v1alpha1.IRow>
Returns
TypeDescription
void

listRowsAsync(request, options)

listRowsAsync(request?: protos.google.area120.tables.v1alpha1.IListRowsRequest, options?: CallOptions): AsyncIterable<protos.google.area120.tables.v1alpha1.IRow>;

Equivalent to listRows, 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.area120.tables.v1alpha1.IListRowsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.area120.tables.v1alpha1.IRow>

{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 [Row]. 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

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent table.
   *  Format: tables/{table}
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of rows to return. The service may return fewer than
   *  this value.
   *  If unspecified, at most 50 rows are returned. The maximum value is 1,000;
   *  values above 1,000 are coerced to 1,000.
   */
  // const pageSize = 1234
  /**
   *  A page token, received from a previous `ListRows` call.
   *  Provide this to retrieve the subsequent page.
   *  When paginating, all other parameters provided to `ListRows` must match
   *  the call that provided the page token.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. Column key to use for values in the row.
   *  Defaults to user entered name.
   */
  // const view = {}
  /**
   *  Optional. Raw text query to search for in rows of the table.
   *  Special characters must be escaped. Logical operators and field specific
   *  filtering not supported.
   */
  // const filter = 'abc123'

  // Imports the Tables library
  const {TablesServiceClient} = require('@google/area120-tables').v1alpha1;

  // Instantiates a client
  const tablesClient = new TablesServiceClient();

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

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

  callListRows();

listRowsStream(request, options)

listRowsStream(request?: protos.google.area120.tables.v1alpha1.IListRowsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IListRowsRequest

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 [Row] 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 listRowsAsync() 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.

listTables(request, options)

listTables(request?: protos.google.area120.tables.v1alpha1.IListTablesRequest, options?: CallOptions): Promise<[protos.google.area120.tables.v1alpha1.ITable[], protos.google.area120.tables.v1alpha1.IListTablesRequest | null, protos.google.area120.tables.v1alpha1.IListTablesResponse]>;

Lists tables for the user.

Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IListTablesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.area120.tables.v1alpha1.ITable[], protos.google.area120.tables.v1alpha1.IListTablesRequest | null, protos.google.area120.tables.v1alpha1.IListTablesResponse]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [Table]. 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 listTablesAsync() 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.

listTables(request, options, callback)

listTables(request: protos.google.area120.tables.v1alpha1.IListTablesRequest, options: CallOptions, callback: PaginationCallback<protos.google.area120.tables.v1alpha1.IListTablesRequest, protos.google.area120.tables.v1alpha1.IListTablesResponse | null | undefined, protos.google.area120.tables.v1alpha1.ITable>): void;
Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IListTablesRequest
options CallOptions
callback PaginationCallback<protos.google.area120.tables.v1alpha1.IListTablesRequest, protos.google.area120.tables.v1alpha1.IListTablesResponse | null | undefined, protos.google.area120.tables.v1alpha1.ITable>
Returns
TypeDescription
void

listTables(request, callback)

listTables(request: protos.google.area120.tables.v1alpha1.IListTablesRequest, callback: PaginationCallback<protos.google.area120.tables.v1alpha1.IListTablesRequest, protos.google.area120.tables.v1alpha1.IListTablesResponse | null | undefined, protos.google.area120.tables.v1alpha1.ITable>): void;
Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IListTablesRequest
callback PaginationCallback<protos.google.area120.tables.v1alpha1.IListTablesRequest, protos.google.area120.tables.v1alpha1.IListTablesResponse | null | undefined, protos.google.area120.tables.v1alpha1.ITable>
Returns
TypeDescription
void

listTablesAsync(request, options)

listTablesAsync(request?: protos.google.area120.tables.v1alpha1.IListTablesRequest, options?: CallOptions): AsyncIterable<protos.google.area120.tables.v1alpha1.ITable>;

Equivalent to listTables, 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.area120.tables.v1alpha1.IListTablesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.area120.tables.v1alpha1.ITable>

{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 [Table]. 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

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The maximum number of tables to return. The service may return fewer than
   *  this value.
   *  If unspecified, at most 20 tables are returned. The maximum value is 100;
   *  values above 100 are coerced to 100.
   */
  // const pageSize = 1234
  /**
   *  A page token, received from a previous `ListTables` call.
   *  Provide this to retrieve the subsequent page.
   *  When paginating, all other parameters provided to `ListTables` must match
   *  the call that provided the page token.
   */
  // const pageToken = 'abc123'

  // Imports the Tables library
  const {TablesServiceClient} = require('@google/area120-tables').v1alpha1;

  // Instantiates a client
  const tablesClient = new TablesServiceClient();

  async function callListTables() {
    // Construct request
    const request = {};

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

  callListTables();

listTablesStream(request, options)

listTablesStream(request?: protos.google.area120.tables.v1alpha1.IListTablesRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IListTablesRequest

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 [Table] 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 listTablesAsync() 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.

listWorkspaces(request, options)

listWorkspaces(request?: protos.google.area120.tables.v1alpha1.IListWorkspacesRequest, options?: CallOptions): Promise<[protos.google.area120.tables.v1alpha1.IWorkspace[], protos.google.area120.tables.v1alpha1.IListWorkspacesRequest | null, protos.google.area120.tables.v1alpha1.IListWorkspacesResponse]>;

Lists workspaces for the user.

Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IListWorkspacesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.area120.tables.v1alpha1.IWorkspace[], protos.google.area120.tables.v1alpha1.IListWorkspacesRequest | null, protos.google.area120.tables.v1alpha1.IListWorkspacesResponse]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [Workspace]. 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 listWorkspacesAsync() 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.

listWorkspaces(request, options, callback)

listWorkspaces(request: protos.google.area120.tables.v1alpha1.IListWorkspacesRequest, options: CallOptions, callback: PaginationCallback<protos.google.area120.tables.v1alpha1.IListWorkspacesRequest, protos.google.area120.tables.v1alpha1.IListWorkspacesResponse | null | undefined, protos.google.area120.tables.v1alpha1.IWorkspace>): void;
Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IListWorkspacesRequest
options CallOptions
callback PaginationCallback<protos.google.area120.tables.v1alpha1.IListWorkspacesRequest, protos.google.area120.tables.v1alpha1.IListWorkspacesResponse | null | undefined, protos.google.area120.tables.v1alpha1.IWorkspace>
Returns
TypeDescription
void

listWorkspaces(request, callback)

listWorkspaces(request: protos.google.area120.tables.v1alpha1.IListWorkspacesRequest, callback: PaginationCallback<protos.google.area120.tables.v1alpha1.IListWorkspacesRequest, protos.google.area120.tables.v1alpha1.IListWorkspacesResponse | null | undefined, protos.google.area120.tables.v1alpha1.IWorkspace>): void;
Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IListWorkspacesRequest
callback PaginationCallback<protos.google.area120.tables.v1alpha1.IListWorkspacesRequest, protos.google.area120.tables.v1alpha1.IListWorkspacesResponse | null | undefined, protos.google.area120.tables.v1alpha1.IWorkspace>
Returns
TypeDescription
void

listWorkspacesAsync(request, options)

listWorkspacesAsync(request?: protos.google.area120.tables.v1alpha1.IListWorkspacesRequest, options?: CallOptions): AsyncIterable<protos.google.area120.tables.v1alpha1.IWorkspace>;

Equivalent to listWorkspaces, 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.area120.tables.v1alpha1.IListWorkspacesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.area120.tables.v1alpha1.IWorkspace>

{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 [Workspace]. 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

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The maximum number of workspaces to return. The service may return fewer
   *  than this value.
   *  If unspecified, at most 10 workspaces are returned. The maximum value is
   *  25; values above 25 are coerced to 25.
   */
  // const pageSize = 1234
  /**
   *  A page token, received from a previous `ListWorkspaces` call.
   *  Provide this to retrieve the subsequent page.
   *  When paginating, all other parameters provided to `ListWorkspaces` must
   *  match the call that provided the page token.
   */
  // const pageToken = 'abc123'

  // Imports the Tables library
  const {TablesServiceClient} = require('@google/area120-tables').v1alpha1;

  // Instantiates a client
  const tablesClient = new TablesServiceClient();

  async function callListWorkspaces() {
    // Construct request
    const request = {};

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

  callListWorkspaces();

listWorkspacesStream(request, options)

listWorkspacesStream(request?: protos.google.area120.tables.v1alpha1.IListWorkspacesRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IListWorkspacesRequest

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 [Workspace] 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 listWorkspacesAsync() 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.

matchRowFromRowName(rowName)

matchRowFromRowName(rowName: string): string | number;

Parse the row from Row resource.

Parameter
NameDescription
rowName string

A fully-qualified path representing Row resource.

Returns
TypeDescription
string | number

{string} A string representing the row.

matchTableFromRowName(rowName)

matchTableFromRowName(rowName: string): string | number;

Parse the table from Row resource.

Parameter
NameDescription
rowName string

A fully-qualified path representing Row resource.

Returns
TypeDescription
string | number

{string} A string representing the table.

matchTableFromTableName(tableName)

matchTableFromTableName(tableName: string): string | number;

Parse the table from Table resource.

Parameter
NameDescription
tableName string

A fully-qualified path representing Table resource.

Returns
TypeDescription
string | number

{string} A string representing the table.

matchWorkspaceFromWorkspaceName(workspaceName)

matchWorkspaceFromWorkspaceName(workspaceName: string): string | number;

Parse the workspace from Workspace resource.

Parameter
NameDescription
workspaceName string

A fully-qualified path representing Workspace resource.

Returns
TypeDescription
string | number

{string} A string representing the workspace.

rowPath(table, row)

rowPath(table: string, row: string): string;

Return a fully-qualified row resource name string.

Parameters
NameDescription
table string
row string
Returns
TypeDescription
string

{string} Resource name string.

tablePath(table)

tablePath(table: string): string;

Return a fully-qualified table resource name string.

Parameter
NameDescription
table string
Returns
TypeDescription
string

{string} Resource name string.

updateRow(request, options)

updateRow(request?: protos.google.area120.tables.v1alpha1.IUpdateRowRequest, options?: CallOptions): Promise<[protos.google.area120.tables.v1alpha1.IRow, protos.google.area120.tables.v1alpha1.IUpdateRowRequest | undefined, {} | undefined]>;

Updates a row.

Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IUpdateRowRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.area120.tables.v1alpha1.IRow, protos.google.area120.tables.v1alpha1.IUpdateRowRequest | undefined, {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Row]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The row to update.
   */
  // const row = {}
  /**
   *  The list of fields to update.
   */
  // const updateMask = {}
  /**
   *  Optional. Column key to use for values in the row.
   *  Defaults to user entered name.
   */
  // const view = {}

  // Imports the Tables library
  const {TablesServiceClient} = require('@google/area120-tables').v1alpha1;

  // Instantiates a client
  const tablesClient = new TablesServiceClient();

  async function callUpdateRow() {
    // Construct request
    const request = {
      row,
    };

    // Run request
    const response = await tablesClient.updateRow(request);
    console.log(response);
  }

  callUpdateRow();

updateRow(request, options, callback)

updateRow(request: protos.google.area120.tables.v1alpha1.IUpdateRowRequest, options: CallOptions, callback: Callback<protos.google.area120.tables.v1alpha1.IRow, protos.google.area120.tables.v1alpha1.IUpdateRowRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IUpdateRowRequest
options CallOptions
callback Callback<protos.google.area120.tables.v1alpha1.IRow, protos.google.area120.tables.v1alpha1.IUpdateRowRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateRow(request, callback)

updateRow(request: protos.google.area120.tables.v1alpha1.IUpdateRowRequest, callback: Callback<protos.google.area120.tables.v1alpha1.IRow, protos.google.area120.tables.v1alpha1.IUpdateRowRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.area120.tables.v1alpha1.IUpdateRowRequest
callback Callback<protos.google.area120.tables.v1alpha1.IRow, protos.google.area120.tables.v1alpha1.IUpdateRowRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

workspacePath(workspace)

workspacePath(workspace: string): string;

Return a fully-qualified workspace resource name string.

Parameter
NameDescription
workspace string
Returns
TypeDescription
string

{string} Resource name string.