Class DatastreamClient (1.54.0)

GitHub RepositoryProduct ReferenceREST Documentation

Service Description: Datastream service

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   ConnectionProfileName name =
       ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]");
   ConnectionProfile response = datastreamClient.getConnectionProfile(name);
 }
 

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

ListConnectionProfiles

Use this method to list connection profiles created in a project and location.

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

  • listConnectionProfiles(ListConnectionProfilesRequest request)

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

  • listConnectionProfiles(LocationName parent)

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

  • listConnectionProfilesPagedCallable()

  • listConnectionProfilesCallable()

GetConnectionProfile

Use this method to get details about a connection profile.

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

  • getConnectionProfile(GetConnectionProfileRequest request)

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

  • getConnectionProfile(ConnectionProfileName name)

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

  • getConnectionProfileCallable()

CreateConnectionProfile

Use this method to create a connection profile in a project and location.

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

  • createConnectionProfileAsync(CreateConnectionProfileRequest request)

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

  • createConnectionProfileAsync(LocationName parent, ConnectionProfile connectionProfile, String connectionProfileId)

  • createConnectionProfileAsync(String parent, ConnectionProfile connectionProfile, String connectionProfileId)

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

  • createConnectionProfileOperationCallable()

  • createConnectionProfileCallable()

UpdateConnectionProfile

Use this method to update the parameters of a connection profile.

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

  • updateConnectionProfileAsync(UpdateConnectionProfileRequest request)

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

  • updateConnectionProfileAsync(ConnectionProfile connectionProfile, 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.

  • updateConnectionProfileOperationCallable()

  • updateConnectionProfileCallable()

DeleteConnectionProfile

Use this method to delete a connection profile.

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

  • deleteConnectionProfileAsync(DeleteConnectionProfileRequest request)

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

  • deleteConnectionProfileAsync(ConnectionProfileName name)

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

  • deleteConnectionProfileOperationCallable()

  • deleteConnectionProfileCallable()

DiscoverConnectionProfile

Use this method to discover a connection profile. The discover API call exposes the data objects and metadata belonging to the profile. Typically, a request returns children data objects of a parent data object that's optionally supplied in the request.

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

  • discoverConnectionProfile(DiscoverConnectionProfileRequest request)

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

  • discoverConnectionProfileCallable()

ListStreams

Use this method to list streams in a project and location.

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

  • listStreams(ListStreamsRequest request)

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

  • listStreams(LocationName parent)

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

  • listStreamsPagedCallable()

  • listStreamsCallable()

GetStream

Use this method to get details about a stream.

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

  • getStream(GetStreamRequest request)

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

  • getStream(StreamName name)

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

  • getStreamCallable()

CreateStream

Use this method to create a stream.

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

  • createStreamAsync(CreateStreamRequest request)

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

  • createStreamAsync(LocationName parent, Stream stream, String streamId)

  • createStreamAsync(String parent, Stream stream, String streamId)

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

  • createStreamOperationCallable()

  • createStreamCallable()

UpdateStream

Use this method to update the configuration of a stream.

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

  • updateStreamAsync(UpdateStreamRequest request)

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

  • updateStreamAsync(Stream stream, 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.

  • updateStreamOperationCallable()

  • updateStreamCallable()

DeleteStream

Use this method to delete a stream.

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

  • deleteStreamAsync(DeleteStreamRequest request)

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

  • deleteStreamAsync(StreamName name)

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

  • deleteStreamOperationCallable()

  • deleteStreamCallable()

RunStream

Use this method to start, resume or recover a stream with a non default CDC strategy.

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

  • runStreamAsync(RunStreamRequest request)

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

  • runStreamOperationCallable()

  • runStreamCallable()

GetStreamObject

Use this method to get details about a stream object.

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

  • getStreamObject(GetStreamObjectRequest request)

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

  • getStreamObject(StreamObjectName name)

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

  • getStreamObjectCallable()

LookupStreamObject

Use this method to look up a stream object by its source object identifier.

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

  • lookupStreamObject(LookupStreamObjectRequest request)

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

  • lookupStreamObjectCallable()

ListStreamObjects

Use this method to list the objects of a specific stream.

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

  • listStreamObjects(ListStreamObjectsRequest request)

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

  • listStreamObjects(StreamName parent)

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

  • listStreamObjectsPagedCallable()

  • listStreamObjectsCallable()

StartBackfillJob

Use this method to start a backfill job for the specified stream object.

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

  • startBackfillJob(StartBackfillJobRequest request)

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

  • startBackfillJob(StreamObjectName object)

  • startBackfillJob(String object)

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

  • startBackfillJobCallable()

StopBackfillJob

Use this method to stop a backfill job for the specified stream object.

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

  • stopBackfillJob(StopBackfillJobRequest request)

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

  • stopBackfillJob(StreamObjectName object)

  • stopBackfillJob(String object)

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

  • stopBackfillJobCallable()

FetchStaticIps

The FetchStaticIps API call exposes the static IP addresses used by Datastream.

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

  • fetchStaticIps(FetchStaticIpsRequest request)

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

  • fetchStaticIps(LocationName name)

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

  • fetchStaticIpsPagedCallable()

  • fetchStaticIpsCallable()

CreatePrivateConnection

Use this method to create a private connectivity configuration.

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

  • createPrivateConnectionAsync(CreatePrivateConnectionRequest request)

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

  • createPrivateConnectionAsync(LocationName parent, PrivateConnection privateConnection, String privateConnectionId)

  • createPrivateConnectionAsync(String parent, PrivateConnection privateConnection, String privateConnectionId)

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

  • createPrivateConnectionOperationCallable()

  • createPrivateConnectionCallable()

GetPrivateConnection

Use this method to get details about a private connectivity configuration.

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

  • getPrivateConnection(GetPrivateConnectionRequest request)

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

  • getPrivateConnection(PrivateConnectionName name)

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

  • getPrivateConnectionCallable()

ListPrivateConnections

Use this method to list private connectivity configurations in a project and location.

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

  • listPrivateConnections(ListPrivateConnectionsRequest request)

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

  • listPrivateConnections(LocationName parent)

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

  • listPrivateConnectionsPagedCallable()

  • listPrivateConnectionsCallable()

DeletePrivateConnection

Use this method to delete a private connectivity configuration.

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

  • deletePrivateConnectionAsync(DeletePrivateConnectionRequest request)

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

  • deletePrivateConnectionAsync(PrivateConnectionName name)

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

  • deletePrivateConnectionOperationCallable()

  • deletePrivateConnectionCallable()

CreateRoute

Use this method to create a route for a private connectivity configuration in a project and location.

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

  • createRouteAsync(CreateRouteRequest request)

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

  • createRouteAsync(PrivateConnectionName parent, Route route, String routeId)

  • createRouteAsync(String parent, Route route, String routeId)

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

  • createRouteOperationCallable()

  • createRouteCallable()

GetRoute

Use this method to get details about a route.

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

  • getRoute(GetRouteRequest request)

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

  • getRoute(RouteName name)

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

  • getRouteCallable()

ListRoutes

Use this method to list routes created for a private connectivity configuration in a project and location.

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

  • listRoutes(ListRoutesRequest request)

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

  • listRoutes(PrivateConnectionName parent)

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

  • listRoutesPagedCallable()

  • listRoutesCallable()

DeleteRoute

Use this method to delete a route.

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

  • deleteRouteAsync(DeleteRouteRequest request)

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

  • deleteRouteAsync(RouteName name)

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

  • deleteRouteOperationCallable()

  • deleteRouteCallable()

ListLocations

Lists information about the supported locations for this service.

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

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 DatastreamSettings 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
 DatastreamSettings datastreamSettings =
     DatastreamSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 DatastreamClient datastreamClient = DatastreamClient.create(datastreamSettings);
 

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
 DatastreamSettings datastreamSettings =
     DatastreamSettings.newBuilder().setEndpoint(myEndpoint).build();
 DatastreamClient datastreamClient = DatastreamClient.create(datastreamSettings);
 

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


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 DatastreamSettings datastreamSettings = DatastreamSettings.newHttpJsonBuilder().build();
 DatastreamClient datastreamClient = DatastreamClient.create(datastreamSettings);
 

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

Inheritance

java.lang.Object > DatastreamClient

Static Methods

create()

public static final DatastreamClient create()

Constructs an instance of DatastreamClient with default settings.

Returns
Type Description
DatastreamClient
Exceptions
Type Description
IOException

create(DatastreamSettings settings)

public static final DatastreamClient create(DatastreamSettings settings)

Constructs an instance of DatastreamClient, 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 DatastreamSettings
Returns
Type Description
DatastreamClient
Exceptions
Type Description
IOException

create(DatastreamStub stub)

public static final DatastreamClient create(DatastreamStub stub)

Constructs an instance of DatastreamClient, using the given stub for making calls. This is for advanced usage - prefer using create(DatastreamSettings).

Parameter
Name Description
stub DatastreamStub
Returns
Type Description
DatastreamClient

Constructors

DatastreamClient(DatastreamSettings settings)

protected DatastreamClient(DatastreamSettings settings)

Constructs an instance of DatastreamClient, 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 DatastreamSettings

DatastreamClient(DatastreamStub stub)

protected DatastreamClient(DatastreamStub stub)
Parameter
Name Description
stub DatastreamStub

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

createConnectionProfileAsync(CreateConnectionProfileRequest request)

public final OperationFuture<ConnectionProfile,OperationMetadata> createConnectionProfileAsync(CreateConnectionProfileRequest request)

Use this method to create a connection profile in a 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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   CreateConnectionProfileRequest request =
       CreateConnectionProfileRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setConnectionProfileId("connectionProfileId597575526")
           .setConnectionProfile(ConnectionProfile.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .setForce(true)
           .build();
   ConnectionProfile response = datastreamClient.createConnectionProfileAsync(request).get();
 }
 
Parameter
Name Description
request CreateConnectionProfileRequest

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

Returns
Type Description
OperationFuture<ConnectionProfile,OperationMetadata>

createConnectionProfileAsync(LocationName parent, ConnectionProfile connectionProfile, String connectionProfileId)

public final OperationFuture<ConnectionProfile,OperationMetadata> createConnectionProfileAsync(LocationName parent, ConnectionProfile connectionProfile, String connectionProfileId)

Use this method to create a connection profile in a 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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   ConnectionProfile connectionProfile = ConnectionProfile.newBuilder().build();
   String connectionProfileId = "connectionProfileId597575526";
   ConnectionProfile response =
       datastreamClient
           .createConnectionProfileAsync(parent, connectionProfile, connectionProfileId)
           .get();
 }
 
Parameters
Name Description
parent LocationName

Required. The parent that owns the collection of ConnectionProfiles.

connectionProfile ConnectionProfile

Required. The connection profile resource to create.

connectionProfileId String

Required. The connection profile identifier.

Returns
Type Description
OperationFuture<ConnectionProfile,OperationMetadata>

createConnectionProfileAsync(String parent, ConnectionProfile connectionProfile, String connectionProfileId)

public final OperationFuture<ConnectionProfile,OperationMetadata> createConnectionProfileAsync(String parent, ConnectionProfile connectionProfile, String connectionProfileId)

Use this method to create a connection profile in a 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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   ConnectionProfile connectionProfile = ConnectionProfile.newBuilder().build();
   String connectionProfileId = "connectionProfileId597575526";
   ConnectionProfile response =
       datastreamClient
           .createConnectionProfileAsync(parent, connectionProfile, connectionProfileId)
           .get();
 }
 
Parameters
Name Description
parent String

Required. The parent that owns the collection of ConnectionProfiles.

connectionProfile ConnectionProfile

Required. The connection profile resource to create.

connectionProfileId String

Required. The connection profile identifier.

Returns
Type Description
OperationFuture<ConnectionProfile,OperationMetadata>

createConnectionProfileCallable()

public final UnaryCallable<CreateConnectionProfileRequest,Operation> createConnectionProfileCallable()

Use this method to create a connection profile in a 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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   CreateConnectionProfileRequest request =
       CreateConnectionProfileRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setConnectionProfileId("connectionProfileId597575526")
           .setConnectionProfile(ConnectionProfile.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .setForce(true)
           .build();
   ApiFuture<Operation> future =
       datastreamClient.createConnectionProfileCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateConnectionProfileRequest,Operation>

createConnectionProfileOperationCallable()

public final OperationCallable<CreateConnectionProfileRequest,ConnectionProfile,OperationMetadata> createConnectionProfileOperationCallable()

Use this method to create a connection profile in a 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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   CreateConnectionProfileRequest request =
       CreateConnectionProfileRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setConnectionProfileId("connectionProfileId597575526")
           .setConnectionProfile(ConnectionProfile.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .setForce(true)
           .build();
   OperationFuture<ConnectionProfile, OperationMetadata> future =
       datastreamClient.createConnectionProfileOperationCallable().futureCall(request);
   // Do something.
   ConnectionProfile response = future.get();
 }
 
Returns
Type Description
OperationCallable<CreateConnectionProfileRequest,ConnectionProfile,OperationMetadata>

createPrivateConnectionAsync(CreatePrivateConnectionRequest request)

public final OperationFuture<PrivateConnection,OperationMetadata> createPrivateConnectionAsync(CreatePrivateConnectionRequest request)

Use this method to create a private connectivity configuration.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   CreatePrivateConnectionRequest request =
       CreatePrivateConnectionRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPrivateConnectionId("privateConnectionId-1926654532")
           .setPrivateConnection(PrivateConnection.newBuilder().build())
           .setRequestId("requestId693933066")
           .setForce(true)
           .build();
   PrivateConnection response = datastreamClient.createPrivateConnectionAsync(request).get();
 }
 
Parameter
Name Description
request CreatePrivateConnectionRequest

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

Returns
Type Description
OperationFuture<PrivateConnection,OperationMetadata>

createPrivateConnectionAsync(LocationName parent, PrivateConnection privateConnection, String privateConnectionId)

public final OperationFuture<PrivateConnection,OperationMetadata> createPrivateConnectionAsync(LocationName parent, PrivateConnection privateConnection, String privateConnectionId)

Use this method to create a private connectivity configuration.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   PrivateConnection privateConnection = PrivateConnection.newBuilder().build();
   String privateConnectionId = "privateConnectionId-1926654532";
   PrivateConnection response =
       datastreamClient
           .createPrivateConnectionAsync(parent, privateConnection, privateConnectionId)
           .get();
 }
 
Parameters
Name Description
parent LocationName

Required. The parent that owns the collection of PrivateConnections.

privateConnection PrivateConnection

Required. The Private Connectivity resource to create.

privateConnectionId String

Required. The private connectivity identifier.

Returns
Type Description
OperationFuture<PrivateConnection,OperationMetadata>

createPrivateConnectionAsync(String parent, PrivateConnection privateConnection, String privateConnectionId)

public final OperationFuture<PrivateConnection,OperationMetadata> createPrivateConnectionAsync(String parent, PrivateConnection privateConnection, String privateConnectionId)

Use this method to create a private connectivity configuration.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   PrivateConnection privateConnection = PrivateConnection.newBuilder().build();
   String privateConnectionId = "privateConnectionId-1926654532";
   PrivateConnection response =
       datastreamClient
           .createPrivateConnectionAsync(parent, privateConnection, privateConnectionId)
           .get();
 }
 
Parameters
Name Description
parent String

Required. The parent that owns the collection of PrivateConnections.

privateConnection PrivateConnection

Required. The Private Connectivity resource to create.

privateConnectionId String

Required. The private connectivity identifier.

Returns
Type Description
OperationFuture<PrivateConnection,OperationMetadata>

createPrivateConnectionCallable()

public final UnaryCallable<CreatePrivateConnectionRequest,Operation> createPrivateConnectionCallable()

Use this method to create a private connectivity configuration.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   CreatePrivateConnectionRequest request =
       CreatePrivateConnectionRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPrivateConnectionId("privateConnectionId-1926654532")
           .setPrivateConnection(PrivateConnection.newBuilder().build())
           .setRequestId("requestId693933066")
           .setForce(true)
           .build();
   ApiFuture<Operation> future =
       datastreamClient.createPrivateConnectionCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreatePrivateConnectionRequest,Operation>

createPrivateConnectionOperationCallable()

public final OperationCallable<CreatePrivateConnectionRequest,PrivateConnection,OperationMetadata> createPrivateConnectionOperationCallable()

Use this method to create a private connectivity configuration.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   CreatePrivateConnectionRequest request =
       CreatePrivateConnectionRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPrivateConnectionId("privateConnectionId-1926654532")
           .setPrivateConnection(PrivateConnection.newBuilder().build())
           .setRequestId("requestId693933066")
           .setForce(true)
           .build();
   OperationFuture<PrivateConnection, OperationMetadata> future =
       datastreamClient.createPrivateConnectionOperationCallable().futureCall(request);
   // Do something.
   PrivateConnection response = future.get();
 }
 
Returns
Type Description
OperationCallable<CreatePrivateConnectionRequest,PrivateConnection,OperationMetadata>

createRouteAsync(CreateRouteRequest request)

public final OperationFuture<Route,OperationMetadata> createRouteAsync(CreateRouteRequest request)

Use this method to create a route for a private connectivity configuration in a 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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   CreateRouteRequest request =
       CreateRouteRequest.newBuilder()
           .setParent(
               PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]")
                   .toString())
           .setRouteId("routeId1385647428")
           .setRoute(Route.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   Route response = datastreamClient.createRouteAsync(request).get();
 }
 
Parameter
Name Description
request CreateRouteRequest

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

Returns
Type Description
OperationFuture<Route,OperationMetadata>

createRouteAsync(PrivateConnectionName parent, Route route, String routeId)

public final OperationFuture<Route,OperationMetadata> createRouteAsync(PrivateConnectionName parent, Route route, String routeId)

Use this method to create a route for a private connectivity configuration in a 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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   PrivateConnectionName parent =
       PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]");
   Route route = Route.newBuilder().build();
   String routeId = "routeId1385647428";
   Route response = datastreamClient.createRouteAsync(parent, route, routeId).get();
 }
 
Parameters
Name Description
parent PrivateConnectionName

Required. The parent that owns the collection of Routes.

route Route

Required. The Route resource to create.

routeId String

Required. The Route identifier.

Returns
Type Description
OperationFuture<Route,OperationMetadata>

createRouteAsync(String parent, Route route, String routeId)

public final OperationFuture<Route,OperationMetadata> createRouteAsync(String parent, Route route, String routeId)

Use this method to create a route for a private connectivity configuration in a 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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String parent =
       PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]").toString();
   Route route = Route.newBuilder().build();
   String routeId = "routeId1385647428";
   Route response = datastreamClient.createRouteAsync(parent, route, routeId).get();
 }
 
Parameters
Name Description
parent String

Required. The parent that owns the collection of Routes.

route Route

Required. The Route resource to create.

routeId String

Required. The Route identifier.

Returns
Type Description
OperationFuture<Route,OperationMetadata>

createRouteCallable()

public final UnaryCallable<CreateRouteRequest,Operation> createRouteCallable()

Use this method to create a route for a private connectivity configuration in a 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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   CreateRouteRequest request =
       CreateRouteRequest.newBuilder()
           .setParent(
               PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]")
                   .toString())
           .setRouteId("routeId1385647428")
           .setRoute(Route.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future = datastreamClient.createRouteCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateRouteRequest,Operation>

createRouteOperationCallable()

public final OperationCallable<CreateRouteRequest,Route,OperationMetadata> createRouteOperationCallable()

Use this method to create a route for a private connectivity configuration in a 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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   CreateRouteRequest request =
       CreateRouteRequest.newBuilder()
           .setParent(
               PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]")
                   .toString())
           .setRouteId("routeId1385647428")
           .setRoute(Route.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Route, OperationMetadata> future =
       datastreamClient.createRouteOperationCallable().futureCall(request);
   // Do something.
   Route response = future.get();
 }
 
Returns
Type Description
OperationCallable<CreateRouteRequest,Route,OperationMetadata>

createStreamAsync(CreateStreamRequest request)

public final OperationFuture<Stream,OperationMetadata> createStreamAsync(CreateStreamRequest request)

Use this method to create a stream.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   CreateStreamRequest request =
       CreateStreamRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setStreamId("streamId1790933179")
           .setStream(Stream.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .setForce(true)
           .build();
   Stream response = datastreamClient.createStreamAsync(request).get();
 }
 
Parameter
Name Description
request CreateStreamRequest

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

Returns
Type Description
OperationFuture<Stream,OperationMetadata>

createStreamAsync(LocationName parent, Stream stream, String streamId)

public final OperationFuture<Stream,OperationMetadata> createStreamAsync(LocationName parent, Stream stream, String streamId)

Use this method to create a stream.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   Stream stream = Stream.newBuilder().build();
   String streamId = "streamId1790933179";
   Stream response = datastreamClient.createStreamAsync(parent, stream, streamId).get();
 }
 
Parameters
Name Description
parent LocationName

Required. The parent that owns the collection of streams.

stream Stream

Required. The stream resource to create.

streamId String

Required. The stream identifier.

Returns
Type Description
OperationFuture<Stream,OperationMetadata>

createStreamAsync(String parent, Stream stream, String streamId)

public final OperationFuture<Stream,OperationMetadata> createStreamAsync(String parent, Stream stream, String streamId)

Use this method to create a stream.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   Stream stream = Stream.newBuilder().build();
   String streamId = "streamId1790933179";
   Stream response = datastreamClient.createStreamAsync(parent, stream, streamId).get();
 }
 
Parameters
Name Description
parent String

Required. The parent that owns the collection of streams.

stream Stream

Required. The stream resource to create.

streamId String

Required. The stream identifier.

Returns
Type Description
OperationFuture<Stream,OperationMetadata>

createStreamCallable()

public final UnaryCallable<CreateStreamRequest,Operation> createStreamCallable()

Use this method to create a stream.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   CreateStreamRequest request =
       CreateStreamRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setStreamId("streamId1790933179")
           .setStream(Stream.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .setForce(true)
           .build();
   ApiFuture<Operation> future = datastreamClient.createStreamCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateStreamRequest,Operation>

createStreamOperationCallable()

public final OperationCallable<CreateStreamRequest,Stream,OperationMetadata> createStreamOperationCallable()

Use this method to create a stream.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   CreateStreamRequest request =
       CreateStreamRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setStreamId("streamId1790933179")
           .setStream(Stream.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .setForce(true)
           .build();
   OperationFuture<Stream, OperationMetadata> future =
       datastreamClient.createStreamOperationCallable().futureCall(request);
   // Do something.
   Stream response = future.get();
 }
 
Returns
Type Description
OperationCallable<CreateStreamRequest,Stream,OperationMetadata>

deleteConnectionProfileAsync(ConnectionProfileName name)

public final OperationFuture<Empty,OperationMetadata> deleteConnectionProfileAsync(ConnectionProfileName name)

Use this method to delete a connection profile.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   ConnectionProfileName name =
       ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]");
   datastreamClient.deleteConnectionProfileAsync(name).get();
 }
 
Parameter
Name Description
name ConnectionProfileName

Required. The name of the connection profile resource to delete.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteConnectionProfileAsync(DeleteConnectionProfileRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteConnectionProfileAsync(DeleteConnectionProfileRequest request)

Use this method to delete a connection profile.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   DeleteConnectionProfileRequest request =
       DeleteConnectionProfileRequest.newBuilder()
           .setName(
               ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   datastreamClient.deleteConnectionProfileAsync(request).get();
 }
 
Parameter
Name Description
request DeleteConnectionProfileRequest

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

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteConnectionProfileAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteConnectionProfileAsync(String name)

Use this method to delete a connection profile.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String name =
       ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]").toString();
   datastreamClient.deleteConnectionProfileAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. The name of the connection profile resource to delete.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteConnectionProfileCallable()

public final UnaryCallable<DeleteConnectionProfileRequest,Operation> deleteConnectionProfileCallable()

Use this method to delete a connection profile.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   DeleteConnectionProfileRequest request =
       DeleteConnectionProfileRequest.newBuilder()
           .setName(
               ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       datastreamClient.deleteConnectionProfileCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteConnectionProfileRequest,Operation>

deleteConnectionProfileOperationCallable()

public final OperationCallable<DeleteConnectionProfileRequest,Empty,OperationMetadata> deleteConnectionProfileOperationCallable()

Use this method to delete a connection profile.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   DeleteConnectionProfileRequest request =
       DeleteConnectionProfileRequest.newBuilder()
           .setName(
               ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       datastreamClient.deleteConnectionProfileOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteConnectionProfileRequest,Empty,OperationMetadata>

deletePrivateConnectionAsync(DeletePrivateConnectionRequest request)

public final OperationFuture<Empty,OperationMetadata> deletePrivateConnectionAsync(DeletePrivateConnectionRequest request)

Use this method to delete a private connectivity configuration.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   DeletePrivateConnectionRequest request =
       DeletePrivateConnectionRequest.newBuilder()
           .setName(
               PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]")
                   .toString())
           .setRequestId("requestId693933066")
           .setForce(true)
           .build();
   datastreamClient.deletePrivateConnectionAsync(request).get();
 }
 
Parameter
Name Description
request DeletePrivateConnectionRequest

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

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deletePrivateConnectionAsync(PrivateConnectionName name)

public final OperationFuture<Empty,OperationMetadata> deletePrivateConnectionAsync(PrivateConnectionName name)

Use this method to delete a private connectivity configuration.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   PrivateConnectionName name =
       PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]");
   datastreamClient.deletePrivateConnectionAsync(name).get();
 }
 
Parameter
Name Description
name PrivateConnectionName

Required. The name of the private connectivity configuration to delete.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deletePrivateConnectionAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deletePrivateConnectionAsync(String name)

Use this method to delete a private connectivity configuration.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String name =
       PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]").toString();
   datastreamClient.deletePrivateConnectionAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. The name of the private connectivity configuration to delete.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deletePrivateConnectionCallable()

public final UnaryCallable<DeletePrivateConnectionRequest,Operation> deletePrivateConnectionCallable()

Use this method to delete a private connectivity configuration.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   DeletePrivateConnectionRequest request =
       DeletePrivateConnectionRequest.newBuilder()
           .setName(
               PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]")
                   .toString())
           .setRequestId("requestId693933066")
           .setForce(true)
           .build();
   ApiFuture<Operation> future =
       datastreamClient.deletePrivateConnectionCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeletePrivateConnectionRequest,Operation>

deletePrivateConnectionOperationCallable()

public final OperationCallable<DeletePrivateConnectionRequest,Empty,OperationMetadata> deletePrivateConnectionOperationCallable()

Use this method to delete a private connectivity configuration.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   DeletePrivateConnectionRequest request =
       DeletePrivateConnectionRequest.newBuilder()
           .setName(
               PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]")
                   .toString())
           .setRequestId("requestId693933066")
           .setForce(true)
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       datastreamClient.deletePrivateConnectionOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeletePrivateConnectionRequest,Empty,OperationMetadata>

deleteRouteAsync(DeleteRouteRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteRouteAsync(DeleteRouteRequest request)

Use this method to delete a route.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   DeleteRouteRequest request =
       DeleteRouteRequest.newBuilder()
           .setName(
               RouteName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]", "[ROUTE]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   datastreamClient.deleteRouteAsync(request).get();
 }
 
Parameter
Name Description
request DeleteRouteRequest

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

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteRouteAsync(RouteName name)

public final OperationFuture<Empty,OperationMetadata> deleteRouteAsync(RouteName name)

Use this method to delete a route.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   RouteName name = RouteName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]", "[ROUTE]");
   datastreamClient.deleteRouteAsync(name).get();
 }
 
Parameter
Name Description
name RouteName

Required. The name of the Route resource to delete.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteRouteAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteRouteAsync(String name)

Use this method to delete a route.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String name =
       RouteName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]", "[ROUTE]").toString();
   datastreamClient.deleteRouteAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. The name of the Route resource to delete.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteRouteCallable()

public final UnaryCallable<DeleteRouteRequest,Operation> deleteRouteCallable()

Use this method to delete a route.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   DeleteRouteRequest request =
       DeleteRouteRequest.newBuilder()
           .setName(
               RouteName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]", "[ROUTE]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future = datastreamClient.deleteRouteCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteRouteRequest,Operation>

deleteRouteOperationCallable()

public final OperationCallable<DeleteRouteRequest,Empty,OperationMetadata> deleteRouteOperationCallable()

Use this method to delete a route.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   DeleteRouteRequest request =
       DeleteRouteRequest.newBuilder()
           .setName(
               RouteName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]", "[ROUTE]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       datastreamClient.deleteRouteOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteRouteRequest,Empty,OperationMetadata>

deleteStreamAsync(DeleteStreamRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteStreamAsync(DeleteStreamRequest request)

Use this method to delete a stream.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   DeleteStreamRequest request =
       DeleteStreamRequest.newBuilder()
           .setName(StreamName.of("[PROJECT]", "[LOCATION]", "[STREAM]").toString())
           .setRequestId("requestId693933066")
           .build();
   datastreamClient.deleteStreamAsync(request).get();
 }
 
Parameter
Name Description
request DeleteStreamRequest

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

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteStreamAsync(StreamName name)

public final OperationFuture<Empty,OperationMetadata> deleteStreamAsync(StreamName name)

Use this method to delete a stream.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   StreamName name = StreamName.of("[PROJECT]", "[LOCATION]", "[STREAM]");
   datastreamClient.deleteStreamAsync(name).get();
 }
 
Parameter
Name Description
name StreamName

Required. The name of the stream resource to delete.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteStreamAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteStreamAsync(String name)

Use this method to delete a stream.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String name = StreamName.of("[PROJECT]", "[LOCATION]", "[STREAM]").toString();
   datastreamClient.deleteStreamAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. The name of the stream resource to delete.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteStreamCallable()

public final UnaryCallable<DeleteStreamRequest,Operation> deleteStreamCallable()

Use this method to delete a stream.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   DeleteStreamRequest request =
       DeleteStreamRequest.newBuilder()
           .setName(StreamName.of("[PROJECT]", "[LOCATION]", "[STREAM]").toString())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future = datastreamClient.deleteStreamCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteStreamRequest,Operation>

deleteStreamOperationCallable()

public final OperationCallable<DeleteStreamRequest,Empty,OperationMetadata> deleteStreamOperationCallable()

Use this method to delete a stream.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   DeleteStreamRequest request =
       DeleteStreamRequest.newBuilder()
           .setName(StreamName.of("[PROJECT]", "[LOCATION]", "[STREAM]").toString())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       datastreamClient.deleteStreamOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteStreamRequest,Empty,OperationMetadata>

discoverConnectionProfile(DiscoverConnectionProfileRequest request)

public final DiscoverConnectionProfileResponse discoverConnectionProfile(DiscoverConnectionProfileRequest request)

Use this method to discover a connection profile. The discover API call exposes the data objects and metadata belonging to the profile. Typically, a request returns children data objects of a parent data object that's optionally supplied in the request.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   DiscoverConnectionProfileRequest request =
       DiscoverConnectionProfileRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .build();
   DiscoverConnectionProfileResponse response =
       datastreamClient.discoverConnectionProfile(request);
 }
 
Parameter
Name Description
request DiscoverConnectionProfileRequest

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

Returns
Type Description
DiscoverConnectionProfileResponse

discoverConnectionProfileCallable()

public final UnaryCallable<DiscoverConnectionProfileRequest,DiscoverConnectionProfileResponse> discoverConnectionProfileCallable()

Use this method to discover a connection profile. The discover API call exposes the data objects and metadata belonging to the profile. Typically, a request returns children data objects of a parent data object that's optionally supplied in the request.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   DiscoverConnectionProfileRequest request =
       DiscoverConnectionProfileRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .build();
   ApiFuture<DiscoverConnectionProfileResponse> future =
       datastreamClient.discoverConnectionProfileCallable().futureCall(request);
   // Do something.
   DiscoverConnectionProfileResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<DiscoverConnectionProfileRequest,DiscoverConnectionProfileResponse>

fetchStaticIps(FetchStaticIpsRequest request)

public final DatastreamClient.FetchStaticIpsPagedResponse fetchStaticIps(FetchStaticIpsRequest request)

The FetchStaticIps API call exposes the static IP addresses used by Datastream.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   FetchStaticIpsRequest request =
       FetchStaticIpsRequest.newBuilder()
           .setName(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (String element : datastreamClient.fetchStaticIps(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request FetchStaticIpsRequest

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

Returns
Type Description
DatastreamClient.FetchStaticIpsPagedResponse

fetchStaticIps(LocationName name)

public final DatastreamClient.FetchStaticIpsPagedResponse fetchStaticIps(LocationName name)

The FetchStaticIps API call exposes the static IP addresses used by Datastream.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   LocationName name = LocationName.of("[PROJECT]", "[LOCATION]");
   for (String element : datastreamClient.fetchStaticIps(name).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
name LocationName

Required. The resource name for the location for which static IPs should be returned. Must be in the format projects/*/locations/*.

Returns
Type Description
DatastreamClient.FetchStaticIpsPagedResponse

fetchStaticIps(String name)

public final DatastreamClient.FetchStaticIpsPagedResponse fetchStaticIps(String name)

The FetchStaticIps API call exposes the static IP addresses used by Datastream.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String name = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (String element : datastreamClient.fetchStaticIps(name).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
name String

Required. The resource name for the location for which static IPs should be returned. Must be in the format projects/*/locations/*.

Returns
Type Description
DatastreamClient.FetchStaticIpsPagedResponse

fetchStaticIpsCallable()

public final UnaryCallable<FetchStaticIpsRequest,FetchStaticIpsResponse> fetchStaticIpsCallable()

The FetchStaticIps API call exposes the static IP addresses used by Datastream.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   FetchStaticIpsRequest request =
       FetchStaticIpsRequest.newBuilder()
           .setName(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     FetchStaticIpsResponse response = datastreamClient.fetchStaticIpsCallable().call(request);
     for (String element : response.getStaticIpsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<FetchStaticIpsRequest,FetchStaticIpsResponse>

fetchStaticIpsPagedCallable()

public final UnaryCallable<FetchStaticIpsRequest,DatastreamClient.FetchStaticIpsPagedResponse> fetchStaticIpsPagedCallable()

The FetchStaticIps API call exposes the static IP addresses used by Datastream.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   FetchStaticIpsRequest request =
       FetchStaticIpsRequest.newBuilder()
           .setName(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<String> future = datastreamClient.fetchStaticIpsPagedCallable().futureCall(request);
   // Do something.
   for (String element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<FetchStaticIpsRequest,FetchStaticIpsPagedResponse>

getConnectionProfile(ConnectionProfileName name)

public final ConnectionProfile getConnectionProfile(ConnectionProfileName name)

Use this method to get details about a connection profile.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   ConnectionProfileName name =
       ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]");
   ConnectionProfile response = datastreamClient.getConnectionProfile(name);
 }
 
Parameter
Name Description
name ConnectionProfileName

Required. The name of the connection profile resource to get.

Returns
Type Description
ConnectionProfile

getConnectionProfile(GetConnectionProfileRequest request)

public final ConnectionProfile getConnectionProfile(GetConnectionProfileRequest request)

Use this method to get details about a connection profile.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   GetConnectionProfileRequest request =
       GetConnectionProfileRequest.newBuilder()
           .setName(
               ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
                   .toString())
           .build();
   ConnectionProfile response = datastreamClient.getConnectionProfile(request);
 }
 
Parameter
Name Description
request GetConnectionProfileRequest

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

Returns
Type Description
ConnectionProfile

getConnectionProfile(String name)

public final ConnectionProfile getConnectionProfile(String name)

Use this method to get details about a connection profile.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String name =
       ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]").toString();
   ConnectionProfile response = datastreamClient.getConnectionProfile(name);
 }
 
Parameter
Name Description
name String

Required. The name of the connection profile resource to get.

Returns
Type Description
ConnectionProfile

getConnectionProfileCallable()

public final UnaryCallable<GetConnectionProfileRequest,ConnectionProfile> getConnectionProfileCallable()

Use this method to get details about a connection profile.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   GetConnectionProfileRequest request =
       GetConnectionProfileRequest.newBuilder()
           .setName(
               ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
                   .toString())
           .build();
   ApiFuture<ConnectionProfile> future =
       datastreamClient.getConnectionProfileCallable().futureCall(request);
   // Do something.
   ConnectionProfile response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetConnectionProfileRequest,ConnectionProfile>

getHttpJsonOperationsClient()

public final OperationsClient getHttpJsonOperationsClient()

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

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
   Location response = datastreamClient.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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
   ApiFuture<Location> future = datastreamClient.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

getPrivateConnection(GetPrivateConnectionRequest request)

public final PrivateConnection getPrivateConnection(GetPrivateConnectionRequest request)

Use this method to get details about a private connectivity configuration.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   GetPrivateConnectionRequest request =
       GetPrivateConnectionRequest.newBuilder()
           .setName(
               PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]")
                   .toString())
           .build();
   PrivateConnection response = datastreamClient.getPrivateConnection(request);
 }
 
Parameter
Name Description
request GetPrivateConnectionRequest

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

Returns
Type Description
PrivateConnection

getPrivateConnection(PrivateConnectionName name)

public final PrivateConnection getPrivateConnection(PrivateConnectionName name)

Use this method to get details about a private connectivity configuration.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   PrivateConnectionName name =
       PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]");
   PrivateConnection response = datastreamClient.getPrivateConnection(name);
 }
 
Parameter
Name Description
name PrivateConnectionName

Required. The name of the private connectivity configuration to get.

Returns
Type Description
PrivateConnection

getPrivateConnection(String name)

public final PrivateConnection getPrivateConnection(String name)

Use this method to get details about a private connectivity configuration.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String name =
       PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]").toString();
   PrivateConnection response = datastreamClient.getPrivateConnection(name);
 }
 
Parameter
Name Description
name String

Required. The name of the private connectivity configuration to get.

Returns
Type Description
PrivateConnection

getPrivateConnectionCallable()

public final UnaryCallable<GetPrivateConnectionRequest,PrivateConnection> getPrivateConnectionCallable()

Use this method to get details about a private connectivity configuration.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   GetPrivateConnectionRequest request =
       GetPrivateConnectionRequest.newBuilder()
           .setName(
               PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]")
                   .toString())
           .build();
   ApiFuture<PrivateConnection> future =
       datastreamClient.getPrivateConnectionCallable().futureCall(request);
   // Do something.
   PrivateConnection response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetPrivateConnectionRequest,PrivateConnection>

getRoute(GetRouteRequest request)

public final Route getRoute(GetRouteRequest request)

Use this method to get details about a route.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   GetRouteRequest request =
       GetRouteRequest.newBuilder()
           .setName(
               RouteName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]", "[ROUTE]")
                   .toString())
           .build();
   Route response = datastreamClient.getRoute(request);
 }
 
Parameter
Name Description
request GetRouteRequest

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

Returns
Type Description
Route

getRoute(RouteName name)

public final Route getRoute(RouteName name)

Use this method to get details about a route.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   RouteName name = RouteName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]", "[ROUTE]");
   Route response = datastreamClient.getRoute(name);
 }
 
Parameter
Name Description
name RouteName

Required. The name of the Route resource to get.

Returns
Type Description
Route

getRoute(String name)

public final Route getRoute(String name)

Use this method to get details about a route.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String name =
       RouteName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]", "[ROUTE]").toString();
   Route response = datastreamClient.getRoute(name);
 }
 
Parameter
Name Description
name String

Required. The name of the Route resource to get.

Returns
Type Description
Route

getRouteCallable()

public final UnaryCallable<GetRouteRequest,Route> getRouteCallable()

Use this method to get details about a route.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   GetRouteRequest request =
       GetRouteRequest.newBuilder()
           .setName(
               RouteName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]", "[ROUTE]")
                   .toString())
           .build();
   ApiFuture<Route> future = datastreamClient.getRouteCallable().futureCall(request);
   // Do something.
   Route response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetRouteRequest,Route>

getSettings()

public final DatastreamSettings getSettings()
Returns
Type Description
DatastreamSettings

getStream(GetStreamRequest request)

public final Stream getStream(GetStreamRequest request)

Use this method to get details about a stream.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   GetStreamRequest request =
       GetStreamRequest.newBuilder()
           .setName(StreamName.of("[PROJECT]", "[LOCATION]", "[STREAM]").toString())
           .build();
   Stream response = datastreamClient.getStream(request);
 }
 
Parameter
Name Description
request GetStreamRequest

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

Returns
Type Description
Stream

getStream(StreamName name)

public final Stream getStream(StreamName name)

Use this method to get details about a stream.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   StreamName name = StreamName.of("[PROJECT]", "[LOCATION]", "[STREAM]");
   Stream response = datastreamClient.getStream(name);
 }
 
Parameter
Name Description
name StreamName

Required. The name of the stream resource to get.

Returns
Type Description
Stream

getStream(String name)

public final Stream getStream(String name)

Use this method to get details about a stream.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String name = StreamName.of("[PROJECT]", "[LOCATION]", "[STREAM]").toString();
   Stream response = datastreamClient.getStream(name);
 }
 
Parameter
Name Description
name String

Required. The name of the stream resource to get.

Returns
Type Description
Stream

getStreamCallable()

public final UnaryCallable<GetStreamRequest,Stream> getStreamCallable()

Use this method to get details about a stream.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   GetStreamRequest request =
       GetStreamRequest.newBuilder()
           .setName(StreamName.of("[PROJECT]", "[LOCATION]", "[STREAM]").toString())
           .build();
   ApiFuture<Stream> future = datastreamClient.getStreamCallable().futureCall(request);
   // Do something.
   Stream response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetStreamRequest,Stream>

getStreamObject(GetStreamObjectRequest request)

public final StreamObject getStreamObject(GetStreamObjectRequest request)

Use this method to get details about a stream object.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   GetStreamObjectRequest request =
       GetStreamObjectRequest.newBuilder()
           .setName(
               StreamObjectName.of("[PROJECT]", "[LOCATION]", "[STREAM]", "[OBJECT]").toString())
           .build();
   StreamObject response = datastreamClient.getStreamObject(request);
 }
 
Parameter
Name Description
request GetStreamObjectRequest

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

Returns
Type Description
StreamObject

getStreamObject(StreamObjectName name)

public final StreamObject getStreamObject(StreamObjectName name)

Use this method to get details about a stream object.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   StreamObjectName name =
       StreamObjectName.of("[PROJECT]", "[LOCATION]", "[STREAM]", "[OBJECT]");
   StreamObject response = datastreamClient.getStreamObject(name);
 }
 
Parameter
Name Description
name StreamObjectName

Required. The name of the stream object resource to get.

Returns
Type Description
StreamObject

getStreamObject(String name)

public final StreamObject getStreamObject(String name)

Use this method to get details about a stream object.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String name =
       StreamObjectName.of("[PROJECT]", "[LOCATION]", "[STREAM]", "[OBJECT]").toString();
   StreamObject response = datastreamClient.getStreamObject(name);
 }
 
Parameter
Name Description
name String

Required. The name of the stream object resource to get.

Returns
Type Description
StreamObject

getStreamObjectCallable()

public final UnaryCallable<GetStreamObjectRequest,StreamObject> getStreamObjectCallable()

Use this method to get details about a stream object.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   GetStreamObjectRequest request =
       GetStreamObjectRequest.newBuilder()
           .setName(
               StreamObjectName.of("[PROJECT]", "[LOCATION]", "[STREAM]", "[OBJECT]").toString())
           .build();
   ApiFuture<StreamObject> future =
       datastreamClient.getStreamObjectCallable().futureCall(request);
   // Do something.
   StreamObject response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetStreamObjectRequest,StreamObject>

getStub()

public DatastreamStub getStub()
Returns
Type Description
DatastreamStub

isShutdown()

public boolean isShutdown()
Returns
Type Description
boolean

isTerminated()

public boolean isTerminated()
Returns
Type Description
boolean

listConnectionProfiles(ListConnectionProfilesRequest request)

public final DatastreamClient.ListConnectionProfilesPagedResponse listConnectionProfiles(ListConnectionProfilesRequest request)

Use this method to list connection profiles created in a 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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   ListConnectionProfilesRequest request =
       ListConnectionProfilesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (ConnectionProfile element :
       datastreamClient.listConnectionProfiles(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListConnectionProfilesRequest

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

Returns
Type Description
DatastreamClient.ListConnectionProfilesPagedResponse

listConnectionProfiles(LocationName parent)

public final DatastreamClient.ListConnectionProfilesPagedResponse listConnectionProfiles(LocationName parent)

Use this method to list connection profiles created in a 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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (ConnectionProfile element :
       datastreamClient.listConnectionProfiles(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. The parent that owns the collection of connection profiles.

Returns
Type Description
DatastreamClient.ListConnectionProfilesPagedResponse

listConnectionProfiles(String parent)

public final DatastreamClient.ListConnectionProfilesPagedResponse listConnectionProfiles(String parent)

Use this method to list connection profiles created in a 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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (ConnectionProfile element :
       datastreamClient.listConnectionProfiles(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent that owns the collection of connection profiles.

Returns
Type Description
DatastreamClient.ListConnectionProfilesPagedResponse

listConnectionProfilesCallable()

public final UnaryCallable<ListConnectionProfilesRequest,ListConnectionProfilesResponse> listConnectionProfilesCallable()

Use this method to list connection profiles created in a 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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   ListConnectionProfilesRequest request =
       ListConnectionProfilesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListConnectionProfilesResponse response =
         datastreamClient.listConnectionProfilesCallable().call(request);
     for (ConnectionProfile element : response.getConnectionProfilesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListConnectionProfilesRequest,ListConnectionProfilesResponse>

listConnectionProfilesPagedCallable()

public final UnaryCallable<ListConnectionProfilesRequest,DatastreamClient.ListConnectionProfilesPagedResponse> listConnectionProfilesPagedCallable()

Use this method to list connection profiles created in a 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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   ListConnectionProfilesRequest request =
       ListConnectionProfilesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<ConnectionProfile> future =
       datastreamClient.listConnectionProfilesPagedCallable().futureCall(request);
   // Do something.
   for (ConnectionProfile element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListConnectionProfilesRequest,ListConnectionProfilesPagedResponse>

listLocations(ListLocationsRequest request)

public final DatastreamClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request)

Lists information about the supported locations for this service.

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

listLocationsCallable()

public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()

Lists information about the supported locations for this service.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   ListLocationsRequest request =
       ListLocationsRequest.newBuilder()
           .setName("name3373707")
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListLocationsResponse response = datastreamClient.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,DatastreamClient.ListLocationsPagedResponse> listLocationsPagedCallable()

Lists information about the supported locations for this service.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   ListLocationsRequest request =
       ListLocationsRequest.newBuilder()
           .setName("name3373707")
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<Location> future =
       datastreamClient.listLocationsPagedCallable().futureCall(request);
   // Do something.
   for (Location element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.ListLocationsRequest,ListLocationsPagedResponse>

listPrivateConnections(ListPrivateConnectionsRequest request)

public final DatastreamClient.ListPrivateConnectionsPagedResponse listPrivateConnections(ListPrivateConnectionsRequest request)

Use this method to list private connectivity configurations in a 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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   ListPrivateConnectionsRequest request =
       ListPrivateConnectionsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (PrivateConnection element :
       datastreamClient.listPrivateConnections(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListPrivateConnectionsRequest

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

Returns
Type Description
DatastreamClient.ListPrivateConnectionsPagedResponse

listPrivateConnections(LocationName parent)

public final DatastreamClient.ListPrivateConnectionsPagedResponse listPrivateConnections(LocationName parent)

Use this method to list private connectivity configurations in a 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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (PrivateConnection element :
       datastreamClient.listPrivateConnections(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. The parent that owns the collection of private connectivity configurations.

Returns
Type Description
DatastreamClient.ListPrivateConnectionsPagedResponse

listPrivateConnections(String parent)

public final DatastreamClient.ListPrivateConnectionsPagedResponse listPrivateConnections(String parent)

Use this method to list private connectivity configurations in a 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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (PrivateConnection element :
       datastreamClient.listPrivateConnections(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent that owns the collection of private connectivity configurations.

Returns
Type Description
DatastreamClient.ListPrivateConnectionsPagedResponse

listPrivateConnectionsCallable()

public final UnaryCallable<ListPrivateConnectionsRequest,ListPrivateConnectionsResponse> listPrivateConnectionsCallable()

Use this method to list private connectivity configurations in a 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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   ListPrivateConnectionsRequest request =
       ListPrivateConnectionsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListPrivateConnectionsResponse response =
         datastreamClient.listPrivateConnectionsCallable().call(request);
     for (PrivateConnection element : response.getPrivateConnectionsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListPrivateConnectionsRequest,ListPrivateConnectionsResponse>

listPrivateConnectionsPagedCallable()

public final UnaryCallable<ListPrivateConnectionsRequest,DatastreamClient.ListPrivateConnectionsPagedResponse> listPrivateConnectionsPagedCallable()

Use this method to list private connectivity configurations in a 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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   ListPrivateConnectionsRequest request =
       ListPrivateConnectionsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<PrivateConnection> future =
       datastreamClient.listPrivateConnectionsPagedCallable().futureCall(request);
   // Do something.
   for (PrivateConnection element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListPrivateConnectionsRequest,ListPrivateConnectionsPagedResponse>

listRoutes(ListRoutesRequest request)

public final DatastreamClient.ListRoutesPagedResponse listRoutes(ListRoutesRequest request)

Use this method to list routes created for a private connectivity configuration in a 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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   ListRoutesRequest request =
       ListRoutesRequest.newBuilder()
           .setParent(
               PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (Route element : datastreamClient.listRoutes(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListRoutesRequest

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

Returns
Type Description
DatastreamClient.ListRoutesPagedResponse

listRoutes(PrivateConnectionName parent)

public final DatastreamClient.ListRoutesPagedResponse listRoutes(PrivateConnectionName parent)

Use this method to list routes created for a private connectivity configuration in a 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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   PrivateConnectionName parent =
       PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]");
   for (Route element : datastreamClient.listRoutes(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent PrivateConnectionName

Required. The parent that owns the collection of Routess.

Returns
Type Description
DatastreamClient.ListRoutesPagedResponse

listRoutes(String parent)

public final DatastreamClient.ListRoutesPagedResponse listRoutes(String parent)

Use this method to list routes created for a private connectivity configuration in a 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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String parent =
       PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]").toString();
   for (Route element : datastreamClient.listRoutes(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent that owns the collection of Routess.

Returns
Type Description
DatastreamClient.ListRoutesPagedResponse

listRoutesCallable()

public final UnaryCallable<ListRoutesRequest,ListRoutesResponse> listRoutesCallable()

Use this method to list routes created for a private connectivity configuration in a 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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   ListRoutesRequest request =
       ListRoutesRequest.newBuilder()
           .setParent(
               PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListRoutesResponse response = datastreamClient.listRoutesCallable().call(request);
     for (Route element : response.getRoutesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListRoutesRequest,ListRoutesResponse>

listRoutesPagedCallable()

public final UnaryCallable<ListRoutesRequest,DatastreamClient.ListRoutesPagedResponse> listRoutesPagedCallable()

Use this method to list routes created for a private connectivity configuration in a 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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   ListRoutesRequest request =
       ListRoutesRequest.newBuilder()
           .setParent(
               PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<Route> future = datastreamClient.listRoutesPagedCallable().futureCall(request);
   // Do something.
   for (Route element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListRoutesRequest,ListRoutesPagedResponse>

listStreamObjects(ListStreamObjectsRequest request)

public final DatastreamClient.ListStreamObjectsPagedResponse listStreamObjects(ListStreamObjectsRequest request)

Use this method to list the objects of a specific stream.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   ListStreamObjectsRequest request =
       ListStreamObjectsRequest.newBuilder()
           .setParent(StreamName.of("[PROJECT]", "[LOCATION]", "[STREAM]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (StreamObject element : datastreamClient.listStreamObjects(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListStreamObjectsRequest

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

Returns
Type Description
DatastreamClient.ListStreamObjectsPagedResponse

listStreamObjects(StreamName parent)

public final DatastreamClient.ListStreamObjectsPagedResponse listStreamObjects(StreamName parent)

Use this method to list the objects of a specific stream.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   StreamName parent = StreamName.of("[PROJECT]", "[LOCATION]", "[STREAM]");
   for (StreamObject element : datastreamClient.listStreamObjects(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent StreamName

Required. The parent stream that owns the collection of objects.

Returns
Type Description
DatastreamClient.ListStreamObjectsPagedResponse

listStreamObjects(String parent)

public final DatastreamClient.ListStreamObjectsPagedResponse listStreamObjects(String parent)

Use this method to list the objects of a specific stream.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String parent = StreamName.of("[PROJECT]", "[LOCATION]", "[STREAM]").toString();
   for (StreamObject element : datastreamClient.listStreamObjects(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent stream that owns the collection of objects.

Returns
Type Description
DatastreamClient.ListStreamObjectsPagedResponse

listStreamObjectsCallable()

public final UnaryCallable<ListStreamObjectsRequest,ListStreamObjectsResponse> listStreamObjectsCallable()

Use this method to list the objects of a specific stream.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   ListStreamObjectsRequest request =
       ListStreamObjectsRequest.newBuilder()
           .setParent(StreamName.of("[PROJECT]", "[LOCATION]", "[STREAM]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListStreamObjectsResponse response =
         datastreamClient.listStreamObjectsCallable().call(request);
     for (StreamObject element : response.getStreamObjectsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListStreamObjectsRequest,ListStreamObjectsResponse>

listStreamObjectsPagedCallable()

public final UnaryCallable<ListStreamObjectsRequest,DatastreamClient.ListStreamObjectsPagedResponse> listStreamObjectsPagedCallable()

Use this method to list the objects of a specific stream.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   ListStreamObjectsRequest request =
       ListStreamObjectsRequest.newBuilder()
           .setParent(StreamName.of("[PROJECT]", "[LOCATION]", "[STREAM]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<StreamObject> future =
       datastreamClient.listStreamObjectsPagedCallable().futureCall(request);
   // Do something.
   for (StreamObject element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListStreamObjectsRequest,ListStreamObjectsPagedResponse>

listStreams(ListStreamsRequest request)

public final DatastreamClient.ListStreamsPagedResponse listStreams(ListStreamsRequest request)

Use this method to list streams in a 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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   ListStreamsRequest request =
       ListStreamsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (Stream element : datastreamClient.listStreams(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListStreamsRequest

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

Returns
Type Description
DatastreamClient.ListStreamsPagedResponse

listStreams(LocationName parent)

public final DatastreamClient.ListStreamsPagedResponse listStreams(LocationName parent)

Use this method to list streams in a 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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (Stream element : datastreamClient.listStreams(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. The parent that owns the collection of streams.

Returns
Type Description
DatastreamClient.ListStreamsPagedResponse

listStreams(String parent)

public final DatastreamClient.ListStreamsPagedResponse listStreams(String parent)

Use this method to list streams in a 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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (Stream element : datastreamClient.listStreams(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent that owns the collection of streams.

Returns
Type Description
DatastreamClient.ListStreamsPagedResponse

listStreamsCallable()

public final UnaryCallable<ListStreamsRequest,ListStreamsResponse> listStreamsCallable()

Use this method to list streams in a 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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   ListStreamsRequest request =
       ListStreamsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListStreamsResponse response = datastreamClient.listStreamsCallable().call(request);
     for (Stream element : response.getStreamsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListStreamsRequest,ListStreamsResponse>

listStreamsPagedCallable()

public final UnaryCallable<ListStreamsRequest,DatastreamClient.ListStreamsPagedResponse> listStreamsPagedCallable()

Use this method to list streams in a 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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   ListStreamsRequest request =
       ListStreamsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<Stream> future = datastreamClient.listStreamsPagedCallable().futureCall(request);
   // Do something.
   for (Stream element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListStreamsRequest,ListStreamsPagedResponse>

lookupStreamObject(LookupStreamObjectRequest request)

public final StreamObject lookupStreamObject(LookupStreamObjectRequest request)

Use this method to look up a stream object by its source object identifier.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   LookupStreamObjectRequest request =
       LookupStreamObjectRequest.newBuilder()
           .setParent(StreamName.of("[PROJECT]", "[LOCATION]", "[STREAM]").toString())
           .setSourceObjectIdentifier(SourceObjectIdentifier.newBuilder().build())
           .build();
   StreamObject response = datastreamClient.lookupStreamObject(request);
 }
 
Parameter
Name Description
request LookupStreamObjectRequest

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

Returns
Type Description
StreamObject

lookupStreamObjectCallable()

public final UnaryCallable<LookupStreamObjectRequest,StreamObject> lookupStreamObjectCallable()

Use this method to look up a stream object by its source object identifier.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   LookupStreamObjectRequest request =
       LookupStreamObjectRequest.newBuilder()
           .setParent(StreamName.of("[PROJECT]", "[LOCATION]", "[STREAM]").toString())
           .setSourceObjectIdentifier(SourceObjectIdentifier.newBuilder().build())
           .build();
   ApiFuture<StreamObject> future =
       datastreamClient.lookupStreamObjectCallable().futureCall(request);
   // Do something.
   StreamObject response = future.get();
 }
 
Returns
Type Description
UnaryCallable<LookupStreamObjectRequest,StreamObject>

runStreamAsync(RunStreamRequest request)

public final OperationFuture<Stream,OperationMetadata> runStreamAsync(RunStreamRequest request)

Use this method to start, resume or recover a stream with a non default CDC strategy.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   RunStreamRequest request =
       RunStreamRequest.newBuilder()
           .setName(StreamName.of("[PROJECT]", "[LOCATION]", "[STREAM]").toString())
           .setCdcStrategy(CdcStrategy.newBuilder().build())
           .setForce(true)
           .build();
   Stream response = datastreamClient.runStreamAsync(request).get();
 }
 
Parameter
Name Description
request RunStreamRequest

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

Returns
Type Description
OperationFuture<Stream,OperationMetadata>

runStreamCallable()

public final UnaryCallable<RunStreamRequest,Operation> runStreamCallable()

Use this method to start, resume or recover a stream with a non default CDC strategy.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   RunStreamRequest request =
       RunStreamRequest.newBuilder()
           .setName(StreamName.of("[PROJECT]", "[LOCATION]", "[STREAM]").toString())
           .setCdcStrategy(CdcStrategy.newBuilder().build())
           .setForce(true)
           .build();
   ApiFuture<Operation> future = datastreamClient.runStreamCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<RunStreamRequest,Operation>

runStreamOperationCallable()

public final OperationCallable<RunStreamRequest,Stream,OperationMetadata> runStreamOperationCallable()

Use this method to start, resume or recover a stream with a non default CDC strategy.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   RunStreamRequest request =
       RunStreamRequest.newBuilder()
           .setName(StreamName.of("[PROJECT]", "[LOCATION]", "[STREAM]").toString())
           .setCdcStrategy(CdcStrategy.newBuilder().build())
           .setForce(true)
           .build();
   OperationFuture<Stream, OperationMetadata> future =
       datastreamClient.runStreamOperationCallable().futureCall(request);
   // Do something.
   Stream response = future.get();
 }
 
Returns
Type Description
OperationCallable<RunStreamRequest,Stream,OperationMetadata>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

startBackfillJob(StartBackfillJobRequest request)

public final StartBackfillJobResponse startBackfillJob(StartBackfillJobRequest request)

Use this method to start a backfill job for the specified stream object.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   StartBackfillJobRequest request =
       StartBackfillJobRequest.newBuilder()
           .setObject(
               StreamObjectName.of("[PROJECT]", "[LOCATION]", "[STREAM]", "[OBJECT]").toString())
           .build();
   StartBackfillJobResponse response = datastreamClient.startBackfillJob(request);
 }
 
Parameter
Name Description
request StartBackfillJobRequest

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

Returns
Type Description
StartBackfillJobResponse

startBackfillJob(StreamObjectName object)

public final StartBackfillJobResponse startBackfillJob(StreamObjectName object)

Use this method to start a backfill job for the specified stream object.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   StreamObjectName object =
       StreamObjectName.of("[PROJECT]", "[LOCATION]", "[STREAM]", "[OBJECT]");
   StartBackfillJobResponse response = datastreamClient.startBackfillJob(object);
 }
 
Parameter
Name Description
object StreamObjectName

Required. The name of the stream object resource to start a backfill job for.

Returns
Type Description
StartBackfillJobResponse

startBackfillJob(String object)

public final StartBackfillJobResponse startBackfillJob(String object)

Use this method to start a backfill job for the specified stream object.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String object =
       StreamObjectName.of("[PROJECT]", "[LOCATION]", "[STREAM]", "[OBJECT]").toString();
   StartBackfillJobResponse response = datastreamClient.startBackfillJob(object);
 }
 
Parameter
Name Description
object String

Required. The name of the stream object resource to start a backfill job for.

Returns
Type Description
StartBackfillJobResponse

startBackfillJobCallable()

public final UnaryCallable<StartBackfillJobRequest,StartBackfillJobResponse> startBackfillJobCallable()

Use this method to start a backfill job for the specified stream object.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   StartBackfillJobRequest request =
       StartBackfillJobRequest.newBuilder()
           .setObject(
               StreamObjectName.of("[PROJECT]", "[LOCATION]", "[STREAM]", "[OBJECT]").toString())
           .build();
   ApiFuture<StartBackfillJobResponse> future =
       datastreamClient.startBackfillJobCallable().futureCall(request);
   // Do something.
   StartBackfillJobResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<StartBackfillJobRequest,StartBackfillJobResponse>

stopBackfillJob(StopBackfillJobRequest request)

public final StopBackfillJobResponse stopBackfillJob(StopBackfillJobRequest request)

Use this method to stop a backfill job for the specified stream object.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   StopBackfillJobRequest request =
       StopBackfillJobRequest.newBuilder()
           .setObject(
               StreamObjectName.of("[PROJECT]", "[LOCATION]", "[STREAM]", "[OBJECT]").toString())
           .build();
   StopBackfillJobResponse response = datastreamClient.stopBackfillJob(request);
 }
 
Parameter
Name Description
request StopBackfillJobRequest

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

Returns
Type Description
StopBackfillJobResponse

stopBackfillJob(StreamObjectName object)

public final StopBackfillJobResponse stopBackfillJob(StreamObjectName object)

Use this method to stop a backfill job for the specified stream object.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   StreamObjectName object =
       StreamObjectName.of("[PROJECT]", "[LOCATION]", "[STREAM]", "[OBJECT]");
   StopBackfillJobResponse response = datastreamClient.stopBackfillJob(object);
 }
 
Parameter
Name Description
object StreamObjectName

Required. The name of the stream object resource to stop the backfill job for.

Returns
Type Description
StopBackfillJobResponse

stopBackfillJob(String object)

public final StopBackfillJobResponse stopBackfillJob(String object)

Use this method to stop a backfill job for the specified stream object.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String object =
       StreamObjectName.of("[PROJECT]", "[LOCATION]", "[STREAM]", "[OBJECT]").toString();
   StopBackfillJobResponse response = datastreamClient.stopBackfillJob(object);
 }
 
Parameter
Name Description
object String

Required. The name of the stream object resource to stop the backfill job for.

Returns
Type Description
StopBackfillJobResponse

stopBackfillJobCallable()

public final UnaryCallable<StopBackfillJobRequest,StopBackfillJobResponse> stopBackfillJobCallable()

Use this method to stop a backfill job for the specified stream object.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   StopBackfillJobRequest request =
       StopBackfillJobRequest.newBuilder()
           .setObject(
               StreamObjectName.of("[PROJECT]", "[LOCATION]", "[STREAM]", "[OBJECT]").toString())
           .build();
   ApiFuture<StopBackfillJobResponse> future =
       datastreamClient.stopBackfillJobCallable().futureCall(request);
   // Do something.
   StopBackfillJobResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<StopBackfillJobRequest,StopBackfillJobResponse>

updateConnectionProfileAsync(ConnectionProfile connectionProfile, FieldMask updateMask)

public final OperationFuture<ConnectionProfile,OperationMetadata> updateConnectionProfileAsync(ConnectionProfile connectionProfile, FieldMask updateMask)

Use this method to update the parameters of a connection profile.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   ConnectionProfile connectionProfile = ConnectionProfile.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   ConnectionProfile response =
       datastreamClient.updateConnectionProfileAsync(connectionProfile, updateMask).get();
 }
 
Parameters
Name Description
connectionProfile ConnectionProfile

Required. The connection profile to update.

updateMask FieldMask

Optional. Field mask is used to specify the fields to be overwritten in the ConnectionProfile 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 will be overwritten.

Returns
Type Description
OperationFuture<ConnectionProfile,OperationMetadata>

updateConnectionProfileAsync(UpdateConnectionProfileRequest request)

public final OperationFuture<ConnectionProfile,OperationMetadata> updateConnectionProfileAsync(UpdateConnectionProfileRequest request)

Use this method to update the parameters of a connection profile.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   UpdateConnectionProfileRequest request =
       UpdateConnectionProfileRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setConnectionProfile(ConnectionProfile.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .setForce(true)
           .build();
   ConnectionProfile response = datastreamClient.updateConnectionProfileAsync(request).get();
 }
 
Parameter
Name Description
request UpdateConnectionProfileRequest

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

Returns
Type Description
OperationFuture<ConnectionProfile,OperationMetadata>

updateConnectionProfileCallable()

public final UnaryCallable<UpdateConnectionProfileRequest,Operation> updateConnectionProfileCallable()

Use this method to update the parameters of a connection profile.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   UpdateConnectionProfileRequest request =
       UpdateConnectionProfileRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setConnectionProfile(ConnectionProfile.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .setForce(true)
           .build();
   ApiFuture<Operation> future =
       datastreamClient.updateConnectionProfileCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateConnectionProfileRequest,Operation>

updateConnectionProfileOperationCallable()

public final OperationCallable<UpdateConnectionProfileRequest,ConnectionProfile,OperationMetadata> updateConnectionProfileOperationCallable()

Use this method to update the parameters of a connection profile.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   UpdateConnectionProfileRequest request =
       UpdateConnectionProfileRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setConnectionProfile(ConnectionProfile.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .setForce(true)
           .build();
   OperationFuture<ConnectionProfile, OperationMetadata> future =
       datastreamClient.updateConnectionProfileOperationCallable().futureCall(request);
   // Do something.
   ConnectionProfile response = future.get();
 }
 
Returns
Type Description
OperationCallable<UpdateConnectionProfileRequest,ConnectionProfile,OperationMetadata>

updateStreamAsync(Stream stream, FieldMask updateMask)

public final OperationFuture<Stream,OperationMetadata> updateStreamAsync(Stream stream, FieldMask updateMask)

Use this method to update the configuration of a stream.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   Stream stream = Stream.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   Stream response = datastreamClient.updateStreamAsync(stream, updateMask).get();
 }
 
Parameters
Name Description
stream Stream

Required. The stream resource to update.

updateMask FieldMask

Optional. Field mask is used to specify the fields to be overwritten in the stream 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 will be overwritten.

Returns
Type Description
OperationFuture<Stream,OperationMetadata>

updateStreamAsync(UpdateStreamRequest request)

public final OperationFuture<Stream,OperationMetadata> updateStreamAsync(UpdateStreamRequest request)

Use this method to update the configuration of a stream.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   UpdateStreamRequest request =
       UpdateStreamRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setStream(Stream.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .setForce(true)
           .build();
   Stream response = datastreamClient.updateStreamAsync(request).get();
 }
 
Parameter
Name Description
request UpdateStreamRequest

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

Returns
Type Description
OperationFuture<Stream,OperationMetadata>

updateStreamCallable()

public final UnaryCallable<UpdateStreamRequest,Operation> updateStreamCallable()

Use this method to update the configuration of a stream.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   UpdateStreamRequest request =
       UpdateStreamRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setStream(Stream.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .setForce(true)
           .build();
   ApiFuture<Operation> future = datastreamClient.updateStreamCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateStreamRequest,Operation>

updateStreamOperationCallable()

public final OperationCallable<UpdateStreamRequest,Stream,OperationMetadata> updateStreamOperationCallable()

Use this method to update the configuration of a stream.

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 (DatastreamClient datastreamClient = DatastreamClient.create()) {
   UpdateStreamRequest request =
       UpdateStreamRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setStream(Stream.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .setForce(true)
           .build();
   OperationFuture<Stream, OperationMetadata> future =
       datastreamClient.updateStreamOperationCallable().futureCall(request);
   // Do something.
   Stream response = future.get();
 }
 
Returns
Type Description
OperationCallable<UpdateStreamRequest,Stream,OperationMetadata>