Class DatastreamClient (0.4.2)

public class DatastreamClient implements BackgroundResource

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:


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

The surface of this class includes several types of Java methods for each of the API's methods:

  1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
  2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
  3. A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.

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:


 DatastreamSettings datastreamSettings =
     DatastreamSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 DatastreamClient datastreamClient = DatastreamClient.create(datastreamSettings);
 

To customize the endpoint:


 DatastreamSettings datastreamSettings =
     DatastreamSettings.newBuilder().setEndpoint(myEndpoint).build();
 DatastreamClient datastreamClient = DatastreamClient.create(datastreamSettings);
 

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

Inheritance

java.lang.Object > DatastreamClient

Implements

BackgroundResource

Static Methods

create()

public static final DatastreamClient create()

Constructs an instance of DatastreamClient with default settings.

Returns
TypeDescription
DatastreamClient
Exceptions
TypeDescription
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
NameDescription
settingsDatastreamSettings
Returns
TypeDescription
DatastreamClient
Exceptions
TypeDescription
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
NameDescription
stubDatastreamStub
Returns
TypeDescription
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
NameDescription
settingsDatastreamSettings

DatastreamClient(DatastreamStub stub)

protected DatastreamClient(DatastreamStub stub)
Parameter
NameDescription
stubDatastreamStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
NameDescription
durationlong
unitTimeUnit
Returns
TypeDescription
boolean
Exceptions
TypeDescription
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:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   CreateConnectionProfileRequest request =
       CreateConnectionProfileRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setConnectionProfileId("connectionProfileId597575526")
           .setConnectionProfile(ConnectionProfile.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ConnectionProfile response = datastreamClient.createConnectionProfileAsync(request).get();
 }
 
Parameter
NameDescription
requestCreateConnectionProfileRequest

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

Returns
TypeDescription
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:


 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
NameDescription
parentLocationName

Required. The parent that owns the collection of ConnectionProfiles.

connectionProfileConnectionProfile

Required. The connection profile resource to create.

connectionProfileIdString

Required. The connection profile identifier.

Returns
TypeDescription
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:


 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
NameDescription
parentString

Required. The parent that owns the collection of ConnectionProfiles.

connectionProfileConnectionProfile

Required. The connection profile resource to create.

connectionProfileIdString

Required. The connection profile identifier.

Returns
TypeDescription
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:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   CreateConnectionProfileRequest request =
       CreateConnectionProfileRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setConnectionProfileId("connectionProfileId597575526")
           .setConnectionProfile(ConnectionProfile.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       datastreamClient.createConnectionProfileCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
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:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   CreateConnectionProfileRequest request =
       CreateConnectionProfileRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setConnectionProfileId("connectionProfileId597575526")
           .setConnectionProfile(ConnectionProfile.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture
Returns
TypeDescription
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:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   CreatePrivateConnectionRequest request =
       CreatePrivateConnectionRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPrivateConnectionId("privateConnectionId-1926654532")
           .setPrivateConnection(PrivateConnection.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   PrivateConnection response = datastreamClient.createPrivateConnectionAsync(request).get();
 }
 
Parameter
NameDescription
requestCreatePrivateConnectionRequest

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

Returns
TypeDescription
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:


 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
NameDescription
parentLocationName

Required. The parent that owns the collection of PrivateConnections.

privateConnectionPrivateConnection

Required. The Private Connectivity resource to create.

privateConnectionIdString

Required. The private connectivity identifier.

Returns
TypeDescription
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:


 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
NameDescription
parentString

Required. The parent that owns the collection of PrivateConnections.

privateConnectionPrivateConnection

Required. The Private Connectivity resource to create.

privateConnectionIdString

Required. The private connectivity identifier.

Returns
TypeDescription
OperationFuture<PrivateConnection,OperationMetadata>

createPrivateConnectionCallable()

public final UnaryCallable<CreatePrivateConnectionRequest,Operation> createPrivateConnectionCallable()

Use this method to create a private connectivity configuration.

Sample code:


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

createPrivateConnectionOperationCallable()

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

Use this method to create a private connectivity configuration.

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   CreatePrivateConnectionRequest request =
       CreatePrivateConnectionRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPrivateConnectionId("privateConnectionId-1926654532")
           .setPrivateConnection(PrivateConnection.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture
Returns
TypeDescription
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 in a project and location.

Sample code:


 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
NameDescription
requestCreateRouteRequest

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

Returns
TypeDescription
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 in a project and location.

Sample code:


 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
NameDescription
parentPrivateConnectionName

Required. The parent that owns the collection of Routes.

routeRoute

Required. The Route resource to create.

routeIdString

Required. The Route identifier.

Returns
TypeDescription
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 in a project and location.

Sample code:


 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
NameDescription
parentString

Required. The parent that owns the collection of Routes.

routeRoute

Required. The Route resource to create.

routeIdString

Required. The Route identifier.

Returns
TypeDescription
OperationFuture<Route,OperationMetadata>

createRouteCallable()

public final UnaryCallable<CreateRouteRequest,Operation> createRouteCallable()

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

Sample code:


 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
TypeDescription
UnaryCallable<CreateRouteRequest,Operation>

createRouteOperationCallable()

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

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

Sample code:


 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
Returns
TypeDescription
OperationCallable<CreateRouteRequest,Route,OperationMetadata>

createStreamAsync(CreateStreamRequest request)

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

Use this method to create a stream.

Sample code:


 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
NameDescription
requestCreateStreamRequest

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

Returns
TypeDescription
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:


 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
NameDescription
parentLocationName

Required. The parent that owns the collection of streams.

streamStream

Required. The stream resource to create.

streamIdString

Required. The stream identifier.

Returns
TypeDescription
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:


 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
NameDescription
parentString

Required. The parent that owns the collection of streams.

streamStream

Required. The stream resource to create.

streamIdString

Required. The stream identifier.

Returns
TypeDescription
OperationFuture<Stream,OperationMetadata>

createStreamCallable()

public final UnaryCallable<CreateStreamRequest,Operation> createStreamCallable()

Use this method to create a stream.

Sample code:


 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
TypeDescription
UnaryCallable<CreateStreamRequest,Operation>

createStreamOperationCallable()

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

Use this method to create a stream.

Sample code:


 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
Returns
TypeDescription
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:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   ConnectionProfileName name =
       ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]");
   datastreamClient.deleteConnectionProfileAsync(name).get();
 }
 
Parameter
NameDescription
nameConnectionProfileName

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

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteConnectionProfileAsync(DeleteConnectionProfileRequest request)

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

Use this method to delete a connection profile..

Sample code:


 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
NameDescription
requestDeleteConnectionProfileRequest

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

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteConnectionProfileAsync(String name)

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

Use this method to delete a connection profile..

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String name =
       ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]").toString();
   datastreamClient.deleteConnectionProfileAsync(name).get();
 }
 
Parameter
NameDescription
nameString

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

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteConnectionProfileCallable()

public final UnaryCallable<DeleteConnectionProfileRequest,Operation> deleteConnectionProfileCallable()

Use this method to delete a connection profile..

Sample code:


 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
TypeDescription
UnaryCallable<DeleteConnectionProfileRequest,Operation>

deleteConnectionProfileOperationCallable()

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

Use this method to delete a connection profile..

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   DeleteConnectionProfileRequest request =
       DeleteConnectionProfileRequest.newBuilder()
           .setName(
               ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture
Returns
TypeDescription
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:


 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
NameDescription
requestDeletePrivateConnectionRequest

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

Returns
TypeDescription
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:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   PrivateConnectionName name =
       PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]");
   datastreamClient.deletePrivateConnectionAsync(name).get();
 }
 
Parameter
NameDescription
namePrivateConnectionName

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

Returns
TypeDescription
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:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String name =
       PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]").toString();
   datastreamClient.deletePrivateConnectionAsync(name).get();
 }
 
Parameter
NameDescription
nameString

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

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deletePrivateConnectionCallable()

public final UnaryCallable<DeletePrivateConnectionRequest,Operation> deletePrivateConnectionCallable()

Use this method to delete a private connectivity configuration.

Sample code:


 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
TypeDescription
UnaryCallable<DeletePrivateConnectionRequest,Operation>

deletePrivateConnectionOperationCallable()

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

Use this method to delete a private connectivity configuration.

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   DeletePrivateConnectionRequest request =
       DeletePrivateConnectionRequest.newBuilder()
           .setName(
               PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]")
                   .toString())
           .setRequestId("requestId693933066")
           .setForce(true)
           .build();
   OperationFuture
Returns
TypeDescription
OperationCallable<DeletePrivateConnectionRequest,Empty,OperationMetadata>

deleteRouteAsync(DeleteRouteRequest request)

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

Use this method to delete a route.

Sample code:


 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
NameDescription
requestDeleteRouteRequest

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

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteRouteAsync(RouteName name)

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

Use this method to delete a route.

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   RouteName name = RouteName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]", "[ROUTE]");
   datastreamClient.deleteRouteAsync(name).get();
 }
 
Parameter
NameDescription
nameRouteName

Required. The name of the Route resource to delete.

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteRouteAsync(String name)

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

Use this method to delete a route.

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String name =
       RouteName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]", "[ROUTE]").toString();
   datastreamClient.deleteRouteAsync(name).get();
 }
 
Parameter
NameDescription
nameString

Required. The name of the Route resource to delete.

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteRouteCallable()

public final UnaryCallable<DeleteRouteRequest,Operation> deleteRouteCallable()

Use this method to delete a route.

Sample code:


 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
TypeDescription
UnaryCallable<DeleteRouteRequest,Operation>

deleteRouteOperationCallable()

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

Use this method to delete a route.

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   DeleteRouteRequest request =
       DeleteRouteRequest.newBuilder()
           .setName(
               RouteName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]", "[ROUTE]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture
Returns
TypeDescription
OperationCallable<DeleteRouteRequest,Empty,OperationMetadata>

deleteStreamAsync(DeleteStreamRequest request)

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

Use this method to delete a stream.

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   DeleteStreamRequest request =
       DeleteStreamRequest.newBuilder()
           .setName(StreamName.of("[PROJECT]", "[LOCATION]", "[STREAM]").toString())
           .setRequestId("requestId693933066")
           .build();
   datastreamClient.deleteStreamAsync(request).get();
 }
 
Parameter
NameDescription
requestDeleteStreamRequest

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

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteStreamAsync(StreamName name)

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

Use this method to delete a stream.

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   StreamName name = StreamName.of("[PROJECT]", "[LOCATION]", "[STREAM]");
   datastreamClient.deleteStreamAsync(name).get();
 }
 
Parameter
NameDescription
nameStreamName

Required. The name of the stream resource to delete.

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteStreamAsync(String name)

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

Use this method to delete a stream.

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String name = StreamName.of("[PROJECT]", "[LOCATION]", "[STREAM]").toString();
   datastreamClient.deleteStreamAsync(name).get();
 }
 
Parameter
NameDescription
nameString

Required. The name of the stream resource to delete.

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteStreamCallable()

public final UnaryCallable<DeleteStreamRequest,Operation> deleteStreamCallable()

Use this method to delete a stream.

Sample code:


 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
TypeDescription
UnaryCallable<DeleteStreamRequest,Operation>

deleteStreamOperationCallable()

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

Use this method to delete a stream.

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   DeleteStreamRequest request =
       DeleteStreamRequest.newBuilder()
           .setName(StreamName.of("[PROJECT]", "[LOCATION]", "[STREAM]").toString())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture
Returns
TypeDescription
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 under a parent data object that's optionally supplied in the request.

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   DiscoverConnectionProfileRequest request =
       DiscoverConnectionProfileRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .build();
   DiscoverConnectionProfileResponse response =
       datastreamClient.discoverConnectionProfile(request);
 }
 
Parameter
NameDescription
requestDiscoverConnectionProfileRequest

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

Returns
TypeDescription
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 under a parent data object that's optionally supplied in the request.

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   DiscoverConnectionProfileRequest request =
       DiscoverConnectionProfileRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .build();
   ApiFuture
Returns
TypeDescription
UnaryCallable<DiscoverConnectionProfileRequest,DiscoverConnectionProfileResponse>

fetchErrorsAsync(FetchErrorsRequest request)

public final OperationFuture<FetchErrorsResponse,OperationMetadata> fetchErrorsAsync(FetchErrorsRequest request)

Use this method to fetch any errors associated with a stream.

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   FetchErrorsRequest request =
       FetchErrorsRequest.newBuilder()
           .setStream(StreamName.of("[PROJECT]", "[LOCATION]", "[STREAM]").toString())
           .build();
   FetchErrorsResponse response = datastreamClient.fetchErrorsAsync(request).get();
 }
 
Parameter
NameDescription
requestFetchErrorsRequest

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

Returns
TypeDescription
OperationFuture<FetchErrorsResponse,OperationMetadata>

fetchErrorsCallable()

public final UnaryCallable<FetchErrorsRequest,Operation> fetchErrorsCallable()

Use this method to fetch any errors associated with a stream.

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   FetchErrorsRequest request =
       FetchErrorsRequest.newBuilder()
           .setStream(StreamName.of("[PROJECT]", "[LOCATION]", "[STREAM]").toString())
           .build();
   ApiFuture<Operation> future = datastreamClient.fetchErrorsCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<FetchErrorsRequest,Operation>

fetchErrorsOperationCallable()

public final OperationCallable<FetchErrorsRequest,FetchErrorsResponse,OperationMetadata> fetchErrorsOperationCallable()

Use this method to fetch any errors associated with a stream.

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   FetchErrorsRequest request =
       FetchErrorsRequest.newBuilder()
           .setStream(StreamName.of("[PROJECT]", "[LOCATION]", "[STREAM]").toString())
           .build();
   OperationFuture
Returns
TypeDescription
OperationCallable<FetchErrorsRequest,FetchErrorsResponse,OperationMetadata>

fetchStaticIps(FetchStaticIpsRequest request)

public final DatastreamClient.FetchStaticIpsPagedResponse fetchStaticIps(FetchStaticIpsRequest request)

The FetchStaticIps API call exposes the static ips used by Datastream. Typically, a request returns children data objects under a parent data object that's optionally supplied in the request.

Sample code:


 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
NameDescription
requestFetchStaticIpsRequest

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

Returns
TypeDescription
DatastreamClient.FetchStaticIpsPagedResponse

fetchStaticIps(LocationName name)

public final DatastreamClient.FetchStaticIpsPagedResponse fetchStaticIps(LocationName name)

The FetchStaticIps API call exposes the static ips used by Datastream. Typically, a request returns children data objects under a parent data object that's optionally supplied in the request.

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   LocationName name = LocationName.of("[PROJECT]", "[LOCATION]");
   for (String element : datastreamClient.fetchStaticIps(name).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
nameLocationName

Required. The name resource of the Response type. Must be in the format projects/*/locations/*.

Returns
TypeDescription
DatastreamClient.FetchStaticIpsPagedResponse

fetchStaticIps(String name)

public final DatastreamClient.FetchStaticIpsPagedResponse fetchStaticIps(String name)

The FetchStaticIps API call exposes the static ips used by Datastream. Typically, a request returns children data objects under a parent data object that's optionally supplied in the request.

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String name = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (String element : datastreamClient.fetchStaticIps(name).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
nameString

Required. The name resource of the Response type. Must be in the format projects/*/locations/*.

Returns
TypeDescription
DatastreamClient.FetchStaticIpsPagedResponse

fetchStaticIpsCallable()

public final UnaryCallable<FetchStaticIpsRequest,FetchStaticIpsResponse> fetchStaticIpsCallable()

The FetchStaticIps API call exposes the static ips used by Datastream. Typically, a request returns children data objects under a parent data object that's optionally supplied in the request.

Sample code:


 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.getResponsesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<FetchStaticIpsRequest,FetchStaticIpsResponse>

fetchStaticIpsPagedCallable()

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

The FetchStaticIps API call exposes the static ips used by Datastream. Typically, a request returns children data objects under a parent data object that's optionally supplied in the request.

Sample code:


 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
TypeDescription
UnaryCallable<FetchStaticIpsRequest,FetchStaticIpsPagedResponse>

getConnectionProfile(ConnectionProfileName name)

public final ConnectionProfile getConnectionProfile(ConnectionProfileName name)

Use this method to get details about a connection profile.

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   ConnectionProfileName name =
       ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]");
   ConnectionProfile response = datastreamClient.getConnectionProfile(name);
 }
 
Parameter
NameDescription
nameConnectionProfileName

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

Returns
TypeDescription
ConnectionProfile

getConnectionProfile(GetConnectionProfileRequest request)

public final ConnectionProfile getConnectionProfile(GetConnectionProfileRequest request)

Use this method to get details about a connection profile.

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   GetConnectionProfileRequest request =
       GetConnectionProfileRequest.newBuilder()
           .setName(
               ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
                   .toString())
           .build();
   ConnectionProfile response = datastreamClient.getConnectionProfile(request);
 }
 
Parameter
NameDescription
requestGetConnectionProfileRequest

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

Returns
TypeDescription
ConnectionProfile

getConnectionProfile(String name)

public final ConnectionProfile getConnectionProfile(String name)

Use this method to get details about a connection profile.

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String name =
       ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]").toString();
   ConnectionProfile response = datastreamClient.getConnectionProfile(name);
 }
 
Parameter
NameDescription
nameString

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

Returns
TypeDescription
ConnectionProfile

getConnectionProfileCallable()

public final UnaryCallable<GetConnectionProfileRequest,ConnectionProfile> getConnectionProfileCallable()

Use this method to get details about a connection profile.

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   GetConnectionProfileRequest request =
       GetConnectionProfileRequest.newBuilder()
           .setName(
               ConnectionProfileName.of("[PROJECT]", "[LOCATION]", "[CONNECTION_PROFILE]")
                   .toString())
           .build();
   ApiFuture
Returns
TypeDescription
UnaryCallable<GetConnectionProfileRequest,ConnectionProfile>

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
TypeDescription
OperationsClient

getPrivateConnection(GetPrivateConnectionRequest request)

public final PrivateConnection getPrivateConnection(GetPrivateConnectionRequest request)

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

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   GetPrivateConnectionRequest request =
       GetPrivateConnectionRequest.newBuilder()
           .setName(
               PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]")
                   .toString())
           .build();
   PrivateConnection response = datastreamClient.getPrivateConnection(request);
 }
 
Parameter
NameDescription
requestGetPrivateConnectionRequest

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

Returns
TypeDescription
PrivateConnection

getPrivateConnection(PrivateConnectionName name)

public final PrivateConnection getPrivateConnection(PrivateConnectionName name)

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

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   PrivateConnectionName name =
       PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]");
   PrivateConnection response = datastreamClient.getPrivateConnection(name);
 }
 
Parameter
NameDescription
namePrivateConnectionName

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

Returns
TypeDescription
PrivateConnection

getPrivateConnection(String name)

public final PrivateConnection getPrivateConnection(String name)

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

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String name =
       PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]").toString();
   PrivateConnection response = datastreamClient.getPrivateConnection(name);
 }
 
Parameter
NameDescription
nameString

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

Returns
TypeDescription
PrivateConnection

getPrivateConnectionCallable()

public final UnaryCallable<GetPrivateConnectionRequest,PrivateConnection> getPrivateConnectionCallable()

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

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   GetPrivateConnectionRequest request =
       GetPrivateConnectionRequest.newBuilder()
           .setName(
               PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]")
                   .toString())
           .build();
   ApiFuture
Returns
TypeDescription
UnaryCallable<GetPrivateConnectionRequest,PrivateConnection>

getRoute(GetRouteRequest request)

public final Route getRoute(GetRouteRequest request)

Use this method to get details about a route.

Sample code:


 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
NameDescription
requestGetRouteRequest

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

Returns
TypeDescription
Route

getRoute(RouteName name)

public final Route getRoute(RouteName name)

Use this method to get details about a route.

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   RouteName name = RouteName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]", "[ROUTE]");
   Route response = datastreamClient.getRoute(name);
 }
 
Parameter
NameDescription
nameRouteName

Required. The name of the Route resource to get.

Returns
TypeDescription
Route

getRoute(String name)

public final Route getRoute(String name)

Use this method to get details about a route.

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String name =
       RouteName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]", "[ROUTE]").toString();
   Route response = datastreamClient.getRoute(name);
 }
 
Parameter
NameDescription
nameString

Required. The name of the Route resource to get.

Returns
TypeDescription
Route

getRouteCallable()

public final UnaryCallable<GetRouteRequest,Route> getRouteCallable()

Use this method to get details about a route.

Sample code:


 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
TypeDescription
UnaryCallable<GetRouteRequest,Route>

getSettings()

public final DatastreamSettings getSettings()
Returns
TypeDescription
DatastreamSettings

getStream(GetStreamRequest request)

public final Stream getStream(GetStreamRequest request)

Use this method to get details about a stream.

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   GetStreamRequest request =
       GetStreamRequest.newBuilder()
           .setName(StreamName.of("[PROJECT]", "[LOCATION]", "[STREAM]").toString())
           .build();
   Stream response = datastreamClient.getStream(request);
 }
 
Parameter
NameDescription
requestGetStreamRequest

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

Returns
TypeDescription
Stream

getStream(StreamName name)

public final Stream getStream(StreamName name)

Use this method to get details about a stream.

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   StreamName name = StreamName.of("[PROJECT]", "[LOCATION]", "[STREAM]");
   Stream response = datastreamClient.getStream(name);
 }
 
Parameter
NameDescription
nameStreamName

Required. The name of the stream resource to get.

Returns
TypeDescription
Stream

getStream(String name)

public final Stream getStream(String name)

Use this method to get details about a stream.

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String name = StreamName.of("[PROJECT]", "[LOCATION]", "[STREAM]").toString();
   Stream response = datastreamClient.getStream(name);
 }
 
Parameter
NameDescription
nameString

Required. The name of the stream resource to get.

Returns
TypeDescription
Stream

getStreamCallable()

public final UnaryCallable<GetStreamRequest,Stream> getStreamCallable()

Use this method to get details about a stream.

Sample code:


 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
TypeDescription
UnaryCallable<GetStreamRequest,Stream>

getStub()

public DatastreamStub getStub()
Returns
TypeDescription
DatastreamStub

isShutdown()

public boolean isShutdown()
Returns
TypeDescription
boolean

isTerminated()

public boolean isTerminated()
Returns
TypeDescription
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:


 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
NameDescription
requestListConnectionProfilesRequest

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

Returns
TypeDescription
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:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (ConnectionProfile element :
       datastreamClient.listConnectionProfiles(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentLocationName

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

Returns
TypeDescription
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:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (ConnectionProfile element :
       datastreamClient.listConnectionProfiles(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

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

Returns
TypeDescription
DatastreamClient.ListConnectionProfilesPagedResponse

listConnectionProfilesCallable()

public final UnaryCallable<ListConnectionProfilesRequest,ListConnectionProfilesResponse> listConnectionProfilesCallable()

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

Sample code:


 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.getResponsesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
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:


 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
Returns
TypeDescription
UnaryCallable<ListConnectionProfilesRequest,ListConnectionProfilesPagedResponse>

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:


 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
NameDescription
requestListPrivateConnectionsRequest

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

Returns
TypeDescription
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:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (PrivateConnection element :
       datastreamClient.listPrivateConnections(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentLocationName

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

Returns
TypeDescription
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:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (PrivateConnection element :
       datastreamClient.listPrivateConnections(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

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

Returns
TypeDescription
DatastreamClient.ListPrivateConnectionsPagedResponse

listPrivateConnectionsCallable()

public final UnaryCallable<ListPrivateConnectionsRequest,ListPrivateConnectionsResponse> listPrivateConnectionsCallable()

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

Sample code:


 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.getResponsesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
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:


 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
Returns
TypeDescription
UnaryCallable<ListPrivateConnectionsRequest,ListPrivateConnectionsPagedResponse>

listRoutes(ListRoutesRequest request)

public final DatastreamClient.ListRoutesPagedResponse listRoutes(ListRoutesRequest request)

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

Sample code:


 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
NameDescription
requestListRoutesRequest

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

Returns
TypeDescription
DatastreamClient.ListRoutesPagedResponse

listRoutes(PrivateConnectionName parent)

public final DatastreamClient.ListRoutesPagedResponse listRoutes(PrivateConnectionName parent)

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

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   PrivateConnectionName parent =
       PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]");
   for (Route element : datastreamClient.listRoutes(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentPrivateConnectionName

Required. The parent that owns the collection of Routess.

Returns
TypeDescription
DatastreamClient.ListRoutesPagedResponse

listRoutes(String parent)

public final DatastreamClient.ListRoutesPagedResponse listRoutes(String parent)

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

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String parent =
       PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]").toString();
   for (Route element : datastreamClient.listRoutes(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. The parent that owns the collection of Routess.

Returns
TypeDescription
DatastreamClient.ListRoutesPagedResponse

listRoutesCallable()

public final UnaryCallable<ListRoutesRequest,ListRoutesResponse> listRoutesCallable()

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

Sample code:


 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.getResponsesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListRoutesRequest,ListRoutesResponse>

listRoutesPagedCallable()

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

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

Sample code:


 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
TypeDescription
UnaryCallable<ListRoutesRequest,ListRoutesPagedResponse>

listStreams(ListStreamsRequest request)

public final DatastreamClient.ListStreamsPagedResponse listStreams(ListStreamsRequest request)

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

Sample code:


 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
NameDescription
requestListStreamsRequest

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

Returns
TypeDescription
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:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (Stream element : datastreamClient.listStreams(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentLocationName

Required. The parent that owns the collection of streams.

Returns
TypeDescription
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:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (Stream element : datastreamClient.listStreams(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. The parent that owns the collection of streams.

Returns
TypeDescription
DatastreamClient.ListStreamsPagedResponse

listStreamsCallable()

public final UnaryCallable<ListStreamsRequest,ListStreamsResponse> listStreamsCallable()

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

Sample code:


 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.getResponsesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListStreamsRequest,ListStreamsResponse>

listStreamsPagedCallable()

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

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

Sample code:


 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
TypeDescription
UnaryCallable<ListStreamsRequest,ListStreamsPagedResponse>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

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:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   ConnectionProfile connectionProfile = ConnectionProfile.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   ConnectionProfile response =
       datastreamClient.updateConnectionProfileAsync(connectionProfile, updateMask).get();
 }
 
Parameters
NameDescription
connectionProfileConnectionProfile

Required. The ConnectionProfile to update.

updateMaskFieldMask

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
TypeDescription
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:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   UpdateConnectionProfileRequest request =
       UpdateConnectionProfileRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setConnectionProfile(ConnectionProfile.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ConnectionProfile response = datastreamClient.updateConnectionProfileAsync(request).get();
 }
 
Parameter
NameDescription
requestUpdateConnectionProfileRequest

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

Returns
TypeDescription
OperationFuture<ConnectionProfile,OperationMetadata>

updateConnectionProfileCallable()

public final UnaryCallable<UpdateConnectionProfileRequest,Operation> updateConnectionProfileCallable()

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

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   UpdateConnectionProfileRequest request =
       UpdateConnectionProfileRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setConnectionProfile(ConnectionProfile.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       datastreamClient.updateConnectionProfileCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<UpdateConnectionProfileRequest,Operation>

updateConnectionProfileOperationCallable()

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

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

Sample code:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   UpdateConnectionProfileRequest request =
       UpdateConnectionProfileRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setConnectionProfile(ConnectionProfile.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture
Returns
TypeDescription
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:


 try (DatastreamClient datastreamClient = DatastreamClient.create()) {
   Stream stream = Stream.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   Stream response = datastreamClient.updateStreamAsync(stream, updateMask).get();
 }
 
Parameters
NameDescription
streamStream

Required. The stream resource to update.

updateMaskFieldMask

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
TypeDescription
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:


 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
NameDescription
requestUpdateStreamRequest

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

Returns
TypeDescription
OperationFuture<Stream,OperationMetadata>

updateStreamCallable()

public final UnaryCallable<UpdateStreamRequest,Operation> updateStreamCallable()

Use this method to update the configuration of a stream.

Sample code:


 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
TypeDescription
UnaryCallable<UpdateStreamRequest,Operation>

updateStreamOperationCallable()

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

Use this method to update the configuration of a stream.

Sample code:


 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
Returns
TypeDescription
OperationCallable<UpdateStreamRequest,Stream,OperationMetadata>