Class TransportManagerClient

java.lang.Object
com.google.cloud.networkconnectivity.v1beta.TransportManagerClient
All Implemented Interfaces:
BackgroundResource, AutoCloseable

@BetaApi @Generated("by gapic-generator-java") public class TransportManagerClient extends Object implements BackgroundResource
Service Description: The CLH based service for managing RemoteTransportProfiles and Transports.

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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
   RemoteTransportProfileName name =
       RemoteTransportProfileName.of("[PROJECT]", "[LOCATION]", "[REMOTE_TRANSPORT_PROFILE]");
   RemoteTransportProfile response = transportManagerClient.getRemoteTransportProfile(name);
 }
 

Note: close() needs to be called on the TransportManagerClient 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

ListRemoteTransportProfiles

Lists RemoteTransportProfiles in a given project and location.

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

  • listRemoteTransportProfiles(ListRemoteTransportProfilesRequest request)

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

  • listRemoteTransportProfiles(LocationName parent)

  • listRemoteTransportProfiles(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.

  • listRemoteTransportProfilesPagedCallable()

  • listRemoteTransportProfilesCallable()

GetRemoteTransportProfile

Gets details of a single RemoteTransportProfile.

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

  • getRemoteTransportProfile(GetRemoteTransportProfileRequest request)

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

  • getRemoteTransportProfile(RemoteTransportProfileName name)

  • getRemoteTransportProfile(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.

  • getRemoteTransportProfileCallable()

ListTransports

Lists Transports in a given project and location.

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

  • listTransports(ListTransportsRequest request)

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

  • listTransports(LocationName parent)

  • listTransports(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.

  • listTransportsPagedCallable()

  • listTransportsCallable()

GetTransport

Gets details of a single Transport.

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

  • getTransport(GetTransportRequest request)

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

  • getTransport(TransportName name)

  • getTransport(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.

  • getTransportCallable()

GetStatus

Gets the operational status of a single Transport.

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

  • getStatus(GetStatusRequest request)

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

  • getStatus(TransportName name)

  • getStatus(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.

  • getStatusCallable()

CreateTransport

Creates a new Transport in a given project and location.

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

  • createTransportAsync(CreateTransportRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createTransportAsync(LocationName parent, Transport transport, String transportId)

  • createTransportAsync(String parent, Transport transport, String transportId)

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

  • createTransportOperationCallable()

  • createTransportCallable()

UpdateTransport

Updates the parameters of a single Transport.

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

  • updateTransportAsync(UpdateTransportRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateTransportAsync(Transport transport, 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.

  • updateTransportOperationCallable()

  • updateTransportCallable()

DeleteTransport

Deletes a single Transport.

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

  • deleteTransportAsync(DeleteTransportRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteTransportAsync(TransportName name)

  • deleteTransportAsync(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.

  • deleteTransportOperationCallable()

  • deleteTransportCallable()

ListLocations

Lists information about the supported locations for this service.This method can be called in two ways:

* **List all public locations:** Use the path `GET /v1/locations`.* **List project-visible locations:** Use the path`GET /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or other locations specifically visibleto the project.

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

  • listLocations(ListLocationsRequest request)

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

  • listLocationsPagedCallable()

  • listLocationsCallable()

GetLocation

Gets information about a location.

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

  • getLocation(GetLocationRequest request)

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

  • getLocationCallable()

SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy.

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

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

  • setIamPolicy(SetIamPolicyRequest request)

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

  • setIamPolicyCallable()

GetIamPolicy

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

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

  • getIamPolicy(GetIamPolicyRequest request)

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

  • getIamPolicyCallable()

TestIamPermissions

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

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

  • testIamPermissions(TestIamPermissionsRequest request)

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

  • testIamPermissionsCallable()

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 TransportManagerSettings 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
 TransportManagerSettings transportManagerSettings =
     TransportManagerSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 TransportManagerClient transportManagerClient =
     TransportManagerClient.create(transportManagerSettings);
 

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
 TransportManagerSettings transportManagerSettings =
     TransportManagerSettings.newBuilder().setEndpoint(myEndpoint).build();
 TransportManagerClient transportManagerClient =
     TransportManagerClient.create(transportManagerSettings);
 

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

  • Constructor Details

    • TransportManagerClient

      protected TransportManagerClient(TransportManagerSettings settings) throws IOException
      Constructs an instance of TransportManagerClient, 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
    • TransportManagerClient

      protected TransportManagerClient(TransportManagerStub stub)
  • Method Details

    • create

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

      public static final TransportManagerClient create(TransportManagerSettings settings) throws IOException
      Constructs an instance of TransportManagerClient, 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 TransportManagerClient create(TransportManagerStub stub)
      Constructs an instance of TransportManagerClient, using the given stub for making calls. This is for advanced usage - prefer using create(TransportManagerSettings).
    • getSettings

      public final TransportManagerSettings getSettings()
    • getStub

      public TransportManagerStub getStub()
    • getOperationsClient

      public final OperationsClient getOperationsClient()
      Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
    • listRemoteTransportProfiles

      public final TransportManagerClient.ListRemoteTransportProfilesPagedResponse listRemoteTransportProfiles(LocationName parent)
      Lists RemoteTransportProfiles in a given project and location.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (RemoteTransportProfile element :
             transportManagerClient.listRemoteTransportProfiles(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListRemoteTransportProfilesRequest.
      Throws:
      ApiException - if the remote call fails
    • listRemoteTransportProfiles

      public final TransportManagerClient.ListRemoteTransportProfilesPagedResponse listRemoteTransportProfiles(String parent)
      Lists RemoteTransportProfiles in a given project and location.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (RemoteTransportProfile element :
             transportManagerClient.listRemoteTransportProfiles(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListRemoteTransportProfilesRequest.
      Throws:
      ApiException - if the remote call fails
    • listRemoteTransportProfiles

      Lists RemoteTransportProfiles in a given project and location.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         ListRemoteTransportProfilesRequest request =
             ListRemoteTransportProfilesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         for (RemoteTransportProfile element :
             transportManagerClient.listRemoteTransportProfiles(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
    • listRemoteTransportProfilesPagedCallable

      Lists RemoteTransportProfiles in a given project and location.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         ListRemoteTransportProfilesRequest request =
             ListRemoteTransportProfilesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         ApiFuture<RemoteTransportProfile> future =
             transportManagerClient.listRemoteTransportProfilesPagedCallable().futureCall(request);
         // Do something.
         for (RemoteTransportProfile element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listRemoteTransportProfilesCallable

      public final UnaryCallable<ListRemoteTransportProfilesRequest,ListRemoteTransportProfilesResponse> listRemoteTransportProfilesCallable()
      Lists RemoteTransportProfiles in a given project and location.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         ListRemoteTransportProfilesRequest request =
             ListRemoteTransportProfilesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         while (true) {
           ListRemoteTransportProfilesResponse response =
               transportManagerClient.listRemoteTransportProfilesCallable().call(request);
           for (RemoteTransportProfile element : response.getRemoteTransportProfilesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getRemoteTransportProfile

      public final RemoteTransportProfile getRemoteTransportProfile(RemoteTransportProfileName name)
      Gets details of a single RemoteTransportProfile.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         RemoteTransportProfileName name =
             RemoteTransportProfileName.of("[PROJECT]", "[LOCATION]", "[REMOTE_TRANSPORT_PROFILE]");
         RemoteTransportProfile response = transportManagerClient.getRemoteTransportProfile(name);
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • getRemoteTransportProfile

      public final RemoteTransportProfile getRemoteTransportProfile(String name)
      Gets details of a single RemoteTransportProfile.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         String name =
             RemoteTransportProfileName.of("[PROJECT]", "[LOCATION]", "[REMOTE_TRANSPORT_PROFILE]")
                 .toString();
         RemoteTransportProfile response = transportManagerClient.getRemoteTransportProfile(name);
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • getRemoteTransportProfile

      public final RemoteTransportProfile getRemoteTransportProfile(GetRemoteTransportProfileRequest request)
      Gets details of a single RemoteTransportProfile.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         GetRemoteTransportProfileRequest request =
             GetRemoteTransportProfileRequest.newBuilder()
                 .setName(
                     RemoteTransportProfileName.of(
                             "[PROJECT]", "[LOCATION]", "[REMOTE_TRANSPORT_PROFILE]")
                         .toString())
                 .build();
         RemoteTransportProfile response = transportManagerClient.getRemoteTransportProfile(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getRemoteTransportProfileCallable

      public final UnaryCallable<GetRemoteTransportProfileRequest,RemoteTransportProfile> getRemoteTransportProfileCallable()
      Gets details of a single RemoteTransportProfile.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         GetRemoteTransportProfileRequest request =
             GetRemoteTransportProfileRequest.newBuilder()
                 .setName(
                     RemoteTransportProfileName.of(
                             "[PROJECT]", "[LOCATION]", "[REMOTE_TRANSPORT_PROFILE]")
                         .toString())
                 .build();
         ApiFuture<RemoteTransportProfile> future =
             transportManagerClient.getRemoteTransportProfileCallable().futureCall(request);
         // Do something.
         RemoteTransportProfile response = future.get();
       }
       
    • listTransports

      Lists Transports in a given project and location.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (Transport element : transportManagerClient.listTransports(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListTransportsRequest.
      Throws:
      ApiException - if the remote call fails
    • listTransports

      public final TransportManagerClient.ListTransportsPagedResponse listTransports(String parent)
      Lists Transports in a given project and location.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (Transport element : transportManagerClient.listTransports(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListTransportsRequest.
      Throws:
      ApiException - if the remote call fails
    • listTransports

      Lists Transports in a given project and location.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         ListTransportsRequest request =
             ListTransportsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         for (Transport element : transportManagerClient.listTransports(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
    • listTransportsPagedCallable

      Lists Transports in a given project and location.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         ListTransportsRequest request =
             ListTransportsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         ApiFuture<Transport> future =
             transportManagerClient.listTransportsPagedCallable().futureCall(request);
         // Do something.
         for (Transport element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listTransportsCallable

      public final UnaryCallable<ListTransportsRequest,ListTransportsResponse> listTransportsCallable()
      Lists Transports in a given project and location.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         ListTransportsRequest request =
             ListTransportsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         while (true) {
           ListTransportsResponse response =
               transportManagerClient.listTransportsCallable().call(request);
           for (Transport element : response.getTransportsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getTransport

      public final Transport getTransport(TransportName name)
      Gets details of a single Transport.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         TransportName name = TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]");
         Transport response = transportManagerClient.getTransport(name);
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • getTransport

      public final Transport getTransport(String name)
      Gets details of a single Transport.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         String name = TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]").toString();
         Transport response = transportManagerClient.getTransport(name);
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • getTransport

      public final Transport getTransport(GetTransportRequest request)
      Gets details of a single Transport.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         GetTransportRequest request =
             GetTransportRequest.newBuilder()
                 .setName(TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]").toString())
                 .build();
         Transport response = transportManagerClient.getTransport(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getTransportCallable

      public final UnaryCallable<GetTransportRequest,Transport> getTransportCallable()
      Gets details of a single Transport.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         GetTransportRequest request =
             GetTransportRequest.newBuilder()
                 .setName(TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]").toString())
                 .build();
         ApiFuture<Transport> future =
             transportManagerClient.getTransportCallable().futureCall(request);
         // Do something.
         Transport response = future.get();
       }
       
    • getStatus

      public final GetStatusResponse getStatus(TransportName name)
      Gets the operational status of a single Transport.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         TransportName name = TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]");
         GetStatusResponse response = transportManagerClient.getStatus(name);
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • getStatus

      public final GetStatusResponse getStatus(String name)
      Gets the operational status of a single Transport.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         String name = TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]").toString();
         GetStatusResponse response = transportManagerClient.getStatus(name);
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • getStatus

      public final GetStatusResponse getStatus(GetStatusRequest request)
      Gets the operational status of a single Transport.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         GetStatusRequest request =
             GetStatusRequest.newBuilder()
                 .setName(TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]").toString())
                 .build();
         GetStatusResponse response = transportManagerClient.getStatus(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getStatusCallable

      public final UnaryCallable<GetStatusRequest,GetStatusResponse> getStatusCallable()
      Gets the operational status of a single Transport.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         GetStatusRequest request =
             GetStatusRequest.newBuilder()
                 .setName(TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]").toString())
                 .build();
         ApiFuture<GetStatusResponse> future =
             transportManagerClient.getStatusCallable().futureCall(request);
         // Do something.
         GetStatusResponse response = future.get();
       }
       
    • createTransportAsync

      public final OperationFuture<Transport,OperationMetadata> createTransportAsync(LocationName parent, Transport transport, String transportId)
      Creates a new Transport in a given project and location.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         Transport transport = Transport.newBuilder().build();
         String transportId = "transportId-1713251804";
         Transport response =
             transportManagerClient.createTransportAsync(parent, transport, transportId).get();
       }
       
      Parameters:
      parent - Required. Value for parent.
      transport - Required. The resource being created
      transportId - Required. Id of the requesting object
      Throws:
      ApiException - if the remote call fails
    • createTransportAsync

      public final OperationFuture<Transport,OperationMetadata> createTransportAsync(String parent, Transport transport, String transportId)
      Creates a new Transport in a given project and location.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         Transport transport = Transport.newBuilder().build();
         String transportId = "transportId-1713251804";
         Transport response =
             transportManagerClient.createTransportAsync(parent, transport, transportId).get();
       }
       
      Parameters:
      parent - Required. Value for parent.
      transport - Required. The resource being created
      transportId - Required. Id of the requesting object
      Throws:
      ApiException - if the remote call fails
    • createTransportAsync

      public final OperationFuture<Transport,OperationMetadata> createTransportAsync(CreateTransportRequest request)
      Creates a new Transport in a given project and location.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         CreateTransportRequest request =
             CreateTransportRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setTransportId("transportId-1713251804")
                 .setTransport(Transport.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         Transport response = transportManagerClient.createTransportAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createTransportOperationCallable

      public final OperationCallable<CreateTransportRequest,Transport,OperationMetadata> createTransportOperationCallable()
      Creates a new Transport in a given project and location.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         CreateTransportRequest request =
             CreateTransportRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setTransportId("transportId-1713251804")
                 .setTransport(Transport.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Transport, OperationMetadata> future =
             transportManagerClient.createTransportOperationCallable().futureCall(request);
         // Do something.
         Transport response = future.get();
       }
       
    • createTransportCallable

      public final UnaryCallable<CreateTransportRequest,Operation> createTransportCallable()
      Creates a new Transport in a given project and location.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         CreateTransportRequest request =
             CreateTransportRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setTransportId("transportId-1713251804")
                 .setTransport(Transport.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             transportManagerClient.createTransportCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateTransportAsync

      public final OperationFuture<Transport,OperationMetadata> updateTransportAsync(Transport transport, com.google.protobuf.FieldMask updateMask)
      Updates the parameters of a single Transport.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         Transport transport = Transport.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         Transport response = transportManagerClient.updateTransportAsync(transport, updateMask).get();
       }
       
      Parameters:
      transport - Required. The resource being updated.
      updateMask - Optional. Field mask is used to specify the fields to be overwritten in the Transport resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields present in the request will be overwritten.
      Throws:
      ApiException - if the remote call fails
    • updateTransportAsync

      public final OperationFuture<Transport,OperationMetadata> updateTransportAsync(UpdateTransportRequest request)
      Updates the parameters of a single Transport.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         UpdateTransportRequest request =
             UpdateTransportRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setTransport(Transport.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         Transport response = transportManagerClient.updateTransportAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateTransportOperationCallable

      public final OperationCallable<UpdateTransportRequest,Transport,OperationMetadata> updateTransportOperationCallable()
      Updates the parameters of a single Transport.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         UpdateTransportRequest request =
             UpdateTransportRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setTransport(Transport.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Transport, OperationMetadata> future =
             transportManagerClient.updateTransportOperationCallable().futureCall(request);
         // Do something.
         Transport response = future.get();
       }
       
    • updateTransportCallable

      public final UnaryCallable<UpdateTransportRequest,Operation> updateTransportCallable()
      Updates the parameters of a single Transport.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         UpdateTransportRequest request =
             UpdateTransportRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setTransport(Transport.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             transportManagerClient.updateTransportCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteTransportAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteTransportAsync(TransportName name)
      Deletes a single Transport.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         TransportName name = TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]");
         transportManagerClient.deleteTransportAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • deleteTransportAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteTransportAsync(String name)
      Deletes a single Transport.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         String name = TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]").toString();
         transportManagerClient.deleteTransportAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • deleteTransportAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteTransportAsync(DeleteTransportRequest request)
      Deletes a single Transport.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         DeleteTransportRequest request =
             DeleteTransportRequest.newBuilder()
                 .setName(TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         transportManagerClient.deleteTransportAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteTransportOperationCallable

      public final OperationCallable<DeleteTransportRequest,com.google.protobuf.Empty,OperationMetadata> deleteTransportOperationCallable()
      Deletes a single Transport.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         DeleteTransportRequest request =
             DeleteTransportRequest.newBuilder()
                 .setName(TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             transportManagerClient.deleteTransportOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteTransportCallable

      public final UnaryCallable<DeleteTransportRequest,Operation> deleteTransportCallable()
      Deletes a single Transport.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         DeleteTransportRequest request =
             DeleteTransportRequest.newBuilder()
                 .setName(TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             transportManagerClient.deleteTransportCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • listLocations

      Lists information about the supported locations for this service.This method can be called in two ways:

      * **List all public locations:** Use the path `GET /v1/locations`.* **List project-visible locations:** Use the path`GET /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or other locations specifically visibleto the project.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (Location element : transportManagerClient.listLocations(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
    • listLocationsPagedCallable

      Lists information about the supported locations for this service.This method can be called in two ways:

      * **List all public locations:** Use the path `GET /v1/locations`.* **List project-visible locations:** Use the path`GET /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or other locations specifically visibleto the project.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<Location> future =
             transportManagerClient.listLocationsPagedCallable().futureCall(request);
         // Do something.
         for (Location element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listLocationsCallable

      public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()
      Lists information about the supported locations for this service.This method can be called in two ways:

      * **List all public locations:** Use the path `GET /v1/locations`.* **List project-visible locations:** Use the path`GET /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or other locations specifically visibleto the project.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListLocationsResponse response =
               transportManagerClient.listLocationsCallable().call(request);
           for (Location element : response.getLocationsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getLocation

      public final Location getLocation(GetLocationRequest request)
      Gets information about a location.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
         Location response = transportManagerClient.getLocation(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getLocationCallable

      public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()
      Gets information about a location.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
         ApiFuture<Location> future = transportManagerClient.getLocationCallable().futureCall(request);
         // Do something.
         Location response = future.get();
       }
       
    • setIamPolicy

      public final Policy setIamPolicy(SetIamPolicyRequest request)
      Sets the access control policy on the specified resource. Replacesany existing policy.

      Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         SetIamPolicyRequest request =
             SetIamPolicyRequest.newBuilder()
                 .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
                 .setPolicy(Policy.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         Policy response = transportManagerClient.setIamPolicy(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • setIamPolicyCallable

      public final UnaryCallable<SetIamPolicyRequest,Policy> setIamPolicyCallable()
      Sets the access control policy on the specified resource. Replacesany existing policy.

      Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         SetIamPolicyRequest request =
             SetIamPolicyRequest.newBuilder()
                 .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
                 .setPolicy(Policy.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ApiFuture<Policy> future = transportManagerClient.setIamPolicyCallable().futureCall(request);
         // Do something.
         Policy response = future.get();
       }
       
    • getIamPolicy

      public final Policy getIamPolicy(GetIamPolicyRequest request)
      Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         GetIamPolicyRequest request =
             GetIamPolicyRequest.newBuilder()
                 .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
                 .setOptions(GetPolicyOptions.newBuilder().build())
                 .build();
         Policy response = transportManagerClient.getIamPolicy(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getIamPolicyCallable

      public final UnaryCallable<GetIamPolicyRequest,Policy> getIamPolicyCallable()
      Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         GetIamPolicyRequest request =
             GetIamPolicyRequest.newBuilder()
                 .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
                 .setOptions(GetPolicyOptions.newBuilder().build())
                 .build();
         ApiFuture<Policy> future = transportManagerClient.getIamPolicyCallable().futureCall(request);
         // Do something.
         Policy response = future.get();
       }
       
    • testIamPermissions

      public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request)
      Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.

      Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         TestIamPermissionsRequest request =
             TestIamPermissionsRequest.newBuilder()
                 .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
                 .addAllPermissions(new ArrayList<String>())
                 .build();
         TestIamPermissionsResponse response = transportManagerClient.testIamPermissions(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • testIamPermissionsCallable

      public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()
      Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.

      Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

      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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
         TestIamPermissionsRequest request =
             TestIamPermissionsRequest.newBuilder()
                 .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
                 .addAllPermissions(new ArrayList<String>())
                 .build();
         ApiFuture<TestIamPermissionsResponse> future =
             transportManagerClient.testIamPermissionsCallable().futureCall(request);
         // Do something.
         TestIamPermissionsResponse response = 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