Class StreamsServiceClient

java.lang.Object
com.google.cloud.visionai.v1.StreamsServiceClient
All Implemented Interfaces:
BackgroundResource, AutoCloseable

@Generated("by gapic-generator-java") public class StreamsServiceClient extends Object implements BackgroundResource
Service Description: Service describing handlers for resources. Vision API and Vision AI API are two independent APIs developed by the same team. Vision API is for people to annotate their image while Vision AI is an e2e solution for customer to build their own computer vision application.

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

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

  • listClusters(ListClustersRequest request)

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

  • listClusters(LocationName parent)

  • listClusters(String parent)

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

  • listClustersPagedCallable()

  • listClustersCallable()

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.

  • getCluster(GetClusterRequest request)

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

  • getCluster(ClusterName name)

  • getCluster(String name)

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

  • getClusterCallable()

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.

  • createClusterAsync(CreateClusterRequest request)

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

  • createClusterAsync(LocationName parent, Cluster cluster, String clusterId)

  • createClusterAsync(String parent, Cluster cluster, String clusterId)

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

  • createClusterOperationCallable()

  • createClusterCallable()

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.

  • updateClusterAsync(UpdateClusterRequest request)

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

  • updateClusterAsync(Cluster cluster, FieldMask updateMask)

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

  • updateClusterOperationCallable()

  • updateClusterCallable()

DeleteCluster

Deletes a single Cluster.

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

  • deleteClusterAsync(DeleteClusterRequest request)

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

  • deleteClusterAsync(ClusterName name)

  • deleteClusterAsync(String name)

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

  • deleteClusterOperationCallable()

  • deleteClusterCallable()

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.

  • listStreams(ListStreamsRequest request)

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

  • listStreams(ClusterName parent)

  • listStreams(String parent)

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

  • listStreamsPagedCallable()

  • listStreamsCallable()

GetStream

Gets details of a single Stream.

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

  • getStream(GetStreamRequest request)

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

  • getStream(StreamName name)

  • getStream(String name)

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

  • getStreamCallable()

CreateStream

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.

  • createStreamAsync(CreateStreamRequest request)

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

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

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

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

  • createStreamOperationCallable()

  • createStreamCallable()

UpdateStream

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.

  • updateStreamAsync(UpdateStreamRequest request)

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

  • updateStreamAsync(Stream stream, FieldMask updateMask)

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

  • updateStreamOperationCallable()

  • updateStreamCallable()

DeleteStream

Deletes a single Stream.

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

  • deleteStreamAsync(DeleteStreamRequest request)

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

  • deleteStreamAsync(StreamName name)

  • deleteStreamAsync(String name)

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

  • deleteStreamOperationCallable()

  • deleteStreamCallable()

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.

  • getStreamThumbnailAsync(GetStreamThumbnailRequest request)

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

  • getStreamThumbnailAsync(String stream, String gcsObjectName)

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

  • getStreamThumbnailOperationCallable()

  • getStreamThumbnailCallable()

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.

  • generateStreamHlsToken(GenerateStreamHlsTokenRequest request)

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

  • generateStreamHlsToken(String stream)

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

  • generateStreamHlsTokenCallable()

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.

  • listEvents(ListEventsRequest request)

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

  • listEvents(ClusterName parent)

  • listEvents(String parent)

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

  • listEventsPagedCallable()

  • listEventsCallable()

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.

  • getEvent(GetEventRequest request)

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

  • getEvent(EventName name)

  • getEvent(String name)

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

  • getEventCallable()

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.

  • createEventAsync(CreateEventRequest request)

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

  • createEventAsync(ClusterName parent, Event event, String eventId)

  • createEventAsync(String parent, Event event, String eventId)

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

  • createEventOperationCallable()

  • createEventCallable()

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.

  • updateEventAsync(UpdateEventRequest request)

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

  • updateEventAsync(Event event, FieldMask updateMask)

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

  • updateEventOperationCallable()

  • updateEventCallable()

DeleteEvent

Deletes a single Event.

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

  • deleteEventAsync(DeleteEventRequest request)

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

  • deleteEventAsync(EventName name)

  • deleteEventAsync(String name)

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

  • deleteEventOperationCallable()

  • deleteEventCallable()

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.

  • listSeries(ListSeriesRequest request)

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

  • listSeries(ClusterName parent)

  • listSeries(String parent)

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

  • listSeriesPagedCallable()

  • listSeriesCallable()

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.

  • getSeries(GetSeriesRequest request)

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

  • getSeries(SeriesName name)

  • getSeries(String name)

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

  • getSeriesCallable()

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.

  • createSeriesAsync(CreateSeriesRequest request)

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

  • createSeriesAsync(ClusterName parent, Series series, String seriesId)

  • createSeriesAsync(String parent, Series series, String seriesId)

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

  • createSeriesOperationCallable()

  • createSeriesCallable()

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.

  • updateSeriesAsync(UpdateSeriesRequest request)

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

  • updateSeriesAsync(Series series, FieldMask updateMask)

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

  • updateSeriesOperationCallable()

  • updateSeriesCallable()

DeleteSeries

Deletes a single Series.

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

  • deleteSeriesAsync(DeleteSeriesRequest request)

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

  • deleteSeriesAsync(SeriesName name)

  • deleteSeriesAsync(String name)

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

  • deleteSeriesOperationCallable()

  • deleteSeriesCallable()

MaterializeChannel

Materialize a channel.

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

  • materializeChannelAsync(MaterializeChannelRequest request)

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

  • materializeChannelAsync(ClusterName parent, Channel channel, String channelId)

  • materializeChannelAsync(String parent, Channel channel, String channelId)

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

  • materializeChannelOperationCallable()

  • materializeChannelCallable()

ListLocations

Lists information about the supported locations for this service.

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

  • listLocations(ListLocationsRequest request)

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

  • listLocationsPagedCallable()

  • listLocationsCallable()

GetLocation

Gets information about a location.

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

  • getLocation(GetLocationRequest request)

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

  • getLocationCallable()

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of 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.

  • Constructor Details

    • StreamsServiceClient

      protected StreamsServiceClient(StreamsServiceSettings settings) throws IOException
      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

      protected StreamsServiceClient(StreamsServiceStub stub)
  • Method Details

    • create

      public static final StreamsServiceClient create() throws IOException
      Constructs an instance of StreamsServiceClient with default settings.
      Throws:
      IOException
    • create

      public static final StreamsServiceClient create(StreamsServiceSettings settings) throws IOException
      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

      public static final StreamsServiceClient create(StreamsServiceStub stub)
      Constructs an instance of StreamsServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(StreamsServiceSettings).
    • getSettings

      public final StreamsServiceSettings getSettings()
    • getStub

      public StreamsServiceStub getStub()
    • getOperationsClient

      public final OperationsClient getOperationsClient()
      Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
    • getHttpJsonOperationsClient

      @BetaApi public final OperationsClient getHttpJsonOperationsClient()
      Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
    • 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

      public final StreamsServiceClient.ListClustersPagedResponse listClusters(String parent)
      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

      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

      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

      public final UnaryCallable<ListClustersRequest,ListClustersResponse> 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

      public final Cluster getCluster(ClusterName name)
      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

      public final Cluster getCluster(String name)
      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

      public final Cluster getCluster(GetClusterRequest request)
      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

      public final UnaryCallable<GetClusterRequest,Cluster> 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,OperationMetadata> createClusterOperationCallable()
      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

      public final UnaryCallable<CreateClusterRequest,Operation> 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 updated
      updateMask - 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,OperationMetadata> updateClusterOperationCallable()
      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

      public final UnaryCallable<UpdateClusterRequest,Operation> 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,OperationMetadata> deleteClusterOperationCallable()
      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

      public final UnaryCallable<DeleteClusterRequest,Operation> 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

      public final StreamsServiceClient.ListStreamsPagedResponse listStreams(String parent)
      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

      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

      public final UnaryCallable<ListStreamsRequest,ListStreamsResponse> 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

      public final Stream getStream(StreamName name)
      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

      public final Stream getStream(String name)
      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

      public final Stream getStream(GetStreamRequest request)
      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

      public final UnaryCallable<GetStreamRequest,Stream> 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,OperationMetadata> createStreamOperationCallable()
      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

      public final UnaryCallable<CreateStreamRequest,Operation> 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,OperationMetadata> updateStreamOperationCallable()
      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

      public final UnaryCallable<UpdateStreamRequest,Operation> 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,OperationMetadata> deleteStreamOperationCallable()
      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

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

      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,OperationMetadata> getStreamThumbnailOperationCallable()
      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

      public final UnaryCallable<GetStreamThumbnailRequest,Operation> 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

      public final GenerateStreamHlsTokenResponse generateStreamHlsToken(String stream)
      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

      public final StreamsServiceClient.ListEventsPagedResponse listEvents(String parent)
      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

      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

      public final UnaryCallable<ListEventsRequest,ListEventsResponse> 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

      public final Event getEvent(EventName name)
      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

      public final Event getEvent(String name)
      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

      public final Event getEvent(GetEventRequest request)
      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

      public final UnaryCallable<GetEventRequest,Event> 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

      public final OperationFuture<Event,OperationMetadata> createEventAsync(CreateEventRequest request)
      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,OperationMetadata> createEventOperationCallable()
      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

      public final UnaryCallable<CreateEventRequest,Operation> 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

      public final OperationFuture<Event,OperationMetadata> updateEventAsync(UpdateEventRequest 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()) {
         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,OperationMetadata> updateEventOperationCallable()
      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

      public final UnaryCallable<UpdateEventRequest,Operation> 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,OperationMetadata> deleteEventOperationCallable()
      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

      public final UnaryCallable<DeleteEventRequest,Operation> 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

      public final StreamsServiceClient.ListSeriesPagedResponse listSeries(String parent)
      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

      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

      public final UnaryCallable<ListSeriesRequest,ListSeriesResponse> 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

      public final Series getSeries(SeriesName name)
      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

      public final Series getSeries(String name)
      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

      public final Series getSeries(GetSeriesRequest request)
      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

      public final UnaryCallable<GetSeriesRequest,Series> 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,OperationMetadata> createSeriesOperationCallable()
      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

      public final UnaryCallable<CreateSeriesRequest,Operation> 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 updated
      updateMask - 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,OperationMetadata> updateSeriesOperationCallable()
      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

      public final UnaryCallable<UpdateSeriesRequest,Operation> 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,OperationMetadata> deleteSeriesOperationCallable()
      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

      public final UnaryCallable<DeleteSeriesRequest,Operation> 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,OperationMetadata> materializeChannelOperationCallable()
      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

      public final UnaryCallable<MaterializeChannelRequest,Operation> 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

      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

      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

      public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()
      Lists information about the supported locations for this service.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (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

      public final Location getLocation(GetLocationRequest request)
      Gets information about a location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (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

      public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()
      Gets information about a location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (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:
      close in interface AutoCloseable
    • shutdown

      public void shutdown()
      Specified by:
      shutdown in interface BackgroundResource
    • isShutdown

      public boolean isShutdown()
      Specified by:
      isShutdown in interface BackgroundResource
    • isTerminated

      public boolean isTerminated()
      Specified by:
      isTerminated in interface BackgroundResource
    • shutdownNow

      public void shutdownNow()
      Specified by:
      shutdownNow in interface BackgroundResource
    • awaitTermination

      public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException
      Specified by:
      awaitTermination in interface BackgroundResource
      Throws:
      InterruptedException