Class TransportManagerClient (1.87.0)

GitHub RepositoryProduct Reference

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 pathGET /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_DENIEDerrors.

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.

Inheritance

java.lang.Object > TransportManagerClient

Static Methods

create()

public static final TransportManagerClient create()

Constructs an instance of TransportManagerClient with default settings.

Returns
Type Description
TransportManagerClient
Exceptions
Type Description
IOException

create(TransportManagerSettings settings)

public static final TransportManagerClient create(TransportManagerSettings settings)

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.

Parameter
Name Description
settings TransportManagerSettings
Returns
Type Description
TransportManagerClient
Exceptions
Type Description
IOException

create(TransportManagerStub stub)

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

Parameter
Name Description
stub TransportManagerStub
Returns
Type Description
TransportManagerClient

Constructors

TransportManagerClient(TransportManagerSettings settings)

protected TransportManagerClient(TransportManagerSettings settings)

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.

Parameter
Name Description
settings TransportManagerSettings

TransportManagerClient(TransportManagerStub stub)

protected TransportManagerClient(TransportManagerStub stub)
Parameter
Name Description
stub TransportManagerStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
Name Description
duration long
unit TimeUnit
Returns
Type Description
boolean
Exceptions
Type Description
InterruptedException

close()

public final void close()

createTransportAsync(CreateTransportRequest request)

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();
 }
 
Parameter
Name Description
request CreateTransportRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Transport,OperationMetadata>

createTransportAsync(LocationName parent, Transport transport, String transportId)

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
Name Description
parent LocationName

Required. Value for parent.

transport Transport

Required. The resource being created

transportId String

Required. Id of the requesting object

Returns
Type Description
OperationFuture<Transport,OperationMetadata>

createTransportAsync(String parent, Transport transport, String transportId)

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
Name Description
parent String

Required. Value for parent.

transport Transport

Required. The resource being created

transportId String

Required. Id of the requesting object

Returns
Type Description
OperationFuture<Transport,OperationMetadata>

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();
 }
 
Returns
Type Description
UnaryCallable<CreateTransportRequest,Operation>

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();
 }
 
Returns
Type Description
OperationCallable<CreateTransportRequest,Transport,OperationMetadata>

deleteTransportAsync(DeleteTransportRequest request)

public final OperationFuture<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();
 }
 
Parameter
Name Description
request DeleteTransportRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteTransportAsync(TransportName name)

public final OperationFuture<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();
 }
 
Parameter
Name Description
name TransportName

Required. Name of the resource.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteTransportAsync(String name)

public final OperationFuture<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();
 }
 
Parameter
Name Description
name String

Required. Name of the resource.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

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();
 }
 
Returns
Type Description
UnaryCallable<DeleteTransportRequest,Operation>

deleteTransportOperationCallable()

public final OperationCallable<DeleteTransportRequest,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();
 }
 
Returns
Type Description
OperationCallable<DeleteTransportRequest,Empty,OperationMetadata>

getIamPolicy(GetIamPolicyRequest request)

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);
 }
 
Parameter
Name Description
request com.google.iam.v1.GetIamPolicyRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
com.google.iam.v1.Policy

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();
 }
 
Returns
Type Description
UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy>

getLocation(GetLocationRequest request)

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);
 }
 
Parameter
Name Description
request com.google.cloud.location.GetLocationRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
com.google.cloud.location.Location

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();
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location>

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.

Returns
Type Description
OperationsClient

getRemoteTransportProfile(GetRemoteTransportProfileRequest request)

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);
 }
 
Parameter
Name Description
request GetRemoteTransportProfileRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
RemoteTransportProfile

getRemoteTransportProfile(RemoteTransportProfileName name)

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);
 }
 
Parameter
Name Description
name RemoteTransportProfileName

Required. Name of the resource.

Returns
Type Description
RemoteTransportProfile

getRemoteTransportProfile(String name)

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);
 }
 
Parameter
Name Description
name String

Required. Name of the resource.

Returns
Type Description
RemoteTransportProfile

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();
 }
 
Returns
Type Description
UnaryCallable<GetRemoteTransportProfileRequest,RemoteTransportProfile>

getSettings()

public final TransportManagerSettings getSettings()
Returns
Type Description
TransportManagerSettings

getStatus(GetStatusRequest request)

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);
 }
 
Parameter
Name Description
request GetStatusRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
GetStatusResponse

getStatus(TransportName name)

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);
 }
 
Parameter
Name Description
name TransportName

Required. Name of the resource.

Returns
Type Description
GetStatusResponse

getStatus(String name)

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);
 }
 
Parameter
Name Description
name String

Required. Name of the resource.

Returns
Type Description
GetStatusResponse

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();
 }
 
Returns
Type Description
UnaryCallable<GetStatusRequest,GetStatusResponse>

getStub()

public TransportManagerStub getStub()
Returns
Type Description
TransportManagerStub

getTransport(GetTransportRequest request)

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);
 }
 
Parameter
Name Description
request GetTransportRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Transport

getTransport(TransportName name)

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);
 }
 
Parameter
Name Description
name TransportName

Required. Name of the resource.

Returns
Type Description
Transport

getTransport(String name)

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);
 }
 
Parameter
Name Description
name String

Required. Name of the resource.

Returns
Type Description
Transport

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();
 }
 
Returns
Type Description
UnaryCallable<GetTransportRequest,Transport>

isShutdown()

public boolean isShutdown()
Returns
Type Description
boolean

isTerminated()

public boolean isTerminated()
Returns
Type Description
boolean

listLocations(ListLocationsRequest request)

public final TransportManagerClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request)

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 pathGET /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);
   }
 }
 
Parameter
Name Description
request com.google.cloud.location.ListLocationsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
TransportManagerClient.ListLocationsPagedResponse

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 pathGET /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;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse>

listLocationsPagedCallable()

public final UnaryCallable<ListLocationsRequest,TransportManagerClient.ListLocationsPagedResponse> 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 pathGET /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);
   }
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.ListLocationsRequest,ListLocationsPagedResponse>

listRemoteTransportProfiles(ListRemoteTransportProfilesRequest request)

public final TransportManagerClient.ListRemoteTransportProfilesPagedResponse listRemoteTransportProfiles(ListRemoteTransportProfilesRequest request)

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);
   }
 }
 
Parameter
Name Description
request ListRemoteTransportProfilesRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
TransportManagerClient.ListRemoteTransportProfilesPagedResponse

listRemoteTransportProfiles(LocationName parent)

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);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. Parent value for ListRemoteTransportProfilesRequest.

Returns
Type Description
TransportManagerClient.ListRemoteTransportProfilesPagedResponse

listRemoteTransportProfiles(String parent)

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);
   }
 }
 
Parameter
Name Description
parent String

Required. Parent value for ListRemoteTransportProfilesRequest.

Returns
Type Description
TransportManagerClient.ListRemoteTransportProfilesPagedResponse

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;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListRemoteTransportProfilesRequest,ListRemoteTransportProfilesResponse>

listRemoteTransportProfilesPagedCallable()

public final UnaryCallable<ListRemoteTransportProfilesRequest,TransportManagerClient.ListRemoteTransportProfilesPagedResponse> 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);
   }
 }
 
Returns
Type Description
UnaryCallable<ListRemoteTransportProfilesRequest,ListRemoteTransportProfilesPagedResponse>

listTransports(ListTransportsRequest request)

public final TransportManagerClient.ListTransportsPagedResponse listTransports(ListTransportsRequest request)

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);
   }
 }
 
Parameter
Name Description
request ListTransportsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
TransportManagerClient.ListTransportsPagedResponse

listTransports(LocationName parent)

public final TransportManagerClient.ListTransportsPagedResponse listTransports(LocationName 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()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (Transport element : transportManagerClient.listTransports(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. Parent value for ListTransportsRequest.

Returns
Type Description
TransportManagerClient.ListTransportsPagedResponse

listTransports(String parent)

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);
   }
 }
 
Parameter
Name Description
parent String

Required. Parent value for ListTransportsRequest.

Returns
Type Description
TransportManagerClient.ListTransportsPagedResponse

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;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListTransportsRequest,ListTransportsResponse>

listTransportsPagedCallable()

public final UnaryCallable<ListTransportsRequest,TransportManagerClient.ListTransportsPagedResponse> 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);
   }
 }
 
Returns
Type Description
UnaryCallable<ListTransportsRequest,ListTransportsPagedResponse>

setIamPolicy(SetIamPolicyRequest request)

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_DENIEDerrors.

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);
 }
 
Parameter
Name Description
request com.google.iam.v1.SetIamPolicyRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
com.google.iam.v1.Policy

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_DENIEDerrors.

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();
 }
 
Returns
Type Description
UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

testIamPermissions(TestIamPermissionsRequest request)

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);
 }
 
Parameter
Name Description
request com.google.iam.v1.TestIamPermissionsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
com.google.iam.v1.TestIamPermissionsResponse

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();
 }
 
Returns
Type Description
UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse>

updateTransportAsync(Transport transport, FieldMask updateMask)

public final OperationFuture<Transport,OperationMetadata> updateTransportAsync(Transport transport, 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
Name Description
transport Transport

Required. The resource being updated.

updateMask FieldMask

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.

Returns
Type Description
OperationFuture<Transport,OperationMetadata>

updateTransportAsync(UpdateTransportRequest request)

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();
 }
 
Parameter
Name Description
request UpdateTransportRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Transport,OperationMetadata>

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();
 }
 
Returns
Type Description
UnaryCallable<UpdateTransportRequest,Operation>

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();
 }
 
Returns
Type Description
OperationCallable<UpdateTransportRequest,Transport,OperationMetadata>