Class StreamsServiceClient
- All Implemented Interfaces:
BackgroundResource,AutoCloseable
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.
|
ListLocations |
Lists information about the supported locations for this service. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedStreamsServiceClient(StreamsServiceSettings settings) Constructs an instance of StreamsServiceClient, using the given settings.protected -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long duration, TimeUnit unit) final voidclose()static final StreamsServiceClientcreate()Constructs an instance of StreamsServiceClient with default settings.static final StreamsServiceClientcreate(StreamsServiceSettings settings) Constructs an instance of StreamsServiceClient, using the given settings.static final StreamsServiceClientcreate(StreamsServiceStub stub) Constructs an instance of StreamsServiceClient, using the given stub for making calls.createClusterAsync(CreateClusterRequest request) Creates a new Cluster in a given project and location.createClusterAsync(LocationName parent, Cluster cluster, String clusterId) Creates a new Cluster in a given project and location.createClusterAsync(String parent, Cluster cluster, String clusterId) Creates a new Cluster in a given project and location.Creates a new Cluster in a given project and location.Creates a new Cluster in a given project and location.createEventAsync(ClusterName parent, Event event, String eventId) Creates a new Event in a given project and location.createEventAsync(CreateEventRequest request) Creates a new Event in a given project and location.createEventAsync(String parent, Event event, String eventId) Creates a new Event in a given project and location.Creates a new Event in a given project and location.Creates a new Event in a given project and location.createSeriesAsync(ClusterName parent, Series series, String seriesId) Creates a new Series in a given project and location.createSeriesAsync(CreateSeriesRequest request) Creates a new Series in a given project and location.createSeriesAsync(String parent, Series series, String seriesId) Creates a new Series in a given project and location.Creates a new Series in a given project and location.Creates a new Series in a given project and location.createStreamAsync(ClusterName parent, Stream stream, String streamId) Creates a new Stream in a given project and location.createStreamAsync(CreateStreamRequest request) Creates a new Stream in a given project and location.createStreamAsync(String parent, Stream stream, String streamId) Creates a new Stream in a given project and location.Creates a new Stream in a given project and location.Creates a new Stream in a given project and location.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single Cluster.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteClusterAsync(DeleteClusterRequest request) Deletes a single Cluster.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteClusterAsync(String name) Deletes a single Cluster.Deletes a single Cluster.final OperationCallable<DeleteClusterRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a single Cluster.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteEventAsync(DeleteEventRequest request) Deletes a single Event.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteEventAsync(EventName name) Deletes a single Event.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteEventAsync(String name) Deletes a single Event.Deletes a single Event.final OperationCallable<DeleteEventRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a single Event.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSeriesAsync(DeleteSeriesRequest request) Deletes a single Series.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSeriesAsync(SeriesName name) Deletes a single Series.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSeriesAsync(String name) Deletes a single Series.Deletes a single Series.final OperationCallable<DeleteSeriesRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a single Series.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteStreamAsync(DeleteStreamRequest request) Deletes a single Stream.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteStreamAsync(StreamName name) Deletes a single Stream.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteStreamAsync(String name) Deletes a single Stream.Deletes a single Stream.final OperationCallable<DeleteStreamRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a single Stream.Generate the JWT auth token required to get the stream HLS contents.generateStreamHlsToken(String stream) Generate the JWT auth token required to get the stream HLS contents.Generate the JWT auth token required to get the stream HLS contents.final ClustergetCluster(ClusterName name) Gets details of a single Cluster.final ClustergetCluster(GetClusterRequest request) Gets details of a single Cluster.final ClustergetCluster(String name) Gets details of a single Cluster.Gets details of a single Cluster.final EventGets details of a single Event.final EventgetEvent(GetEventRequest request) Gets details of a single Event.final EventGets details of a single Event.final UnaryCallable<GetEventRequest,Event> Gets details of a single Event.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final LocationgetLocation(GetLocationRequest request) Gets information about a location.Gets information about a location.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final SeriesgetSeries(GetSeriesRequest request) Gets details of a single Series.final SeriesgetSeries(SeriesName name) Gets details of a single Series.final SeriesGets details of a single Series.final UnaryCallable<GetSeriesRequest,Series> Gets details of a single Series.final StreamsServiceSettingsfinal StreamgetStream(GetStreamRequest request) Gets details of a single Stream.final StreamgetStream(StreamName name) Gets details of a single Stream.final StreamGets details of a single Stream.final UnaryCallable<GetStreamRequest,Stream> Gets details of a single Stream.Gets the thumbnail (image snapshot) of a single Stream.getStreamThumbnailAsync(String stream, String gcsObjectName) Gets the thumbnail (image snapshot) of a single Stream.Gets the thumbnail (image snapshot) of a single Stream.Gets the thumbnail (image snapshot) of a single Stream.getStub()booleanbooleanlistClusters(ListClustersRequest request) Lists Clusters in a given project and location.listClusters(LocationName parent) Lists Clusters in a given project and location.listClusters(String parent) Lists Clusters in a given project and location.Lists Clusters in a given project and location.Lists Clusters in a given project and location.listEvents(ClusterName parent) Lists Events in a given project and location.listEvents(ListEventsRequest request) Lists Events in a given project and location.listEvents(String parent) Lists Events in a given project and location.Lists Events in a given project and location.Lists Events in a given project and location.listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Lists information about the supported locations for this service.Lists information about the supported locations for this service.listSeries(ClusterName parent) Lists Series in a given project and location.listSeries(ListSeriesRequest request) Lists Series in a given project and location.listSeries(String parent) Lists Series in a given project and location.Lists Series in a given project and location.Lists Series in a given project and location.listStreams(ClusterName parent) Lists Streams in a given project and location.listStreams(ListStreamsRequest request) Lists Streams in a given project and location.listStreams(String parent) Lists Streams in a given project and location.Lists Streams in a given project and location.Lists Streams in a given project and location.materializeChannelAsync(ClusterName parent, Channel channel, String channelId) Materialize a channel.Materialize a channel.materializeChannelAsync(String parent, Channel channel, String channelId) Materialize a channel.Materialize a channel.Materialize a channel.voidshutdown()voidupdateClusterAsync(Cluster cluster, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single Cluster.updateClusterAsync(UpdateClusterRequest request) Updates the parameters of a single Cluster.Updates the parameters of a single Cluster.Updates the parameters of a single Cluster.updateEventAsync(Event event, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single Event.updateEventAsync(UpdateEventRequest request) Updates the parameters of a single Event.Updates the parameters of a single Event.Updates the parameters of a single Event.updateSeriesAsync(Series series, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single Event.updateSeriesAsync(UpdateSeriesRequest request) Updates the parameters of a single Event.Updates the parameters of a single Event.Updates the parameters of a single Event.updateStreamAsync(Stream stream, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single Stream.updateStreamAsync(UpdateStreamRequest request) Updates the parameters of a single Stream.Updates the parameters of a single Stream.Updates the parameters of a single Stream.
-
Constructor Details
-
StreamsServiceClient
Constructs an instance of StreamsServiceClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.- Throws:
IOException
-
StreamsServiceClient
-
-
Method Details
-
create
Constructs an instance of StreamsServiceClient with default settings.- Throws:
IOException
-
create
Constructs an instance of StreamsServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.- Throws:
IOException
-
create
Constructs an instance of StreamsServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(StreamsServiceSettings). -
getSettings
-
getStub
-
getOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
getHttpJsonOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
listClusters
Lists Clusters in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (Cluster element : streamsServiceClient.listClusters(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListClustersRequest.- Throws:
ApiException- if the remote call fails
-
listClusters
Lists Clusters in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (Cluster element : streamsServiceClient.listClusters(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListClustersRequest.- Throws:
ApiException- if the remote call fails
-
listClusters
public final StreamsServiceClient.ListClustersPagedResponse listClusters(ListClustersRequest request) Lists Clusters in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listClustersPagedCallable
public final UnaryCallable<ListClustersRequest,StreamsServiceClient.ListClustersPagedResponse> listClustersPagedCallable()Lists Clusters in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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); } } -
listClustersCallable
Lists Clusters in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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; } } } -
getCluster
Gets details of a single Cluster.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
getCluster
Gets details of a single Cluster.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
getCluster
Gets details of a single Cluster.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getClusterCallable
Gets details of a single Cluster.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
createClusterAsync
public final OperationFuture<Cluster,OperationMetadata> createClusterAsync(LocationName parent, Cluster cluster, String clusterId) Creates a new Cluster in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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(); }- Parameters:
parent- Required. Value for parent.cluster- Required. The resource being created.clusterId- Required. Id of the requesting object.- Throws:
ApiException- if the remote call fails
-
createClusterAsync
public final OperationFuture<Cluster,OperationMetadata> createClusterAsync(String parent, Cluster cluster, String clusterId) Creates a new Cluster in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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(); }- Parameters:
parent- Required. Value for parent.cluster- Required. The resource being created.clusterId- Required. Id of the requesting object.- Throws:
ApiException- if the remote call fails
-
createClusterAsync
public final OperationFuture<Cluster,OperationMetadata> createClusterAsync(CreateClusterRequest request) Creates a new Cluster in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createClusterOperationCallable
public final OperationCallable<CreateClusterRequest,Cluster, createClusterOperationCallable()OperationMetadata> Creates a new Cluster in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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(); } -
createClusterCallable
Creates a new Cluster in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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(); } -
updateClusterAsync
public final OperationFuture<Cluster,OperationMetadata> updateClusterAsync(Cluster cluster, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single Cluster.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
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.- Throws:
ApiException- if the remote call fails
-
updateClusterAsync
public final OperationFuture<Cluster,OperationMetadata> updateClusterAsync(UpdateClusterRequest request) Updates the parameters of a single Cluster.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateClusterOperationCallable
public final OperationCallable<UpdateClusterRequest,Cluster, updateClusterOperationCallable()OperationMetadata> Updates the parameters of a single Cluster.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
updateClusterCallable
Updates the parameters of a single Cluster.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
deleteClusterAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteClusterAsync(ClusterName name) Deletes a single Cluster.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
deleteClusterAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteClusterAsync(String name) Deletes a single Cluster.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
deleteClusterAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteClusterAsync(DeleteClusterRequest request) Deletes a single Cluster.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteClusterOperationCallable
public final OperationCallable<DeleteClusterRequest,com.google.protobuf.Empty, deleteClusterOperationCallable()OperationMetadata> Deletes a single Cluster.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
deleteClusterCallable
Deletes a single Cluster.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
listStreams
Lists Streams in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) { ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); for (Stream element : streamsServiceClient.listStreams(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListStreamsRequest.- Throws:
ApiException- if the remote call fails
-
listStreams
Lists Streams in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) { String parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString(); for (Stream element : streamsServiceClient.listStreams(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListStreamsRequest.- Throws:
ApiException- if the remote call fails
-
listStreams
Lists Streams in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listStreamsPagedCallable
public final UnaryCallable<ListStreamsRequest,StreamsServiceClient.ListStreamsPagedResponse> listStreamsPagedCallable()Lists Streams in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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); } } -
listStreamsCallable
Lists Streams in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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; } } } -
getStream
Gets details of a single 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()) { StreamName name = StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]"); Stream response = streamsServiceClient.getStream(name); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
getStream
Gets details of a single 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 name = StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString(); Stream response = streamsServiceClient.getStream(name); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
getStream
Gets details of a single 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()) { GetStreamRequest request = GetStreamRequest.newBuilder() .setName(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString()) .build(); Stream response = streamsServiceClient.getStream(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getStreamCallable
Gets details of a single 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()) { 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(); } -
createStreamAsync
public final OperationFuture<Stream,OperationMetadata> createStreamAsync(ClusterName parent, Stream stream, String streamId) Creates a new Stream in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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(); }- Parameters:
parent- Required. Value for parent.stream- Required. The resource being created.streamId- Required. Id of the requesting object.- Throws:
ApiException- if the remote call fails
-
createStreamAsync
public final OperationFuture<Stream,OperationMetadata> createStreamAsync(String parent, Stream stream, String streamId) Creates a new Stream in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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(); }- Parameters:
parent- Required. Value for parent.stream- Required. The resource being created.streamId- Required. Id of the requesting object.- Throws:
ApiException- if the remote call fails
-
createStreamAsync
public final OperationFuture<Stream,OperationMetadata> createStreamAsync(CreateStreamRequest request) Creates a new Stream in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createStreamOperationCallable
public final OperationCallable<CreateStreamRequest,Stream, createStreamOperationCallable()OperationMetadata> Creates a new Stream in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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(); } -
createStreamCallable
Creates a new Stream in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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(); } -
updateStreamAsync
public final OperationFuture<Stream,OperationMetadata> updateStreamAsync(Stream stream, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single 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()) { Stream stream = Stream.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); Stream response = streamsServiceClient.updateStreamAsync(stream, updateMask).get(); }- Parameters:
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.- Throws:
ApiException- if the remote call fails
-
updateStreamAsync
public final OperationFuture<Stream,OperationMetadata> updateStreamAsync(UpdateStreamRequest request) Updates the parameters of a single 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()) { UpdateStreamRequest request = UpdateStreamRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setStream(Stream.newBuilder().build()) .setRequestId("requestId693933066") .build(); Stream response = streamsServiceClient.updateStreamAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateStreamOperationCallable
public final OperationCallable<UpdateStreamRequest,Stream, updateStreamOperationCallable()OperationMetadata> Updates the parameters of a single 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()) { 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(); } -
updateStreamCallable
Updates the parameters of a single 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()) { 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(); } -
deleteStreamAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteStreamAsync(StreamName name) Deletes a single 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()) { StreamName name = StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]"); streamsServiceClient.deleteStreamAsync(name).get(); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
deleteStreamAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteStreamAsync(String name) Deletes a single 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 name = StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString(); streamsServiceClient.deleteStreamAsync(name).get(); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
deleteStreamAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteStreamAsync(DeleteStreamRequest request) Deletes a single 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()) { DeleteStreamRequest request = DeleteStreamRequest.newBuilder() .setName(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString()) .setRequestId("requestId693933066") .build(); streamsServiceClient.deleteStreamAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteStreamOperationCallable
public final OperationCallable<DeleteStreamRequest,com.google.protobuf.Empty, deleteStreamOperationCallable()OperationMetadata> Deletes a single 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()) { 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(); } -
deleteStreamCallable
Deletes a single 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()) { 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(); } -
getStreamThumbnailAsync
public final OperationFuture<GetStreamThumbnailResponse,OperationMetadata> getStreamThumbnailAsync(String stream, String gcsObjectName) Gets the thumbnail (image snapshot) of a single 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"; String gcsObjectName = "gcsObjectName-1987275551"; GetStreamThumbnailResponse response = streamsServiceClient.getStreamThumbnailAsync(stream, gcsObjectName).get(); }- Parameters:
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.- Throws:
ApiException- if the remote call fails
-
getStreamThumbnailAsync
public final OperationFuture<GetStreamThumbnailResponse,OperationMetadata> getStreamThumbnailAsync(GetStreamThumbnailRequest request) Gets the thumbnail (image snapshot) of a single 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()) { GetStreamThumbnailRequest request = GetStreamThumbnailRequest.newBuilder() .setStream("stream-891990144") .setGcsObjectName("gcsObjectName-1987275551") .setEvent("event96891546") .setRequestId("requestId693933066") .build(); GetStreamThumbnailResponse response = streamsServiceClient.getStreamThumbnailAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getStreamThumbnailOperationCallable
public final OperationCallable<GetStreamThumbnailRequest,GetStreamThumbnailResponse, getStreamThumbnailOperationCallable()OperationMetadata> Gets the thumbnail (image snapshot) of a single 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()) { 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(); } -
getStreamThumbnailCallable
Gets the thumbnail (image snapshot) of a single 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()) { 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(); } -
generateStreamHlsToken
Generate the JWT auth token required to get the stream HLS contents.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }- Parameters:
stream- Required. The name of the stream.- Throws:
ApiException- if the remote call fails
-
generateStreamHlsToken
public final GenerateStreamHlsTokenResponse generateStreamHlsToken(GenerateStreamHlsTokenRequest request) Generate the JWT auth token required to get the stream HLS contents.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
generateStreamHlsTokenCallable
public final UnaryCallable<GenerateStreamHlsTokenRequest,GenerateStreamHlsTokenResponse> generateStreamHlsTokenCallable()Generate the JWT auth token required to get the stream HLS contents.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
listEvents
Lists Events in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) { ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); for (Event element : streamsServiceClient.listEvents(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListEventsRequest.- Throws:
ApiException- if the remote call fails
-
listEvents
Lists Events in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) { String parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString(); for (Event element : streamsServiceClient.listEvents(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListEventsRequest.- Throws:
ApiException- if the remote call fails
-
listEvents
Lists Events in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listEventsPagedCallable
public final UnaryCallable<ListEventsRequest,StreamsServiceClient.ListEventsPagedResponse> listEventsPagedCallable()Lists Events in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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); } } -
listEventsCallable
Lists Events in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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; } } } -
getEvent
Gets details of a single Event.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
getEvent
Gets details of a single Event.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
getEvent
Gets details of a single Event.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getEventCallable
Gets details of a single Event.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
createEventAsync
public final OperationFuture<Event,OperationMetadata> createEventAsync(ClusterName parent, Event event, String eventId) Creates a new Event in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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(); }- Parameters:
parent- Required. Value for parent.event- Required. The resource being created.eventId- Required. Id of the requesting object.- Throws:
ApiException- if the remote call fails
-
createEventAsync
public final OperationFuture<Event,OperationMetadata> createEventAsync(String parent, Event event, String eventId) Creates a new Event in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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(); }- Parameters:
parent- Required. Value for parent.event- Required. The resource being created.eventId- Required. Id of the requesting object.- Throws:
ApiException- if the remote call fails
-
createEventAsync
Creates a new Event in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createEventOperationCallable
public final OperationCallable<CreateEventRequest,Event, createEventOperationCallable()OperationMetadata> Creates a new Event in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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(); } -
createEventCallable
Creates a new Event in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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(); } -
updateEventAsync
public final OperationFuture<Event,OperationMetadata> updateEventAsync(Event event, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single Event.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
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.- Throws:
ApiException- if the remote call fails
-
updateEventAsync
Updates the parameters of a single Event.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateEventOperationCallable
public final OperationCallable<UpdateEventRequest,Event, updateEventOperationCallable()OperationMetadata> Updates the parameters of a single Event.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
updateEventCallable
Updates the parameters of a single Event.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
deleteEventAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteEventAsync(EventName name) Deletes a single Event.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
deleteEventAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteEventAsync(String name) Deletes a single Event.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
deleteEventAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteEventAsync(DeleteEventRequest request) Deletes a single Event.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteEventOperationCallable
public final OperationCallable<DeleteEventRequest,com.google.protobuf.Empty, deleteEventOperationCallable()OperationMetadata> Deletes a single Event.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
deleteEventCallable
Deletes a single Event.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
listSeries
Lists Series in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) { ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); for (Series element : streamsServiceClient.listSeries(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListSeriesRequest.- Throws:
ApiException- if the remote call fails
-
listSeries
Lists Series in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) { String parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString(); for (Series element : streamsServiceClient.listSeries(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListSeriesRequest.- Throws:
ApiException- if the remote call fails
-
listSeries
Lists Series in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listSeriesPagedCallable
public final UnaryCallable<ListSeriesRequest,StreamsServiceClient.ListSeriesPagedResponse> listSeriesPagedCallable()Lists Series in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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); } } -
listSeriesCallable
Lists Series in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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; } } } -
getSeries
Gets details of a single Series.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
getSeries
Gets details of a single Series.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
getSeries
Gets details of a single Series.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getSeriesCallable
Gets details of a single Series.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
createSeriesAsync
public final OperationFuture<Series,OperationMetadata> createSeriesAsync(ClusterName parent, Series series, String seriesId) Creates a new Series in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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(); }- Parameters:
parent- Required. Value for parent.series- Required. The resource being created.seriesId- Required. Id of the requesting object.- Throws:
ApiException- if the remote call fails
-
createSeriesAsync
public final OperationFuture<Series,OperationMetadata> createSeriesAsync(String parent, Series series, String seriesId) Creates a new Series in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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(); }- Parameters:
parent- Required. Value for parent.series- Required. The resource being created.seriesId- Required. Id of the requesting object.- Throws:
ApiException- if the remote call fails
-
createSeriesAsync
public final OperationFuture<Series,OperationMetadata> createSeriesAsync(CreateSeriesRequest request) Creates a new Series in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createSeriesOperationCallable
public final OperationCallable<CreateSeriesRequest,Series, createSeriesOperationCallable()OperationMetadata> Creates a new Series in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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(); } -
createSeriesCallable
Creates a new Series in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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(); } -
updateSeriesAsync
public final OperationFuture<Series,OperationMetadata> updateSeriesAsync(Series series, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single Event.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
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.- Throws:
ApiException- if the remote call fails
-
updateSeriesAsync
public final OperationFuture<Series,OperationMetadata> updateSeriesAsync(UpdateSeriesRequest request) Updates the parameters of a single Event.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateSeriesOperationCallable
public final OperationCallable<UpdateSeriesRequest,Series, updateSeriesOperationCallable()OperationMetadata> Updates the parameters of a single Event.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
updateSeriesCallable
Updates the parameters of a single Event.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
deleteSeriesAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSeriesAsync(SeriesName name) Deletes a single Series.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
deleteSeriesAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSeriesAsync(String name) Deletes a single Series.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
deleteSeriesAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSeriesAsync(DeleteSeriesRequest request) Deletes a single Series.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteSeriesOperationCallable
public final OperationCallable<DeleteSeriesRequest,com.google.protobuf.Empty, deleteSeriesOperationCallable()OperationMetadata> Deletes a single Series.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
deleteSeriesCallable
Deletes a single Series.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
materializeChannelAsync
public final OperationFuture<Channel,OperationMetadata> materializeChannelAsync(ClusterName parent, Channel channel, String channelId) Materialize a channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
parent- Required. Value for parent.channel- Required. The resource being created.channelId- Required. Id of the channel.- Throws:
ApiException- if the remote call fails
-
materializeChannelAsync
public final OperationFuture<Channel,OperationMetadata> materializeChannelAsync(String parent, Channel channel, String channelId) Materialize a channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
parent- Required. Value for parent.channel- Required. The resource being created.channelId- Required. Id of the channel.- Throws:
ApiException- if the remote call fails
-
materializeChannelAsync
public final OperationFuture<Channel,OperationMetadata> materializeChannelAsync(MaterializeChannelRequest request) Materialize a channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
materializeChannelOperationCallable
public final OperationCallable<MaterializeChannelRequest,Channel, materializeChannelOperationCallable()OperationMetadata> Materialize a channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
materializeChannelCallable
Materialize a channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
listLocations
public final StreamsServiceClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (Location element : streamsServiceClient.listLocations(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listLocationsPagedCallable
public final UnaryCallable<ListLocationsRequest,StreamsServiceClient.ListLocationsPagedResponse> listLocationsPagedCallable()Lists information about the supported locations for this service.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<Location> future = streamsServiceClient.listLocationsPagedCallable().futureCall(request); // Do something. for (Location element : future.get().iterateAll()) { // doThingsWith(element); } } -
listLocationsCallable
Lists information about the supported locations for this service.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListLocationsResponse response = streamsServiceClient.listLocationsCallable().call(request); for (Location element : response.getLocationsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getLocation
Gets information about a location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); Location response = streamsServiceClient.getLocation(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getLocationCallable
Gets information about a location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); ApiFuture<Location> future = streamsServiceClient.getLocationCallable().futureCall(request); // Do something. Location response = future.get(); } -
close
public final void close()- Specified by:
closein interfaceAutoCloseable
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceBackgroundResource
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceBackgroundResource
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceBackgroundResource
-
shutdownNow
public void shutdownNow()- Specified by:
shutdownNowin interfaceBackgroundResource
-
awaitTermination
- Specified by:
awaitTerminationin interfaceBackgroundResource- Throws:
InterruptedException
-