Class TablesServiceClient

java.lang.Object
com.google.area120.tables.v1alpha.TablesServiceClient
All Implemented Interfaces:
BackgroundResource, AutoCloseable

@BetaApi @Generated("by gapic-generator-java") public class TablesServiceClient extends Object implements BackgroundResource
Service Description: The Tables Service provides an API for reading and updating tables. It defines the following resource model:

- The API has a collection of [Table][google.area120.tables.v1alpha1.Table] resources, named `tables/*`

- Each Table has a collection of [Row][google.area120.tables.v1alpha1.Row] resources, named `tables/*/rows/*`

- The API has a collection of [Workspace][google.area120.tables.v1alpha1.Workspace] resources, named `workspaces/*`.

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
   TableName name = TableName.of("[TABLE]");
   Table response = tablesServiceClient.getTable(name);
 }
 

Note: close() needs to be called on the TablesServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

Methods
Method Description Method Variants

GetTable

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

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getTable(GetTableRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getTable(TableName name)

  • getTable(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getTableCallable()

ListTables

Lists tables for the user.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listTables(ListTablesRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listTablesPagedCallable()

  • listTablesCallable()

GetWorkspace

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

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getWorkspace(GetWorkspaceRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getWorkspace(WorkspaceName name)

  • getWorkspace(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getWorkspaceCallable()

ListWorkspaces

Lists workspaces for the user.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listWorkspaces(ListWorkspacesRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listWorkspacesPagedCallable()

  • listWorkspacesCallable()

GetRow

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

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getRow(GetRowRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getRow(RowName name)

  • getRow(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getRowCallable()

ListRows

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

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listRows(ListRowsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listRows(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listRowsPagedCallable()

  • listRowsCallable()

CreateRow

Creates a row.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createRow(CreateRowRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • createRow(String parent, Row row)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createRowCallable()

BatchCreateRows

Creates multiple rows.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • batchCreateRows(BatchCreateRowsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • batchCreateRowsCallable()

UpdateRow

Updates a row.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateRow(UpdateRowRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • updateRow(Row row, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateRowCallable()

BatchUpdateRows

Updates multiple rows.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • batchUpdateRows(BatchUpdateRowsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • batchUpdateRowsCallable()

DeleteRow

Deletes a row.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteRow(DeleteRowRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • deleteRow(RowName name)

  • deleteRow(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteRowCallable()

BatchDeleteRows

Deletes multiple rows.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • batchDeleteRows(BatchDeleteRowsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • batchDeleteRowsCallable()

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of TablesServiceSettings to create(). For example:

To customize credentials:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 TablesServiceSettings tablesServiceSettings =
     TablesServiceSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 TablesServiceClient tablesServiceClient = TablesServiceClient.create(tablesServiceSettings);
 

To customize the endpoint:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 TablesServiceSettings tablesServiceSettings =
     TablesServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 TablesServiceClient tablesServiceClient = TablesServiceClient.create(tablesServiceSettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 TablesServiceSettings tablesServiceSettings =
     TablesServiceSettings.newHttpJsonBuilder().build();
 TablesServiceClient tablesServiceClient = TablesServiceClient.create(tablesServiceSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

  • Constructor Details

    • TablesServiceClient

      protected TablesServiceClient(TablesServiceSettings settings) throws IOException
      Constructs an instance of TablesServiceClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
      Throws:
      IOException
    • TablesServiceClient

      protected TablesServiceClient(TablesServiceStub stub)
  • Method Details

    • create

      public static final TablesServiceClient create() throws IOException
      Constructs an instance of TablesServiceClient with default settings.
      Throws:
      IOException
    • create

      public static final TablesServiceClient create(TablesServiceSettings settings) throws IOException
      Constructs an instance of TablesServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
      Throws:
      IOException
    • create

      public static final TablesServiceClient create(TablesServiceStub stub)
      Constructs an instance of TablesServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(TablesServiceSettings).
    • getSettings

      public final TablesServiceSettings getSettings()
    • getStub

      public TablesServiceStub getStub()
    • getTable

      public final Table getTable(TableName name)
      Gets a table. Returns NOT_FOUND if the table does not exist.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         TableName name = TableName.of("[TABLE]");
         Table response = tablesServiceClient.getTable(name);
       }
       
      Parameters:
      name - Required. The name of the table to retrieve. Format: tables/{table}
      Throws:
      ApiException - if the remote call fails
    • getTable

      public final Table getTable(String name)
      Gets a table. Returns NOT_FOUND if the table does not exist.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         String name = TableName.of("[TABLE]").toString();
         Table response = tablesServiceClient.getTable(name);
       }
       
      Parameters:
      name - Required. The name of the table to retrieve. Format: tables/{table}
      Throws:
      ApiException - if the remote call fails
    • getTable

      public final Table getTable(GetTableRequest request)
      Gets a table. Returns NOT_FOUND if the table does not exist.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         GetTableRequest request =
             GetTableRequest.newBuilder().setName(TableName.of("[TABLE]").toString()).build();
         Table response = tablesServiceClient.getTable(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getTableCallable

      public final UnaryCallable<GetTableRequest,Table> getTableCallable()
      Gets a table. Returns NOT_FOUND if the table does not exist.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         GetTableRequest request =
             GetTableRequest.newBuilder().setName(TableName.of("[TABLE]").toString()).build();
         ApiFuture<Table> future = tablesServiceClient.getTableCallable().futureCall(request);
         // Do something.
         Table response = future.get();
       }
       
    • listTables

      Lists tables for the user.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         ListTablesRequest request =
             ListTablesRequest.newBuilder()
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (Table element : tablesServiceClient.listTables(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listTablesPagedCallable

      Lists tables for the user.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         ListTablesRequest request =
             ListTablesRequest.newBuilder()
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<Table> future = tablesServiceClient.listTablesPagedCallable().futureCall(request);
         // Do something.
         for (Table element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listTablesCallable

      public final UnaryCallable<ListTablesRequest,ListTablesResponse> listTablesCallable()
      Lists tables for the user.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         ListTablesRequest request =
             ListTablesRequest.newBuilder()
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListTablesResponse response = tablesServiceClient.listTablesCallable().call(request);
           for (Table element : response.getTablesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getWorkspace

      public final Workspace getWorkspace(WorkspaceName name)
      Gets a workspace. Returns NOT_FOUND if the workspace does not exist.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         WorkspaceName name = WorkspaceName.of("[WORKSPACE]");
         Workspace response = tablesServiceClient.getWorkspace(name);
       }
       
      Parameters:
      name - Required. The name of the workspace to retrieve. Format: workspaces/{workspace}
      Throws:
      ApiException - if the remote call fails
    • getWorkspace

      public final Workspace getWorkspace(String name)
      Gets a workspace. Returns NOT_FOUND if the workspace does not exist.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         String name = WorkspaceName.of("[WORKSPACE]").toString();
         Workspace response = tablesServiceClient.getWorkspace(name);
       }
       
      Parameters:
      name - Required. The name of the workspace to retrieve. Format: workspaces/{workspace}
      Throws:
      ApiException - if the remote call fails
    • getWorkspace

      public final Workspace getWorkspace(GetWorkspaceRequest request)
      Gets a workspace. Returns NOT_FOUND if the workspace does not exist.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         GetWorkspaceRequest request =
             GetWorkspaceRequest.newBuilder()
                 .setName(WorkspaceName.of("[WORKSPACE]").toString())
                 .build();
         Workspace response = tablesServiceClient.getWorkspace(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getWorkspaceCallable

      public final UnaryCallable<GetWorkspaceRequest,Workspace> getWorkspaceCallable()
      Gets a workspace. Returns NOT_FOUND if the workspace does not exist.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         GetWorkspaceRequest request =
             GetWorkspaceRequest.newBuilder()
                 .setName(WorkspaceName.of("[WORKSPACE]").toString())
                 .build();
         ApiFuture<Workspace> future = tablesServiceClient.getWorkspaceCallable().futureCall(request);
         // Do something.
         Workspace response = future.get();
       }
       
    • listWorkspaces

      Lists workspaces for the user.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         ListWorkspacesRequest request =
             ListWorkspacesRequest.newBuilder()
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (Workspace element : tablesServiceClient.listWorkspaces(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listWorkspacesPagedCallable

      Lists workspaces for the user.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         ListWorkspacesRequest request =
             ListWorkspacesRequest.newBuilder()
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<Workspace> future =
             tablesServiceClient.listWorkspacesPagedCallable().futureCall(request);
         // Do something.
         for (Workspace element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listWorkspacesCallable

      public final UnaryCallable<ListWorkspacesRequest,ListWorkspacesResponse> listWorkspacesCallable()
      Lists workspaces for the user.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         ListWorkspacesRequest request =
             ListWorkspacesRequest.newBuilder()
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListWorkspacesResponse response =
               tablesServiceClient.listWorkspacesCallable().call(request);
           for (Workspace element : response.getWorkspacesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getRow

      public final Row getRow(RowName name)
      Gets a row. Returns NOT_FOUND if the row does not exist in the table.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         RowName name = RowName.of("[TABLE]", "[ROW]");
         Row response = tablesServiceClient.getRow(name);
       }
       
      Parameters:
      name - Required. The name of the row to retrieve. Format: tables/{table}/rows/{row}
      Throws:
      ApiException - if the remote call fails
    • getRow

      public final Row getRow(String name)
      Gets a row. Returns NOT_FOUND if the row does not exist in the table.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         String name = RowName.of("[TABLE]", "[ROW]").toString();
         Row response = tablesServiceClient.getRow(name);
       }
       
      Parameters:
      name - Required. The name of the row to retrieve. Format: tables/{table}/rows/{row}
      Throws:
      ApiException - if the remote call fails
    • getRow

      public final Row getRow(GetRowRequest request)
      Gets a row. Returns NOT_FOUND if the row does not exist in the table.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         GetRowRequest request =
             GetRowRequest.newBuilder()
                 .setName(RowName.of("[TABLE]", "[ROW]").toString())
                 .setView(View.forNumber(0))
                 .build();
         Row response = tablesServiceClient.getRow(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getRowCallable

      public final UnaryCallable<GetRowRequest,Row> getRowCallable()
      Gets a row. Returns NOT_FOUND if the row does not exist in the table.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         GetRowRequest request =
             GetRowRequest.newBuilder()
                 .setName(RowName.of("[TABLE]", "[ROW]").toString())
                 .setView(View.forNumber(0))
                 .build();
         ApiFuture<Row> future = tablesServiceClient.getRowCallable().futureCall(request);
         // Do something.
         Row response = future.get();
       }
       
    • listRows

      public final TablesServiceClient.ListRowsPagedResponse listRows(String parent)
      Lists rows in a table. Returns NOT_FOUND if the table does not exist.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         String parent = "parent-995424086";
         for (Row element : tablesServiceClient.listRows(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent table. Format: tables/{table}
      Throws:
      ApiException - if the remote call fails
    • listRows

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

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         ListRowsRequest request =
             ListRowsRequest.newBuilder()
                 .setParent("parent-995424086")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setView(View.forNumber(0))
                 .setFilter("filter-1274492040")
                 .build();
         for (Row element : tablesServiceClient.listRows(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listRowsPagedCallable

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

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         ListRowsRequest request =
             ListRowsRequest.newBuilder()
                 .setParent("parent-995424086")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setView(View.forNumber(0))
                 .setFilter("filter-1274492040")
                 .build();
         ApiFuture<Row> future = tablesServiceClient.listRowsPagedCallable().futureCall(request);
         // Do something.
         for (Row element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listRowsCallable

      public final UnaryCallable<ListRowsRequest,ListRowsResponse> listRowsCallable()
      Lists rows in a table. Returns NOT_FOUND if the table does not exist.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         ListRowsRequest request =
             ListRowsRequest.newBuilder()
                 .setParent("parent-995424086")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setView(View.forNumber(0))
                 .setFilter("filter-1274492040")
                 .build();
         while (true) {
           ListRowsResponse response = tablesServiceClient.listRowsCallable().call(request);
           for (Row element : response.getRowsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • createRow

      public final Row createRow(String parent, Row row)
      Creates a row.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         String parent = "parent-995424086";
         Row row = Row.newBuilder().build();
         Row response = tablesServiceClient.createRow(parent, row);
       }
       
      Parameters:
      parent - Required. The parent table where this row will be created. Format: tables/{table}
      row - Required. The row to create.
      Throws:
      ApiException - if the remote call fails
    • createRow

      public final Row createRow(CreateRowRequest request)
      Creates a row.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         CreateRowRequest request =
             CreateRowRequest.newBuilder()
                 .setParent("parent-995424086")
                 .setRow(Row.newBuilder().build())
                 .setView(View.forNumber(0))
                 .build();
         Row response = tablesServiceClient.createRow(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createRowCallable

      public final UnaryCallable<CreateRowRequest,Row> createRowCallable()
      Creates a row.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         CreateRowRequest request =
             CreateRowRequest.newBuilder()
                 .setParent("parent-995424086")
                 .setRow(Row.newBuilder().build())
                 .setView(View.forNumber(0))
                 .build();
         ApiFuture<Row> future = tablesServiceClient.createRowCallable().futureCall(request);
         // Do something.
         Row response = future.get();
       }
       
    • batchCreateRows

      public final BatchCreateRowsResponse batchCreateRows(BatchCreateRowsRequest request)
      Creates multiple rows.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         BatchCreateRowsRequest request =
             BatchCreateRowsRequest.newBuilder()
                 .setParent("parent-995424086")
                 .addAllRequests(new ArrayList<CreateRowRequest>())
                 .build();
         BatchCreateRowsResponse response = tablesServiceClient.batchCreateRows(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • batchCreateRowsCallable

      public final UnaryCallable<BatchCreateRowsRequest,BatchCreateRowsResponse> batchCreateRowsCallable()
      Creates multiple rows.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         BatchCreateRowsRequest request =
             BatchCreateRowsRequest.newBuilder()
                 .setParent("parent-995424086")
                 .addAllRequests(new ArrayList<CreateRowRequest>())
                 .build();
         ApiFuture<BatchCreateRowsResponse> future =
             tablesServiceClient.batchCreateRowsCallable().futureCall(request);
         // Do something.
         BatchCreateRowsResponse response = future.get();
       }
       
    • updateRow

      public final Row updateRow(Row row, com.google.protobuf.FieldMask updateMask)
      Updates a row.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         Row row = Row.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         Row response = tablesServiceClient.updateRow(row, updateMask);
       }
       
      Parameters:
      row - Required. The row to update.
      updateMask - The list of fields to update.
      Throws:
      ApiException - if the remote call fails
    • updateRow

      public final Row updateRow(UpdateRowRequest request)
      Updates a row.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         UpdateRowRequest request =
             UpdateRowRequest.newBuilder()
                 .setRow(Row.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setView(View.forNumber(0))
                 .build();
         Row response = tablesServiceClient.updateRow(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateRowCallable

      public final UnaryCallable<UpdateRowRequest,Row> updateRowCallable()
      Updates a row.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         UpdateRowRequest request =
             UpdateRowRequest.newBuilder()
                 .setRow(Row.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setView(View.forNumber(0))
                 .build();
         ApiFuture<Row> future = tablesServiceClient.updateRowCallable().futureCall(request);
         // Do something.
         Row response = future.get();
       }
       
    • batchUpdateRows

      public final BatchUpdateRowsResponse batchUpdateRows(BatchUpdateRowsRequest request)
      Updates multiple rows.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         BatchUpdateRowsRequest request =
             BatchUpdateRowsRequest.newBuilder()
                 .setParent("parent-995424086")
                 .addAllRequests(new ArrayList<UpdateRowRequest>())
                 .build();
         BatchUpdateRowsResponse response = tablesServiceClient.batchUpdateRows(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • batchUpdateRowsCallable

      public final UnaryCallable<BatchUpdateRowsRequest,BatchUpdateRowsResponse> batchUpdateRowsCallable()
      Updates multiple rows.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         BatchUpdateRowsRequest request =
             BatchUpdateRowsRequest.newBuilder()
                 .setParent("parent-995424086")
                 .addAllRequests(new ArrayList<UpdateRowRequest>())
                 .build();
         ApiFuture<BatchUpdateRowsResponse> future =
             tablesServiceClient.batchUpdateRowsCallable().futureCall(request);
         // Do something.
         BatchUpdateRowsResponse response = future.get();
       }
       
    • deleteRow

      public final void deleteRow(RowName name)
      Deletes a row.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         RowName name = RowName.of("[TABLE]", "[ROW]");
         tablesServiceClient.deleteRow(name);
       }
       
      Parameters:
      name - Required. The name of the row to delete. Format: tables/{table}/rows/{row}
      Throws:
      ApiException - if the remote call fails
    • deleteRow

      public final void deleteRow(String name)
      Deletes a row.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         String name = RowName.of("[TABLE]", "[ROW]").toString();
         tablesServiceClient.deleteRow(name);
       }
       
      Parameters:
      name - Required. The name of the row to delete. Format: tables/{table}/rows/{row}
      Throws:
      ApiException - if the remote call fails
    • deleteRow

      public final void deleteRow(DeleteRowRequest request)
      Deletes a row.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         DeleteRowRequest request =
             DeleteRowRequest.newBuilder().setName(RowName.of("[TABLE]", "[ROW]").toString()).build();
         tablesServiceClient.deleteRow(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteRowCallable

      public final UnaryCallable<DeleteRowRequest,com.google.protobuf.Empty> deleteRowCallable()
      Deletes a row.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         DeleteRowRequest request =
             DeleteRowRequest.newBuilder().setName(RowName.of("[TABLE]", "[ROW]").toString()).build();
         ApiFuture<Empty> future = tablesServiceClient.deleteRowCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • batchDeleteRows

      public final void batchDeleteRows(BatchDeleteRowsRequest request)
      Deletes multiple rows.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         BatchDeleteRowsRequest request =
             BatchDeleteRowsRequest.newBuilder()
                 .setParent(TableName.of("[TABLE]").toString())
                 .addAllNames(new ArrayList<String>())
                 .build();
         tablesServiceClient.batchDeleteRows(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • batchDeleteRowsCallable

      public final UnaryCallable<BatchDeleteRowsRequest,com.google.protobuf.Empty> batchDeleteRowsCallable()
      Deletes multiple rows.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (TablesServiceClient tablesServiceClient = TablesServiceClient.create()) {
         BatchDeleteRowsRequest request =
             BatchDeleteRowsRequest.newBuilder()
                 .setParent(TableName.of("[TABLE]").toString())
                 .addAllNames(new ArrayList<String>())
                 .build();
         ApiFuture<Empty> future = tablesServiceClient.batchDeleteRowsCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • close

      public final void close()
      Specified by:
      close in interface AutoCloseable
    • shutdown

      public void shutdown()
      Specified by:
      shutdown in interface BackgroundResource
    • isShutdown

      public boolean isShutdown()
      Specified by:
      isShutdown in interface BackgroundResource
    • isTerminated

      public boolean isTerminated()
      Specified by:
      isTerminated in interface BackgroundResource
    • shutdownNow

      public void shutdownNow()
      Specified by:
      shutdownNow in interface BackgroundResource
    • awaitTermination

      public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException
      Specified by:
      awaitTermination in interface BackgroundResource
      Throws:
      InterruptedException