@Generated(value="by gapic-generator-java") public class StreamsServiceClient extends Object implements com.google.api.gax.core.BackgroundResource
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
Cluster response = streamsServiceClient.getCluster(name);
}
Note: close() needs to be called on the StreamsServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
| Method | Description | Method Variants |
|---|---|---|
ListClusters |
Lists Clusters in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetCluster |
Gets details of a single Cluster. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateCluster |
Creates a new Cluster in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateCluster |
Updates the parameters of a single Cluster. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteCluster |
Deletes a single Cluster. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListStreams |
Lists Streams in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetStream |
Gets details of a single Stream. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateStream |
Creates a new Stream in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateStream |
Updates the parameters of a single Stream. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteStream |
Deletes a single Stream. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetStreamThumbnail |
Gets the thumbnail (image snapshot) of a single Stream. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GenerateStreamHlsToken |
Generate the JWT auth token required to get the stream HLS contents. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListEvents |
Lists Events in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetEvent |
Gets details of a single Event. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateEvent |
Creates a new Event in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateEvent |
Updates the parameters of a single Event. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteEvent |
Deletes a single Event. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListSeries |
Lists Series in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetSeries |
Gets details of a single Series. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateSeries |
Creates a new Series in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateSeries |
Updates the parameters of a single Event. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteSeries |
Deletes a single Series. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
MaterializeChannel |
Materialize a channel. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return 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 StreamsServiceSettings 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
StreamsServiceSettings streamsServiceSettings =
StreamsServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
StreamsServiceClient streamsServiceClient = StreamsServiceClient.create(streamsServiceSettings);
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
StreamsServiceSettings streamsServiceSettings =
StreamsServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
StreamsServiceClient streamsServiceClient = StreamsServiceClient.create(streamsServiceSettings);
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
StreamsServiceSettings streamsServiceSettings =
StreamsServiceSettings.newHttpJsonBuilder().build();
StreamsServiceClient streamsServiceClient = StreamsServiceClient.create(streamsServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
| Modifier and Type | Class and Description |
|---|---|
static class |
StreamsServiceClient.ListClustersFixedSizeCollection |
static class |
StreamsServiceClient.ListClustersPage |
static class |
StreamsServiceClient.ListClustersPagedResponse |
static class |
StreamsServiceClient.ListEventsFixedSizeCollection |
static class |
StreamsServiceClient.ListEventsPage |
static class |
StreamsServiceClient.ListEventsPagedResponse |
static class |
StreamsServiceClient.ListSeriesFixedSizeCollection |
static class |
StreamsServiceClient.ListSeriesPage |
static class |
StreamsServiceClient.ListSeriesPagedResponse |
static class |
StreamsServiceClient.ListStreamsFixedSizeCollection |
static class |
StreamsServiceClient.ListStreamsPage |
static class |
StreamsServiceClient.ListStreamsPagedResponse |
| Modifier | Constructor and Description |
|---|---|
protected |
StreamsServiceClient(StreamsServiceSettings settings)
Constructs an instance of StreamsServiceClient, using the given settings.
|
protected |
StreamsServiceClient(StreamsServiceStub stub) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long duration,
TimeUnit unit) |
void |
close() |
static StreamsServiceClient |
create()
Constructs an instance of StreamsServiceClient with default settings.
|
static StreamsServiceClient |
create(StreamsServiceSettings settings)
Constructs an instance of StreamsServiceClient, using the given settings.
|
static StreamsServiceClient |
create(StreamsServiceStub stub)
Constructs an instance of StreamsServiceClient, using the given stub for making calls.
|
com.google.api.gax.longrunning.OperationFuture<Cluster,OperationMetadata> |
createClusterAsync(CreateClusterRequest request)
Creates a new Cluster in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<Cluster,OperationMetadata> |
createClusterAsync(LocationName parent,
Cluster cluster,
String clusterId)
Creates a new Cluster in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<Cluster,OperationMetadata> |
createClusterAsync(String parent,
Cluster cluster,
String clusterId)
Creates a new Cluster in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<CreateClusterRequest,com.google.longrunning.Operation> |
createClusterCallable()
Creates a new Cluster in a given project and location.
|
com.google.api.gax.rpc.OperationCallable<CreateClusterRequest,Cluster,OperationMetadata> |
createClusterOperationCallable()
Creates a new Cluster in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<Event,OperationMetadata> |
createEventAsync(ClusterName parent,
Event event,
String eventId)
Creates a new Event in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<Event,OperationMetadata> |
createEventAsync(CreateEventRequest request)
Creates a new Event in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<Event,OperationMetadata> |
createEventAsync(String parent,
Event event,
String eventId)
Creates a new Event in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<CreateEventRequest,com.google.longrunning.Operation> |
createEventCallable()
Creates a new Event in a given project and location.
|
com.google.api.gax.rpc.OperationCallable<CreateEventRequest,Event,OperationMetadata> |
createEventOperationCallable()
Creates a new Event in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<Series,OperationMetadata> |
createSeriesAsync(ClusterName parent,
Series series,
String seriesId)
Creates a new Series in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<Series,OperationMetadata> |
createSeriesAsync(CreateSeriesRequest request)
Creates a new Series in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<Series,OperationMetadata> |
createSeriesAsync(String parent,
Series series,
String seriesId)
Creates a new Series in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<CreateSeriesRequest,com.google.longrunning.Operation> |
createSeriesCallable()
Creates a new Series in a given project and location.
|
com.google.api.gax.rpc.OperationCallable<CreateSeriesRequest,Series,OperationMetadata> |
createSeriesOperationCallable()
Creates a new Series in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<Stream,OperationMetadata> |
createStreamAsync(ClusterName parent,
Stream stream,
String streamId)
Creates a new Stream in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<Stream,OperationMetadata> |
createStreamAsync(CreateStreamRequest request)
Creates a new Stream in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<Stream,OperationMetadata> |
createStreamAsync(String parent,
Stream stream,
String streamId)
Creates a new Stream in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<CreateStreamRequest,com.google.longrunning.Operation> |
createStreamCallable()
Creates a new Stream in a given project and location.
|
com.google.api.gax.rpc.OperationCallable<CreateStreamRequest,Stream,OperationMetadata> |
createStreamOperationCallable()
Creates a new Stream in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteClusterAsync(ClusterName name)
Deletes a single Cluster.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteClusterAsync(DeleteClusterRequest request)
Deletes a single Cluster.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteClusterAsync(String name)
Deletes a single Cluster.
|
com.google.api.gax.rpc.UnaryCallable<DeleteClusterRequest,com.google.longrunning.Operation> |
deleteClusterCallable()
Deletes a single Cluster.
|
com.google.api.gax.rpc.OperationCallable<DeleteClusterRequest,com.google.protobuf.Empty,OperationMetadata> |
deleteClusterOperationCallable()
Deletes a single Cluster.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteEventAsync(DeleteEventRequest request)
Deletes a single Event.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteEventAsync(EventName name)
Deletes a single Event.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteEventAsync(String name)
Deletes a single Event.
|
com.google.api.gax.rpc.UnaryCallable<DeleteEventRequest,com.google.longrunning.Operation> |
deleteEventCallable()
Deletes a single Event.
|
com.google.api.gax.rpc.OperationCallable<DeleteEventRequest,com.google.protobuf.Empty,OperationMetadata> |
deleteEventOperationCallable()
Deletes a single Event.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteSeriesAsync(DeleteSeriesRequest request)
Deletes a single Series.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteSeriesAsync(SeriesName name)
Deletes a single Series.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteSeriesAsync(String name)
Deletes a single Series.
|
com.google.api.gax.rpc.UnaryCallable<DeleteSeriesRequest,com.google.longrunning.Operation> |
deleteSeriesCallable()
Deletes a single Series.
|
com.google.api.gax.rpc.OperationCallable<DeleteSeriesRequest,com.google.protobuf.Empty,OperationMetadata> |
deleteSeriesOperationCallable()
Deletes a single Series.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteStreamAsync(DeleteStreamRequest request)
Deletes a single Stream.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteStreamAsync(StreamName name)
Deletes a single Stream.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteStreamAsync(String name)
Deletes a single Stream.
|
com.google.api.gax.rpc.UnaryCallable<DeleteStreamRequest,com.google.longrunning.Operation> |
deleteStreamCallable()
Deletes a single Stream.
|
com.google.api.gax.rpc.OperationCallable<DeleteStreamRequest,com.google.protobuf.Empty,OperationMetadata> |
deleteStreamOperationCallable()
Deletes a single Stream.
|
GenerateStreamHlsTokenResponse |
generateStreamHlsToken(GenerateStreamHlsTokenRequest request)
Generate the JWT auth token required to get the stream HLS contents.
|
GenerateStreamHlsTokenResponse |
generateStreamHlsToken(String stream)
Generate the JWT auth token required to get the stream HLS contents.
|
com.google.api.gax.rpc.UnaryCallable<GenerateStreamHlsTokenRequest,GenerateStreamHlsTokenResponse> |
generateStreamHlsTokenCallable()
Generate the JWT auth token required to get the stream HLS contents.
|
Cluster |
getCluster(ClusterName name)
Gets details of a single Cluster.
|
Cluster |
getCluster(GetClusterRequest request)
Gets details of a single Cluster.
|
Cluster |
getCluster(String name)
Gets details of a single Cluster.
|
com.google.api.gax.rpc.UnaryCallable<GetClusterRequest,Cluster> |
getClusterCallable()
Gets details of a single Cluster.
|
Event |
getEvent(EventName name)
Gets details of a single Event.
|
Event |
getEvent(GetEventRequest request)
Gets details of a single Event.
|
Event |
getEvent(String name)
Gets details of a single Event.
|
com.google.api.gax.rpc.UnaryCallable<GetEventRequest,Event> |
getEventCallable()
Gets details of a single Event.
|
com.google.api.gax.httpjson.longrunning.OperationsClient |
getHttpJsonOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.
|
com.google.longrunning.OperationsClient |
getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.
|
Series |
getSeries(GetSeriesRequest request)
Gets details of a single Series.
|
Series |
getSeries(SeriesName name)
Gets details of a single Series.
|
Series |
getSeries(String name)
Gets details of a single Series.
|
com.google.api.gax.rpc.UnaryCallable<GetSeriesRequest,Series> |
getSeriesCallable()
Gets details of a single Series.
|
StreamsServiceSettings |
getSettings() |
Stream |
getStream(GetStreamRequest request)
Gets details of a single Stream.
|
Stream |
getStream(StreamName name)
Gets details of a single Stream.
|
Stream |
getStream(String name)
Gets details of a single Stream.
|
com.google.api.gax.rpc.UnaryCallable<GetStreamRequest,Stream> |
getStreamCallable()
Gets details of a single Stream.
|
com.google.api.gax.longrunning.OperationFuture<GetStreamThumbnailResponse,OperationMetadata> |
getStreamThumbnailAsync(GetStreamThumbnailRequest request)
Gets the thumbnail (image snapshot) of a single Stream.
|
com.google.api.gax.longrunning.OperationFuture<GetStreamThumbnailResponse,OperationMetadata> |
getStreamThumbnailAsync(String stream,
String gcsObjectName)
Gets the thumbnail (image snapshot) of a single Stream.
|
com.google.api.gax.rpc.UnaryCallable<GetStreamThumbnailRequest,com.google.longrunning.Operation> |
getStreamThumbnailCallable()
Gets the thumbnail (image snapshot) of a single Stream.
|
com.google.api.gax.rpc.OperationCallable<GetStreamThumbnailRequest,GetStreamThumbnailResponse,OperationMetadata> |
getStreamThumbnailOperationCallable()
Gets the thumbnail (image snapshot) of a single Stream.
|
StreamsServiceStub |
getStub() |
boolean |
isShutdown() |
boolean |
isTerminated() |
StreamsServiceClient.ListClustersPagedResponse |
listClusters(ListClustersRequest request)
Lists Clusters in a given project and location.
|
StreamsServiceClient.ListClustersPagedResponse |
listClusters(LocationName parent)
Lists Clusters in a given project and location.
|
StreamsServiceClient.ListClustersPagedResponse |
listClusters(String parent)
Lists Clusters in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListClustersRequest,ListClustersResponse> |
listClustersCallable()
Lists Clusters in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListClustersRequest,StreamsServiceClient.ListClustersPagedResponse> |
listClustersPagedCallable()
Lists Clusters in a given project and location.
|
StreamsServiceClient.ListEventsPagedResponse |
listEvents(ClusterName parent)
Lists Events in a given project and location.
|
StreamsServiceClient.ListEventsPagedResponse |
listEvents(ListEventsRequest request)
Lists Events in a given project and location.
|
StreamsServiceClient.ListEventsPagedResponse |
listEvents(String parent)
Lists Events in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListEventsRequest,ListEventsResponse> |
listEventsCallable()
Lists Events in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListEventsRequest,StreamsServiceClient.ListEventsPagedResponse> |
listEventsPagedCallable()
Lists Events in a given project and location.
|
StreamsServiceClient.ListSeriesPagedResponse |
listSeries(ClusterName parent)
Lists Series in a given project and location.
|
StreamsServiceClient.ListSeriesPagedResponse |
listSeries(ListSeriesRequest request)
Lists Series in a given project and location.
|
StreamsServiceClient.ListSeriesPagedResponse |
listSeries(String parent)
Lists Series in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListSeriesRequest,ListSeriesResponse> |
listSeriesCallable()
Lists Series in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListSeriesRequest,StreamsServiceClient.ListSeriesPagedResponse> |
listSeriesPagedCallable()
Lists Series in a given project and location.
|
StreamsServiceClient.ListStreamsPagedResponse |
listStreams(ClusterName parent)
Lists Streams in a given project and location.
|
StreamsServiceClient.ListStreamsPagedResponse |
listStreams(ListStreamsRequest request)
Lists Streams in a given project and location.
|
StreamsServiceClient.ListStreamsPagedResponse |
listStreams(String parent)
Lists Streams in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListStreamsRequest,ListStreamsResponse> |
listStreamsCallable()
Lists Streams in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListStreamsRequest,StreamsServiceClient.ListStreamsPagedResponse> |
listStreamsPagedCallable()
Lists Streams in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<Channel,OperationMetadata> |
materializeChannelAsync(ClusterName parent,
Channel channel,
String channelId)
Materialize a channel.
|
com.google.api.gax.longrunning.OperationFuture<Channel,OperationMetadata> |
materializeChannelAsync(MaterializeChannelRequest request)
Materialize a channel.
|
com.google.api.gax.longrunning.OperationFuture<Channel,OperationMetadata> |
materializeChannelAsync(String parent,
Channel channel,
String channelId)
Materialize a channel.
|
com.google.api.gax.rpc.UnaryCallable<MaterializeChannelRequest,com.google.longrunning.Operation> |
materializeChannelCallable()
Materialize a channel.
|
com.google.api.gax.rpc.OperationCallable<MaterializeChannelRequest,Channel,OperationMetadata> |
materializeChannelOperationCallable()
Materialize a channel.
|
void |
shutdown() |
void |
shutdownNow() |
com.google.api.gax.longrunning.OperationFuture<Cluster,OperationMetadata> |
updateClusterAsync(Cluster cluster,
com.google.protobuf.FieldMask updateMask)
Updates the parameters of a single Cluster.
|
com.google.api.gax.longrunning.OperationFuture<Cluster,OperationMetadata> |
updateClusterAsync(UpdateClusterRequest request)
Updates the parameters of a single Cluster.
|
com.google.api.gax.rpc.UnaryCallable<UpdateClusterRequest,com.google.longrunning.Operation> |
updateClusterCallable()
Updates the parameters of a single Cluster.
|
com.google.api.gax.rpc.OperationCallable<UpdateClusterRequest,Cluster,OperationMetadata> |
updateClusterOperationCallable()
Updates the parameters of a single Cluster.
|
com.google.api.gax.longrunning.OperationFuture<Event,OperationMetadata> |
updateEventAsync(Event event,
com.google.protobuf.FieldMask updateMask)
Updates the parameters of a single Event.
|
com.google.api.gax.longrunning.OperationFuture<Event,OperationMetadata> |
updateEventAsync(UpdateEventRequest request)
Updates the parameters of a single Event.
|
com.google.api.gax.rpc.UnaryCallable<UpdateEventRequest,com.google.longrunning.Operation> |
updateEventCallable()
Updates the parameters of a single Event.
|
com.google.api.gax.rpc.OperationCallable<UpdateEventRequest,Event,OperationMetadata> |
updateEventOperationCallable()
Updates the parameters of a single Event.
|
com.google.api.gax.longrunning.OperationFuture<Series,OperationMetadata> |
updateSeriesAsync(Series series,
com.google.protobuf.FieldMask updateMask)
Updates the parameters of a single Event.
|
com.google.api.gax.longrunning.OperationFuture<Series,OperationMetadata> |
updateSeriesAsync(UpdateSeriesRequest request)
Updates the parameters of a single Event.
|
com.google.api.gax.rpc.UnaryCallable<UpdateSeriesRequest,com.google.longrunning.Operation> |
updateSeriesCallable()
Updates the parameters of a single Event.
|
com.google.api.gax.rpc.OperationCallable<UpdateSeriesRequest,Series,OperationMetadata> |
updateSeriesOperationCallable()
Updates the parameters of a single Event.
|
com.google.api.gax.longrunning.OperationFuture<Stream,OperationMetadata> |
updateStreamAsync(Stream stream,
com.google.protobuf.FieldMask updateMask)
Updates the parameters of a single Stream.
|
com.google.api.gax.longrunning.OperationFuture<Stream,OperationMetadata> |
updateStreamAsync(UpdateStreamRequest request)
Updates the parameters of a single Stream.
|
com.google.api.gax.rpc.UnaryCallable<UpdateStreamRequest,com.google.longrunning.Operation> |
updateStreamCallable()
Updates the parameters of a single Stream.
|
com.google.api.gax.rpc.OperationCallable<UpdateStreamRequest,Stream,OperationMetadata> |
updateStreamOperationCallable()
Updates the parameters of a single Stream.
|
protected StreamsServiceClient(StreamsServiceSettings settings) throws IOException
IOExceptionprotected StreamsServiceClient(StreamsServiceStub stub)
public static final StreamsServiceClient create() throws IOException
IOExceptionpublic static final StreamsServiceClient create(StreamsServiceSettings settings) throws IOException
IOExceptionpublic static final StreamsServiceClient create(StreamsServiceStub stub)
public final StreamsServiceSettings getSettings()
public StreamsServiceStub getStub()
public final com.google.longrunning.OperationsClient getOperationsClient()
@BetaApi public final com.google.api.gax.httpjson.longrunning.OperationsClient getHttpJsonOperationsClient()
public final StreamsServiceClient.ListClustersPagedResponse listClusters(LocationName parent)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (Cluster element : streamsServiceClient.listClusters(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. Parent value for ListClustersRequest.com.google.api.gax.rpc.ApiException - if the remote call failspublic final StreamsServiceClient.ListClustersPagedResponse listClusters(String parent)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (Cluster element : streamsServiceClient.listClusters(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. Parent value for ListClustersRequest.com.google.api.gax.rpc.ApiException - if the remote call failspublic final StreamsServiceClient.ListClustersPagedResponse listClusters(ListClustersRequest 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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
ListClustersRequest request =
ListClustersRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Cluster element : streamsServiceClient.listClusters(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListClustersRequest,StreamsServiceClient.ListClustersPagedResponse> listClustersPagedCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
ListClustersRequest request =
ListClustersRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Cluster> future =
streamsServiceClient.listClustersPagedCallable().futureCall(request);
// Do something.
for (Cluster element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListClustersRequest,ListClustersResponse> listClustersCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
ListClustersRequest request =
ListClustersRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListClustersResponse response = streamsServiceClient.listClustersCallable().call(request);
for (Cluster element : response.getClustersList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final Cluster getCluster(ClusterName name)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
Cluster response = streamsServiceClient.getCluster(name);
}
name - Required. Name of the resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Cluster getCluster(String name)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
String name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
Cluster response = streamsServiceClient.getCluster(name);
}
name - Required. Name of the resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Cluster getCluster(GetClusterRequest 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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
GetClusterRequest request =
GetClusterRequest.newBuilder()
.setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
.build();
Cluster response = streamsServiceClient.getCluster(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetClusterRequest,Cluster> getClusterCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
GetClusterRequest request =
GetClusterRequest.newBuilder()
.setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
.build();
ApiFuture<Cluster> future = streamsServiceClient.getClusterCallable().futureCall(request);
// Do something.
Cluster response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Cluster,OperationMetadata> createClusterAsync(LocationName parent, Cluster cluster, String clusterId)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
Cluster cluster = Cluster.newBuilder().build();
String clusterId = "clusterId561939637";
Cluster response = streamsServiceClient.createClusterAsync(parent, cluster, clusterId).get();
}
parent - Required. Value for parent.cluster - Required. The resource being created.clusterId - Required. Id of the requesting object.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Cluster,OperationMetadata> createClusterAsync(String parent, Cluster cluster, String clusterId)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
Cluster cluster = Cluster.newBuilder().build();
String clusterId = "clusterId561939637";
Cluster response = streamsServiceClient.createClusterAsync(parent, cluster, clusterId).get();
}
parent - Required. Value for parent.cluster - Required. The resource being created.clusterId - Required. Id of the requesting object.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Cluster,OperationMetadata> createClusterAsync(CreateClusterRequest 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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
CreateClusterRequest request =
CreateClusterRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setClusterId("clusterId561939637")
.setCluster(Cluster.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Cluster response = streamsServiceClient.createClusterAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateClusterRequest,Cluster,OperationMetadata> createClusterOperationCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
CreateClusterRequest request =
CreateClusterRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setClusterId("clusterId561939637")
.setCluster(Cluster.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<Cluster, OperationMetadata> future =
streamsServiceClient.createClusterOperationCallable().futureCall(request);
// Do something.
Cluster response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateClusterRequest,com.google.longrunning.Operation> createClusterCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
CreateClusterRequest request =
CreateClusterRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setClusterId("clusterId561939637")
.setCluster(Cluster.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
streamsServiceClient.createClusterCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Cluster,OperationMetadata> updateClusterAsync(Cluster cluster, com.google.protobuf.FieldMask updateMask)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
Cluster cluster = Cluster.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Cluster response = streamsServiceClient.updateClusterAsync(cluster, updateMask).get();
}
cluster - Required. The resource being updatedupdateMask - Required. Field mask is used to specify the fields to be overwritten in the
Cluster 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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Cluster,OperationMetadata> updateClusterAsync(UpdateClusterRequest 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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
UpdateClusterRequest request =
UpdateClusterRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setCluster(Cluster.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Cluster response = streamsServiceClient.updateClusterAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpdateClusterRequest,Cluster,OperationMetadata> updateClusterOperationCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
UpdateClusterRequest request =
UpdateClusterRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setCluster(Cluster.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<Cluster, OperationMetadata> future =
streamsServiceClient.updateClusterOperationCallable().futureCall(request);
// Do something.
Cluster response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateClusterRequest,com.google.longrunning.Operation> updateClusterCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
UpdateClusterRequest request =
UpdateClusterRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setCluster(Cluster.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
streamsServiceClient.updateClusterCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteClusterAsync(ClusterName name)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
streamsServiceClient.deleteClusterAsync(name).get();
}
name - Required. Name of the resourcecom.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteClusterAsync(String name)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
String name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
streamsServiceClient.deleteClusterAsync(name).get();
}
name - Required. Name of the resourcecom.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteClusterAsync(DeleteClusterRequest 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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
DeleteClusterRequest request =
DeleteClusterRequest.newBuilder()
.setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
.setRequestId("requestId693933066")
.build();
streamsServiceClient.deleteClusterAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteClusterRequest,com.google.protobuf.Empty,OperationMetadata> deleteClusterOperationCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
DeleteClusterRequest request =
DeleteClusterRequest.newBuilder()
.setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
.setRequestId("requestId693933066")
.build();
OperationFuture<Empty, OperationMetadata> future =
streamsServiceClient.deleteClusterOperationCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteClusterRequest,com.google.longrunning.Operation> deleteClusterCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
DeleteClusterRequest request =
DeleteClusterRequest.newBuilder()
.setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
streamsServiceClient.deleteClusterCallable().futureCall(request);
// Do something.
future.get();
}
public final StreamsServiceClient.ListStreamsPagedResponse listStreams(ClusterName parent)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
for (Stream element : streamsServiceClient.listStreams(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. Parent value for ListStreamsRequest.com.google.api.gax.rpc.ApiException - if the remote call failspublic final StreamsServiceClient.ListStreamsPagedResponse listStreams(String parent)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
String parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
for (Stream element : streamsServiceClient.listStreams(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. Parent value for ListStreamsRequest.com.google.api.gax.rpc.ApiException - if the remote call failspublic final StreamsServiceClient.ListStreamsPagedResponse listStreams(ListStreamsRequest 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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
ListStreamsRequest request =
ListStreamsRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Stream element : streamsServiceClient.listStreams(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListStreamsRequest,StreamsServiceClient.ListStreamsPagedResponse> listStreamsPagedCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
ListStreamsRequest request =
ListStreamsRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Stream> future =
streamsServiceClient.listStreamsPagedCallable().futureCall(request);
// Do something.
for (Stream element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListStreamsRequest,ListStreamsResponse> listStreamsCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
ListStreamsRequest request =
ListStreamsRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListStreamsResponse response = streamsServiceClient.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;
}
}
}
public final Stream getStream(StreamName name)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
StreamName name = StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]");
Stream response = streamsServiceClient.getStream(name);
}
name - Required. Name of the resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Stream getStream(String name)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
String name = StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString();
Stream response = streamsServiceClient.getStream(name);
}
name - Required. Name of the resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Stream getStream(GetStreamRequest 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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
GetStreamRequest request =
GetStreamRequest.newBuilder()
.setName(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString())
.build();
Stream response = streamsServiceClient.getStream(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetStreamRequest,Stream> getStreamCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
GetStreamRequest request =
GetStreamRequest.newBuilder()
.setName(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString())
.build();
ApiFuture<Stream> future = streamsServiceClient.getStreamCallable().futureCall(request);
// Do something.
Stream response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Stream,OperationMetadata> createStreamAsync(ClusterName parent, Stream stream, String streamId)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
Stream stream = Stream.newBuilder().build();
String streamId = "streamId1790933179";
Stream response = streamsServiceClient.createStreamAsync(parent, stream, streamId).get();
}
parent - Required. Value for parent.stream - Required. The resource being created.streamId - Required. Id of the requesting object.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Stream,OperationMetadata> createStreamAsync(String parent, Stream stream, String streamId)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
String parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
Stream stream = Stream.newBuilder().build();
String streamId = "streamId1790933179";
Stream response = streamsServiceClient.createStreamAsync(parent, stream, streamId).get();
}
parent - Required. Value for parent.stream - Required. The resource being created.streamId - Required. Id of the requesting object.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Stream,OperationMetadata> createStreamAsync(CreateStreamRequest 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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
CreateStreamRequest request =
CreateStreamRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
.setStreamId("streamId1790933179")
.setStream(Stream.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Stream response = streamsServiceClient.createStreamAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateStreamRequest,Stream,OperationMetadata> createStreamOperationCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
CreateStreamRequest request =
CreateStreamRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
.setStreamId("streamId1790933179")
.setStream(Stream.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<Stream, OperationMetadata> future =
streamsServiceClient.createStreamOperationCallable().futureCall(request);
// Do something.
Stream response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateStreamRequest,com.google.longrunning.Operation> createStreamCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
CreateStreamRequest request =
CreateStreamRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
.setStreamId("streamId1790933179")
.setStream(Stream.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future = streamsServiceClient.createStreamCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Stream,OperationMetadata> updateStreamAsync(Stream stream, com.google.protobuf.FieldMask updateMask)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
Stream stream = Stream.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Stream response = streamsServiceClient.updateStreamAsync(stream, updateMask).get();
}
stream - Required. The resource being updated.updateMask - Required. 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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Stream,OperationMetadata> updateStreamAsync(UpdateStreamRequest 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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
UpdateStreamRequest request =
UpdateStreamRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setStream(Stream.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Stream response = streamsServiceClient.updateStreamAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpdateStreamRequest,Stream,OperationMetadata> updateStreamOperationCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
UpdateStreamRequest request =
UpdateStreamRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setStream(Stream.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<Stream, OperationMetadata> future =
streamsServiceClient.updateStreamOperationCallable().futureCall(request);
// Do something.
Stream response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateStreamRequest,com.google.longrunning.Operation> updateStreamCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
UpdateStreamRequest request =
UpdateStreamRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setStream(Stream.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future = streamsServiceClient.updateStreamCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteStreamAsync(StreamName name)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
StreamName name = StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]");
streamsServiceClient.deleteStreamAsync(name).get();
}
name - Required. Name of the resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteStreamAsync(String name)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
String name = StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString();
streamsServiceClient.deleteStreamAsync(name).get();
}
name - Required. Name of the resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteStreamAsync(DeleteStreamRequest 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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
DeleteStreamRequest request =
DeleteStreamRequest.newBuilder()
.setName(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString())
.setRequestId("requestId693933066")
.build();
streamsServiceClient.deleteStreamAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteStreamRequest,com.google.protobuf.Empty,OperationMetadata> deleteStreamOperationCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
DeleteStreamRequest request =
DeleteStreamRequest.newBuilder()
.setName(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString())
.setRequestId("requestId693933066")
.build();
OperationFuture<Empty, OperationMetadata> future =
streamsServiceClient.deleteStreamOperationCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteStreamRequest,com.google.longrunning.Operation> deleteStreamCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
DeleteStreamRequest request =
DeleteStreamRequest.newBuilder()
.setName(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future = streamsServiceClient.deleteStreamCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<GetStreamThumbnailResponse,OperationMetadata> getStreamThumbnailAsync(String stream, String gcsObjectName)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
String stream = "stream-891990144";
String gcsObjectName = "gcsObjectName-1987275551";
GetStreamThumbnailResponse response =
streamsServiceClient.getStreamThumbnailAsync(stream, gcsObjectName).get();
}
stream - Required. The name of the stream for to get the thumbnail from.gcsObjectName - Required. The name of the GCS object to store the thumbnail image.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<GetStreamThumbnailResponse,OperationMetadata> getStreamThumbnailAsync(GetStreamThumbnailRequest 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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
GetStreamThumbnailRequest request =
GetStreamThumbnailRequest.newBuilder()
.setStream("stream-891990144")
.setGcsObjectName("gcsObjectName-1987275551")
.setEvent("event96891546")
.setRequestId("requestId693933066")
.build();
GetStreamThumbnailResponse response =
streamsServiceClient.getStreamThumbnailAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<GetStreamThumbnailRequest,GetStreamThumbnailResponse,OperationMetadata> getStreamThumbnailOperationCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
GetStreamThumbnailRequest request =
GetStreamThumbnailRequest.newBuilder()
.setStream("stream-891990144")
.setGcsObjectName("gcsObjectName-1987275551")
.setEvent("event96891546")
.setRequestId("requestId693933066")
.build();
OperationFuture<GetStreamThumbnailResponse, OperationMetadata> future =
streamsServiceClient.getStreamThumbnailOperationCallable().futureCall(request);
// Do something.
GetStreamThumbnailResponse response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<GetStreamThumbnailRequest,com.google.longrunning.Operation> getStreamThumbnailCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
GetStreamThumbnailRequest request =
GetStreamThumbnailRequest.newBuilder()
.setStream("stream-891990144")
.setGcsObjectName("gcsObjectName-1987275551")
.setEvent("event96891546")
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
streamsServiceClient.getStreamThumbnailCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final GenerateStreamHlsTokenResponse generateStreamHlsToken(String 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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
String stream = "stream-891990144";
GenerateStreamHlsTokenResponse response = streamsServiceClient.generateStreamHlsToken(stream);
}
stream - Required. The name of the stream.com.google.api.gax.rpc.ApiException - if the remote call failspublic final GenerateStreamHlsTokenResponse generateStreamHlsToken(GenerateStreamHlsTokenRequest 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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
GenerateStreamHlsTokenRequest request =
GenerateStreamHlsTokenRequest.newBuilder().setStream("stream-891990144").build();
GenerateStreamHlsTokenResponse response =
streamsServiceClient.generateStreamHlsToken(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GenerateStreamHlsTokenRequest,GenerateStreamHlsTokenResponse> generateStreamHlsTokenCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
GenerateStreamHlsTokenRequest request =
GenerateStreamHlsTokenRequest.newBuilder().setStream("stream-891990144").build();
ApiFuture<GenerateStreamHlsTokenResponse> future =
streamsServiceClient.generateStreamHlsTokenCallable().futureCall(request);
// Do something.
GenerateStreamHlsTokenResponse response = future.get();
}
public final StreamsServiceClient.ListEventsPagedResponse listEvents(ClusterName parent)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
for (Event element : streamsServiceClient.listEvents(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. Parent value for ListEventsRequest.com.google.api.gax.rpc.ApiException - if the remote call failspublic final StreamsServiceClient.ListEventsPagedResponse listEvents(String parent)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
String parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
for (Event element : streamsServiceClient.listEvents(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. Parent value for ListEventsRequest.com.google.api.gax.rpc.ApiException - if the remote call failspublic final StreamsServiceClient.ListEventsPagedResponse listEvents(ListEventsRequest 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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
ListEventsRequest request =
ListEventsRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Event element : streamsServiceClient.listEvents(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListEventsRequest,StreamsServiceClient.ListEventsPagedResponse> listEventsPagedCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
ListEventsRequest request =
ListEventsRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Event> future = streamsServiceClient.listEventsPagedCallable().futureCall(request);
// Do something.
for (Event element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListEventsRequest,ListEventsResponse> listEventsCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
ListEventsRequest request =
ListEventsRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListEventsResponse response = streamsServiceClient.listEventsCallable().call(request);
for (Event element : response.getEventsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final Event getEvent(EventName name)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
EventName name = EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]");
Event response = streamsServiceClient.getEvent(name);
}
name - Required. Name of the resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Event getEvent(String name)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
String name = EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString();
Event response = streamsServiceClient.getEvent(name);
}
name - Required. Name of the resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Event getEvent(GetEventRequest 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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
GetEventRequest request =
GetEventRequest.newBuilder()
.setName(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString())
.build();
Event response = streamsServiceClient.getEvent(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetEventRequest,Event> getEventCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
GetEventRequest request =
GetEventRequest.newBuilder()
.setName(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString())
.build();
ApiFuture<Event> future = streamsServiceClient.getEventCallable().futureCall(request);
// Do something.
Event response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Event,OperationMetadata> createEventAsync(ClusterName parent, Event event, String eventId)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
Event event = Event.newBuilder().build();
String eventId = "eventId-1376502443";
Event response = streamsServiceClient.createEventAsync(parent, event, eventId).get();
}
parent - Required. Value for parent.event - Required. The resource being created.eventId - Required. Id of the requesting object.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Event,OperationMetadata> createEventAsync(String parent, Event event, String eventId)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
String parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
Event event = Event.newBuilder().build();
String eventId = "eventId-1376502443";
Event response = streamsServiceClient.createEventAsync(parent, event, eventId).get();
}
parent - Required. Value for parent.event - Required. The resource being created.eventId - Required. Id of the requesting object.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Event,OperationMetadata> createEventAsync(CreateEventRequest 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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
CreateEventRequest request =
CreateEventRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
.setEventId("eventId-1376502443")
.setEvent(Event.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Event response = streamsServiceClient.createEventAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateEventRequest,Event,OperationMetadata> createEventOperationCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
CreateEventRequest request =
CreateEventRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
.setEventId("eventId-1376502443")
.setEvent(Event.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<Event, OperationMetadata> future =
streamsServiceClient.createEventOperationCallable().futureCall(request);
// Do something.
Event response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateEventRequest,com.google.longrunning.Operation> createEventCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
CreateEventRequest request =
CreateEventRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
.setEventId("eventId-1376502443")
.setEvent(Event.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future = streamsServiceClient.createEventCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Event,OperationMetadata> updateEventAsync(Event event, com.google.protobuf.FieldMask updateMask)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
Event event = Event.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Event response = streamsServiceClient.updateEventAsync(event, updateMask).get();
}
event - Required. The resource being updated.updateMask - Required. Field mask is used to specify the fields to be overwritten in the
Event 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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Event,OperationMetadata> updateEventAsync(UpdateEventRequest 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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
UpdateEventRequest request =
UpdateEventRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setEvent(Event.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Event response = streamsServiceClient.updateEventAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpdateEventRequest,Event,OperationMetadata> updateEventOperationCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
UpdateEventRequest request =
UpdateEventRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setEvent(Event.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<Event, OperationMetadata> future =
streamsServiceClient.updateEventOperationCallable().futureCall(request);
// Do something.
Event response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateEventRequest,com.google.longrunning.Operation> updateEventCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
UpdateEventRequest request =
UpdateEventRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setEvent(Event.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future = streamsServiceClient.updateEventCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteEventAsync(EventName name)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
EventName name = EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]");
streamsServiceClient.deleteEventAsync(name).get();
}
name - Required. Name of the resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteEventAsync(String name)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
String name = EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString();
streamsServiceClient.deleteEventAsync(name).get();
}
name - Required. Name of the resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteEventAsync(DeleteEventRequest 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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
DeleteEventRequest request =
DeleteEventRequest.newBuilder()
.setName(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString())
.setRequestId("requestId693933066")
.build();
streamsServiceClient.deleteEventAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteEventRequest,com.google.protobuf.Empty,OperationMetadata> deleteEventOperationCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
DeleteEventRequest request =
DeleteEventRequest.newBuilder()
.setName(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString())
.setRequestId("requestId693933066")
.build();
OperationFuture<Empty, OperationMetadata> future =
streamsServiceClient.deleteEventOperationCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteEventRequest,com.google.longrunning.Operation> deleteEventCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
DeleteEventRequest request =
DeleteEventRequest.newBuilder()
.setName(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future = streamsServiceClient.deleteEventCallable().futureCall(request);
// Do something.
future.get();
}
public final StreamsServiceClient.ListSeriesPagedResponse listSeries(ClusterName parent)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
for (Series element : streamsServiceClient.listSeries(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. Parent value for ListSeriesRequest.com.google.api.gax.rpc.ApiException - if the remote call failspublic final StreamsServiceClient.ListSeriesPagedResponse listSeries(String parent)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
String parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
for (Series element : streamsServiceClient.listSeries(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. Parent value for ListSeriesRequest.com.google.api.gax.rpc.ApiException - if the remote call failspublic final StreamsServiceClient.ListSeriesPagedResponse listSeries(ListSeriesRequest 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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
ListSeriesRequest request =
ListSeriesRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Series element : streamsServiceClient.listSeries(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListSeriesRequest,StreamsServiceClient.ListSeriesPagedResponse> listSeriesPagedCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
ListSeriesRequest request =
ListSeriesRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Series> future = streamsServiceClient.listSeriesPagedCallable().futureCall(request);
// Do something.
for (Series element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListSeriesRequest,ListSeriesResponse> listSeriesCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
ListSeriesRequest request =
ListSeriesRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListSeriesResponse response = streamsServiceClient.listSeriesCallable().call(request);
for (Series element : response.getSeriesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final Series getSeries(SeriesName name)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
SeriesName name = SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]");
Series response = streamsServiceClient.getSeries(name);
}
name - Required. Name of the resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Series getSeries(String name)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
String name = SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]").toString();
Series response = streamsServiceClient.getSeries(name);
}
name - Required. Name of the resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Series getSeries(GetSeriesRequest 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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
GetSeriesRequest request =
GetSeriesRequest.newBuilder()
.setName(SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]").toString())
.build();
Series response = streamsServiceClient.getSeries(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetSeriesRequest,Series> getSeriesCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
GetSeriesRequest request =
GetSeriesRequest.newBuilder()
.setName(SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]").toString())
.build();
ApiFuture<Series> future = streamsServiceClient.getSeriesCallable().futureCall(request);
// Do something.
Series response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Series,OperationMetadata> createSeriesAsync(ClusterName parent, Series series, String seriesId)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
Series series = Series.newBuilder().build();
String seriesId = "seriesId1367098866";
Series response = streamsServiceClient.createSeriesAsync(parent, series, seriesId).get();
}
parent - Required. Value for parent.series - Required. The resource being created.seriesId - Required. Id of the requesting object.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Series,OperationMetadata> createSeriesAsync(String parent, Series series, String seriesId)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
String parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
Series series = Series.newBuilder().build();
String seriesId = "seriesId1367098866";
Series response = streamsServiceClient.createSeriesAsync(parent, series, seriesId).get();
}
parent - Required. Value for parent.series - Required. The resource being created.seriesId - Required. Id of the requesting object.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Series,OperationMetadata> createSeriesAsync(CreateSeriesRequest 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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
CreateSeriesRequest request =
CreateSeriesRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
.setSeriesId("seriesId1367098866")
.setSeries(Series.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Series response = streamsServiceClient.createSeriesAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateSeriesRequest,Series,OperationMetadata> createSeriesOperationCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
CreateSeriesRequest request =
CreateSeriesRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
.setSeriesId("seriesId1367098866")
.setSeries(Series.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<Series, OperationMetadata> future =
streamsServiceClient.createSeriesOperationCallable().futureCall(request);
// Do something.
Series response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateSeriesRequest,com.google.longrunning.Operation> createSeriesCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
CreateSeriesRequest request =
CreateSeriesRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
.setSeriesId("seriesId1367098866")
.setSeries(Series.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future = streamsServiceClient.createSeriesCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Series,OperationMetadata> updateSeriesAsync(Series series, com.google.protobuf.FieldMask updateMask)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
Series series = Series.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Series response = streamsServiceClient.updateSeriesAsync(series, updateMask).get();
}
series - Required. The resource being updatedupdateMask - Required. Field mask is used to specify the fields to be overwritten in the
Series 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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Series,OperationMetadata> updateSeriesAsync(UpdateSeriesRequest 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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
UpdateSeriesRequest request =
UpdateSeriesRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setSeries(Series.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Series response = streamsServiceClient.updateSeriesAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpdateSeriesRequest,Series,OperationMetadata> updateSeriesOperationCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
UpdateSeriesRequest request =
UpdateSeriesRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setSeries(Series.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<Series, OperationMetadata> future =
streamsServiceClient.updateSeriesOperationCallable().futureCall(request);
// Do something.
Series response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateSeriesRequest,com.google.longrunning.Operation> updateSeriesCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
UpdateSeriesRequest request =
UpdateSeriesRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setSeries(Series.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future = streamsServiceClient.updateSeriesCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSeriesAsync(SeriesName name)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
SeriesName name = SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]");
streamsServiceClient.deleteSeriesAsync(name).get();
}
name - Required. Name of the resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSeriesAsync(String name)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
String name = SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]").toString();
streamsServiceClient.deleteSeriesAsync(name).get();
}
name - Required. Name of the resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSeriesAsync(DeleteSeriesRequest 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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
DeleteSeriesRequest request =
DeleteSeriesRequest.newBuilder()
.setName(SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]").toString())
.setRequestId("requestId693933066")
.build();
streamsServiceClient.deleteSeriesAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteSeriesRequest,com.google.protobuf.Empty,OperationMetadata> deleteSeriesOperationCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
DeleteSeriesRequest request =
DeleteSeriesRequest.newBuilder()
.setName(SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]").toString())
.setRequestId("requestId693933066")
.build();
OperationFuture<Empty, OperationMetadata> future =
streamsServiceClient.deleteSeriesOperationCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteSeriesRequest,com.google.longrunning.Operation> deleteSeriesCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
DeleteSeriesRequest request =
DeleteSeriesRequest.newBuilder()
.setName(SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]").toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future = streamsServiceClient.deleteSeriesCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Channel,OperationMetadata> materializeChannelAsync(ClusterName parent, Channel channel, String channelId)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
Channel channel = Channel.newBuilder().build();
String channelId = "channelId1461735806";
Channel response =
streamsServiceClient.materializeChannelAsync(parent, channel, channelId).get();
}
parent - Required. Value for parent.channel - Required. The resource being created.channelId - Required. Id of the channel.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Channel,OperationMetadata> materializeChannelAsync(String parent, Channel channel, String channelId)
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
String parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
Channel channel = Channel.newBuilder().build();
String channelId = "channelId1461735806";
Channel response =
streamsServiceClient.materializeChannelAsync(parent, channel, channelId).get();
}
parent - Required. Value for parent.channel - Required. The resource being created.channelId - Required. Id of the channel.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Channel,OperationMetadata> materializeChannelAsync(MaterializeChannelRequest 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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
MaterializeChannelRequest request =
MaterializeChannelRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
.setChannelId("channelId1461735806")
.setChannel(Channel.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Channel response = streamsServiceClient.materializeChannelAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<MaterializeChannelRequest,Channel,OperationMetadata> materializeChannelOperationCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
MaterializeChannelRequest request =
MaterializeChannelRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
.setChannelId("channelId1461735806")
.setChannel(Channel.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<Channel, OperationMetadata> future =
streamsServiceClient.materializeChannelOperationCallable().futureCall(request);
// Do something.
Channel response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<MaterializeChannelRequest,com.google.longrunning.Operation> materializeChannelCallable()
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 (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
MaterializeChannelRequest request =
MaterializeChannelRequest.newBuilder()
.setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
.setChannelId("channelId1461735806")
.setChannel(Channel.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
streamsServiceClient.materializeChannelCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final void close()
close in interface AutoCloseablepublic void shutdown()
shutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isShutdown()
isShutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isTerminated()
isTerminated in interface com.google.api.gax.core.BackgroundResourcepublic void shutdownNow()
shutdownNow in interface com.google.api.gax.core.BackgroundResourcepublic boolean awaitTermination(long duration,
TimeUnit unit)
throws InterruptedException
awaitTermination in interface com.google.api.gax.core.BackgroundResourceInterruptedExceptionCopyright © 2025 Google LLC. All rights reserved.