Class LivestreamServiceClient

java.lang.Object
com.google.cloud.video.livestream.v1.LivestreamServiceClient
All Implemented Interfaces:
BackgroundResource, AutoCloseable

@Generated("by gapic-generator-java") public class LivestreamServiceClient extends Object implements BackgroundResource
Service Description: Using Live Stream API, you can generate live streams in the various renditions and streaming formats. The streaming format include HTTP Live Streaming (HLS) and Dynamic Adaptive Streaming over HTTP (DASH). You can send a source stream in the various ways, including Real-Time Messaging Protocol (RTMP) and Secure Reliable Transport (SRT).

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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
   ChannelName name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]");
   Channel response = livestreamServiceClient.getChannel(name);
 }
 

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

CreateChannel

Creates a channel with the provided unique ID in the specified region.

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

  • createChannelAsync(CreateChannelRequest request)

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

  • createChannelAsync(LocationName parent, Channel channel, String channelId)

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

  • createChannelOperationCallable()

  • createChannelCallable()

ListChannels

Returns a list of all channels in the specified region.

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

  • listChannels(ListChannelsRequest request)

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

  • listChannels(LocationName parent)

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

  • listChannelsPagedCallable()

  • listChannelsCallable()

GetChannel

Returns the specified channel.

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

  • getChannel(GetChannelRequest request)

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

  • getChannel(ChannelName name)

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

  • getChannelCallable()

DeleteChannel

Deletes the specified channel.

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

  • deleteChannelAsync(DeleteChannelRequest request)

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

  • deleteChannelAsync(ChannelName name)

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

  • deleteChannelOperationCallable()

  • deleteChannelCallable()

UpdateChannel

Updates the specified channel.

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

  • updateChannelAsync(UpdateChannelRequest request)

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

  • updateChannelAsync(Channel channel, 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.

  • updateChannelOperationCallable()

  • updateChannelCallable()

StartChannel

Starts the specified channel. Part of the video pipeline will be created only when the StartChannel request is received by the server.

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

  • startChannelAsync(StartChannelRequest request)

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

  • startChannelAsync(ChannelName name)

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

  • startChannelOperationCallable()

  • startChannelCallable()

StopChannel

Stops the specified channel. Part of the video pipeline will be released when the StopChannel request is received by the server.

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

  • stopChannelAsync(StopChannelRequest request)

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

  • stopChannelAsync(ChannelName name)

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

  • stopChannelOperationCallable()

  • stopChannelCallable()

StartDistribution

Starts distribution which delivers outputs to the destination indicated by the Distribution configuration.

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

  • startDistributionAsync(StartDistributionRequest request)

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

  • startDistributionAsync(ChannelName name, List<String> distributionKeys)

  • startDistributionAsync(String name, List<String> distributionKeys)

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

  • startDistributionOperationCallable()

  • startDistributionCallable()

StopDistribution

Stops the specified distribution.

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

  • stopDistributionAsync(StopDistributionRequest request)

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

  • stopDistributionAsync(ChannelName name, List<String> distributionKeys)

  • stopDistributionAsync(String name, List<String> distributionKeys)

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

  • stopDistributionOperationCallable()

  • stopDistributionCallable()

CreateInput

Creates an input with the provided unique ID in the specified region.

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

  • createInputAsync(CreateInputRequest request)

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

  • createInputAsync(LocationName parent, Input input, String inputId)

  • createInputAsync(String parent, Input input, String inputId)

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

  • createInputOperationCallable()

  • createInputCallable()

ListInputs

Returns a list of all inputs in the specified region.

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

  • listInputs(ListInputsRequest request)

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

  • listInputs(LocationName parent)

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

  • listInputsPagedCallable()

  • listInputsCallable()

GetInput

Returns the specified input.

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

  • getInput(GetInputRequest request)

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

  • getInput(InputName name)

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

  • getInputCallable()

DeleteInput

Deletes the specified input.

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

  • deleteInputAsync(DeleteInputRequest request)

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

  • deleteInputAsync(InputName name)

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

  • deleteInputOperationCallable()

  • deleteInputCallable()

UpdateInput

Updates the specified input.

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

  • updateInputAsync(UpdateInputRequest request)

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

  • updateInputAsync(Input input, 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.

  • updateInputOperationCallable()

  • updateInputCallable()

PreviewInput

Preview the streaming content of the specified input.

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

  • previewInput(PreviewInputRequest request)

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

  • previewInput(InputName name)

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

  • previewInputCallable()

CreateEvent

Creates an event with the provided unique ID in the specified channel.

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

  • createEvent(CreateEventRequest request)

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

  • createEvent(ChannelName parent, Event event, String eventId)

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

  • createEventCallable()

ListEvents

Returns a list of all events in the specified channel.

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

Returns the specified 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()

DeleteEvent

Deletes the specified event.

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

  • deleteEvent(DeleteEventRequest request)

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

  • deleteEvent(EventName name)

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

  • deleteEventCallable()

ListClips

Returns a list of all clips in the specified channel.

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

  • listClips(ListClipsRequest request)

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

  • listClips(ChannelName parent)

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

  • listClipsPagedCallable()

  • listClipsCallable()

GetClip

Returns the specified clip.

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

  • getClip(GetClipRequest request)

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

  • getClip(ClipName name)

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

  • getClipCallable()

CreateClip

Creates a clip with the provided clip ID in the specified channel.

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

  • createClipAsync(CreateClipRequest request)

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

  • createClipAsync(ChannelName parent, Clip clip, String clipId)

  • createClipAsync(String parent, Clip clip, String clipId)

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

  • createClipOperationCallable()

  • createClipCallable()

DeleteClip

Deletes the specified clip job resource. This method only deletes the clip job and does not delete the VOD clip stored in Cloud Storage.

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

  • deleteClipAsync(DeleteClipRequest request)

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

  • deleteClipAsync(ClipName name)

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

  • deleteClipOperationCallable()

  • deleteClipCallable()

CreateDvrSession

Creates a DVR session with the provided unique ID in the specified channel.

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

  • createDvrSessionAsync(CreateDvrSessionRequest request)

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

  • createDvrSessionAsync(ChannelName parent, DvrSession dvrSession, String dvrSessionId)

  • createDvrSessionAsync(String parent, DvrSession dvrSession, String dvrSessionId)

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

  • createDvrSessionOperationCallable()

  • createDvrSessionCallable()

ListDvrSessions

Returns a list of all DVR sessions in the specified channel.

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

  • listDvrSessions(ListDvrSessionsRequest request)

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

  • listDvrSessions(ChannelName parent)

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

  • listDvrSessionsPagedCallable()

  • listDvrSessionsCallable()

GetDvrSession

Returns the specified DVR session.

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

  • getDvrSession(GetDvrSessionRequest request)

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

  • getDvrSession(DvrSessionName name)

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

  • getDvrSessionCallable()

DeleteDvrSession

Deletes the specified DVR session.

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

  • deleteDvrSessionAsync(DeleteDvrSessionRequest request)

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

  • deleteDvrSessionAsync(DvrSessionName name)

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

  • deleteDvrSessionOperationCallable()

  • deleteDvrSessionCallable()

UpdateDvrSession

Updates the specified DVR session.

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

  • updateDvrSessionAsync(UpdateDvrSessionRequest request)

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

  • updateDvrSessionAsync(DvrSession dvrSession, 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.

  • updateDvrSessionOperationCallable()

  • updateDvrSessionCallable()

CreateAsset

Creates a Asset with the provided unique ID in the specified region.

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

  • createAssetAsync(CreateAssetRequest request)

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

  • createAssetAsync(LocationName parent, Asset asset, String assetId)

  • createAssetAsync(String parent, Asset asset, String assetId)

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

  • createAssetOperationCallable()

  • createAssetCallable()

DeleteAsset

Deletes the specified asset if it is not used.

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

  • deleteAssetAsync(DeleteAssetRequest request)

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

  • deleteAssetAsync(AssetName name)

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

  • deleteAssetOperationCallable()

  • deleteAssetCallable()

GetAsset

Returns the specified asset.

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

  • getAsset(GetAssetRequest request)

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

  • getAsset(AssetName name)

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

  • getAssetCallable()

ListAssets

Returns a list of all assets in the specified region.

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

  • listAssets(ListAssetsRequest request)

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

  • listAssets(LocationName parent)

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

  • listAssetsPagedCallable()

  • listAssetsCallable()

GetPool

Returns the specified pool.

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

  • getPool(GetPoolRequest request)

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

  • getPool(PoolName name)

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

  • getPoolCallable()

UpdatePool

Updates the specified pool.

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

  • updatePoolAsync(UpdatePoolRequest request)

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

  • updatePoolAsync(Pool pool, 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.

  • updatePoolOperationCallable()

  • updatePoolCallable()

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 LivestreamServiceSettings 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
 LivestreamServiceSettings livestreamServiceSettings =
     LivestreamServiceSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 LivestreamServiceClient livestreamServiceClient =
     LivestreamServiceClient.create(livestreamServiceSettings);
 

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
 LivestreamServiceSettings livestreamServiceSettings =
     LivestreamServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 LivestreamServiceClient livestreamServiceClient =
     LivestreamServiceClient.create(livestreamServiceSettings);
 

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
 LivestreamServiceSettings livestreamServiceSettings =
     LivestreamServiceSettings.newHttpJsonBuilder().build();
 LivestreamServiceClient livestreamServiceClient =
     LivestreamServiceClient.create(livestreamServiceSettings);
 

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

  • Constructor Details

    • LivestreamServiceClient

      protected LivestreamServiceClient(LivestreamServiceSettings settings) throws IOException
      Constructs an instance of LivestreamServiceClient, 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
    • LivestreamServiceClient

      protected LivestreamServiceClient(LivestreamServiceStub stub)
  • Method Details

    • create

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

      public static final LivestreamServiceClient create(LivestreamServiceSettings settings) throws IOException
      Constructs an instance of LivestreamServiceClient, 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 LivestreamServiceClient create(LivestreamServiceStub stub)
      Constructs an instance of LivestreamServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(LivestreamServiceSettings).
    • getSettings

      public final LivestreamServiceSettings getSettings()
    • getStub

      public LivestreamServiceStub 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.
    • createChannelAsync

      public final OperationFuture<Channel,OperationMetadata> createChannelAsync(LocationName parent, Channel channel, String channelId)
      Creates a channel with the provided unique ID in the specified region.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         Channel channel = Channel.newBuilder().build();
         String channelId = "channelId1461735806";
         Channel response =
             livestreamServiceClient.createChannelAsync(parent, channel, channelId).get();
       }
       
      Parameters:
      parent - Required. The parent location for the resource, in the form of: `projects/{project}/locations/{location}`.
      channel - Required. The channel resource to be created.
      channelId - Required. The ID of the channel resource to be created.

      This value must be 1-63 characters, begin and end with a lower-case letter or a number, and consist of only lower-case letters, numbers, and hyphens. In other words, it must match the following regex: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.

      Throws:
      ApiException - if the remote call fails
    • createChannelAsync

      public final OperationFuture<Channel,OperationMetadata> createChannelAsync(String parent, Channel channel, String channelId)
      Creates a channel with the provided unique ID in the specified region.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         Channel channel = Channel.newBuilder().build();
         String channelId = "channelId1461735806";
         Channel response =
             livestreamServiceClient.createChannelAsync(parent, channel, channelId).get();
       }
       
      Parameters:
      parent - Required. The parent location for the resource, in the form of: `projects/{project}/locations/{location}`.
      channel - Required. The channel resource to be created.
      channelId - Required. The ID of the channel resource to be created.

      This value must be 1-63 characters, begin and end with a lower-case letter or a number, and consist of only lower-case letters, numbers, and hyphens. In other words, it must match the following regex: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.

      Throws:
      ApiException - if the remote call fails
    • createChannelAsync

      public final OperationFuture<Channel,OperationMetadata> createChannelAsync(CreateChannelRequest request)
      Creates a channel with the provided unique ID in the specified region.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         CreateChannelRequest request =
             CreateChannelRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setChannel(Channel.newBuilder().build())
                 .setChannelId("channelId1461735806")
                 .setRequestId("requestId693933066")
                 .build();
         Channel response = livestreamServiceClient.createChannelAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createChannelOperationCallable

      public final OperationCallable<CreateChannelRequest,Channel,OperationMetadata> createChannelOperationCallable()
      Creates a channel with the provided unique ID in the specified region.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         CreateChannelRequest request =
             CreateChannelRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setChannel(Channel.newBuilder().build())
                 .setChannelId("channelId1461735806")
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Channel, OperationMetadata> future =
             livestreamServiceClient.createChannelOperationCallable().futureCall(request);
         // Do something.
         Channel response = future.get();
       }
       
    • createChannelCallable

      public final UnaryCallable<CreateChannelRequest,Operation> createChannelCallable()
      Creates a channel with the provided unique ID in the specified region.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         CreateChannelRequest request =
             CreateChannelRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setChannel(Channel.newBuilder().build())
                 .setChannelId("channelId1461735806")
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             livestreamServiceClient.createChannelCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • listChannels

      Returns a list of all channels in the specified region.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (Channel element : livestreamServiceClient.listChannels(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent location for the resource, in the form of: `projects/{project}/locations/{location}`.
      Throws:
      ApiException - if the remote call fails
    • listChannels

      public final LivestreamServiceClient.ListChannelsPagedResponse listChannels(String parent)
      Returns a list of all channels in the specified region.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (Channel element : livestreamServiceClient.listChannels(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent location for the resource, in the form of: `projects/{project}/locations/{location}`.
      Throws:
      ApiException - if the remote call fails
    • listChannels

      Returns a list of all channels in the specified region.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ListChannelsRequest request =
             ListChannelsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         for (Channel element : livestreamServiceClient.listChannels(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
    • listChannelsPagedCallable

      Returns a list of all channels in the specified region.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ListChannelsRequest request =
             ListChannelsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         ApiFuture<Channel> future =
             livestreamServiceClient.listChannelsPagedCallable().futureCall(request);
         // Do something.
         for (Channel element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listChannelsCallable

      public final UnaryCallable<ListChannelsRequest,ListChannelsResponse> listChannelsCallable()
      Returns a list of all channels in the specified region.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ListChannelsRequest request =
             ListChannelsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         while (true) {
           ListChannelsResponse response =
               livestreamServiceClient.listChannelsCallable().call(request);
           for (Channel element : response.getChannelsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getChannel

      public final Channel getChannel(ChannelName name)
      Returns the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ChannelName name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]");
         Channel response = livestreamServiceClient.getChannel(name);
       }
       
      Parameters:
      name - Required. The name of the channel resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}`.
      Throws:
      ApiException - if the remote call fails
    • getChannel

      public final Channel getChannel(String name)
      Returns the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         String name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString();
         Channel response = livestreamServiceClient.getChannel(name);
       }
       
      Parameters:
      name - Required. The name of the channel resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}`.
      Throws:
      ApiException - if the remote call fails
    • getChannel

      public final Channel getChannel(GetChannelRequest request)
      Returns the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         GetChannelRequest request =
             GetChannelRequest.newBuilder()
                 .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .build();
         Channel response = livestreamServiceClient.getChannel(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getChannelCallable

      public final UnaryCallable<GetChannelRequest,Channel> getChannelCallable()
      Returns the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         GetChannelRequest request =
             GetChannelRequest.newBuilder()
                 .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .build();
         ApiFuture<Channel> future = livestreamServiceClient.getChannelCallable().futureCall(request);
         // Do something.
         Channel response = future.get();
       }
       
    • deleteChannelAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteChannelAsync(ChannelName name)
      Deletes the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ChannelName name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]");
         livestreamServiceClient.deleteChannelAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of the channel resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}`.
      Throws:
      ApiException - if the remote call fails
    • deleteChannelAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteChannelAsync(String name)
      Deletes the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         String name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString();
         livestreamServiceClient.deleteChannelAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of the channel resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}`.
      Throws:
      ApiException - if the remote call fails
    • deleteChannelAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteChannelAsync(DeleteChannelRequest request)
      Deletes the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         DeleteChannelRequest request =
             DeleteChannelRequest.newBuilder()
                 .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .setRequestId("requestId693933066")
                 .setForce(true)
                 .build();
         livestreamServiceClient.deleteChannelAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteChannelOperationCallable

      public final OperationCallable<DeleteChannelRequest,com.google.protobuf.Empty,OperationMetadata> deleteChannelOperationCallable()
      Deletes the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         DeleteChannelRequest request =
             DeleteChannelRequest.newBuilder()
                 .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .setRequestId("requestId693933066")
                 .setForce(true)
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             livestreamServiceClient.deleteChannelOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteChannelCallable

      public final UnaryCallable<DeleteChannelRequest,Operation> deleteChannelCallable()
      Deletes the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         DeleteChannelRequest request =
             DeleteChannelRequest.newBuilder()
                 .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .setRequestId("requestId693933066")
                 .setForce(true)
                 .build();
         ApiFuture<Operation> future =
             livestreamServiceClient.deleteChannelCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • updateChannelAsync

      public final OperationFuture<Channel,OperationMetadata> updateChannelAsync(Channel channel, com.google.protobuf.FieldMask updateMask)
      Updates the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         Channel channel = Channel.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         Channel response = livestreamServiceClient.updateChannelAsync(channel, updateMask).get();
       }
       
      Parameters:
      channel - Required. The channel resource to be updated.
      updateMask - Field mask is used to specify the fields to be overwritten in the Channel resource by the update. You can only update the following fields:
      • [`inputAttachments`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment)
      • [`inputConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig)
      • [`output`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output)
      • [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream)
      • [`muxStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream)
      • [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest)
      • [`spriteSheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet)
      • [`logConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig)
      • [`timecodeConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig)
      • [`encryptions`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption)

      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 mask is not present, then each field from the list above is updated if the field appears in the request payload. To unset a field, add the field to the update mask and remove it from the request payload.

      Throws:
      ApiException - if the remote call fails
    • updateChannelAsync

      public final OperationFuture<Channel,OperationMetadata> updateChannelAsync(UpdateChannelRequest request)
      Updates the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         UpdateChannelRequest request =
             UpdateChannelRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setChannel(Channel.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         Channel response = livestreamServiceClient.updateChannelAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateChannelOperationCallable

      public final OperationCallable<UpdateChannelRequest,Channel,OperationMetadata> updateChannelOperationCallable()
      Updates the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         UpdateChannelRequest request =
             UpdateChannelRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setChannel(Channel.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Channel, OperationMetadata> future =
             livestreamServiceClient.updateChannelOperationCallable().futureCall(request);
         // Do something.
         Channel response = future.get();
       }
       
    • updateChannelCallable

      public final UnaryCallable<UpdateChannelRequest,Operation> updateChannelCallable()
      Updates the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         UpdateChannelRequest request =
             UpdateChannelRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setChannel(Channel.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             livestreamServiceClient.updateChannelCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • startChannelAsync

      Starts the specified channel. Part of the video pipeline will be created only when the StartChannel request is received by the server.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ChannelName name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]");
         ChannelOperationResponse response = livestreamServiceClient.startChannelAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of the channel resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}`.
      Throws:
      ApiException - if the remote call fails
    • startChannelAsync

      public final OperationFuture<ChannelOperationResponse,OperationMetadata> startChannelAsync(String name)
      Starts the specified channel. Part of the video pipeline will be created only when the StartChannel request is received by the server.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         String name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString();
         ChannelOperationResponse response = livestreamServiceClient.startChannelAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of the channel resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}`.
      Throws:
      ApiException - if the remote call fails
    • startChannelAsync

      Starts the specified channel. Part of the video pipeline will be created only when the StartChannel request is received by the server.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         StartChannelRequest request =
             StartChannelRequest.newBuilder()
                 .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         ChannelOperationResponse response = livestreamServiceClient.startChannelAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • startChannelOperationCallable

      Starts the specified channel. Part of the video pipeline will be created only when the StartChannel request is received by the server.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         StartChannelRequest request =
             StartChannelRequest.newBuilder()
                 .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<ChannelOperationResponse, OperationMetadata> future =
             livestreamServiceClient.startChannelOperationCallable().futureCall(request);
         // Do something.
         ChannelOperationResponse response = future.get();
       }
       
    • startChannelCallable

      public final UnaryCallable<StartChannelRequest,Operation> startChannelCallable()
      Starts the specified channel. Part of the video pipeline will be created only when the StartChannel request is received by the server.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         StartChannelRequest request =
             StartChannelRequest.newBuilder()
                 .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             livestreamServiceClient.startChannelCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • stopChannelAsync

      Stops the specified channel. Part of the video pipeline will be released when the StopChannel request is received by the server.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ChannelName name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]");
         ChannelOperationResponse response = livestreamServiceClient.stopChannelAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of the channel resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}`.
      Throws:
      ApiException - if the remote call fails
    • stopChannelAsync

      public final OperationFuture<ChannelOperationResponse,OperationMetadata> stopChannelAsync(String name)
      Stops the specified channel. Part of the video pipeline will be released when the StopChannel request is received by the server.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         String name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString();
         ChannelOperationResponse response = livestreamServiceClient.stopChannelAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of the channel resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}`.
      Throws:
      ApiException - if the remote call fails
    • stopChannelAsync

      Stops the specified channel. Part of the video pipeline will be released when the StopChannel request is received by the server.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         StopChannelRequest request =
             StopChannelRequest.newBuilder()
                 .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         ChannelOperationResponse response = livestreamServiceClient.stopChannelAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • stopChannelOperationCallable

      Stops the specified channel. Part of the video pipeline will be released when the StopChannel request is received by the server.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         StopChannelRequest request =
             StopChannelRequest.newBuilder()
                 .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<ChannelOperationResponse, OperationMetadata> future =
             livestreamServiceClient.stopChannelOperationCallable().futureCall(request);
         // Do something.
         ChannelOperationResponse response = future.get();
       }
       
    • stopChannelCallable

      public final UnaryCallable<StopChannelRequest,Operation> stopChannelCallable()
      Stops the specified channel. Part of the video pipeline will be released when the StopChannel request is received by the server.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         StopChannelRequest request =
             StopChannelRequest.newBuilder()
                 .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             livestreamServiceClient.stopChannelCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • startDistributionAsync

      public final OperationFuture<ChannelOperationResponse,OperationMetadata> startDistributionAsync(ChannelName name, List<String> distributionKeys)
      Starts distribution which delivers outputs to the destination indicated by the Distribution configuration.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ChannelName name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]");
         List<String> distributionKeys = new ArrayList<>();
         ChannelOperationResponse response =
             livestreamServiceClient.startDistributionAsync(name, distributionKeys).get();
       }
       
      Parameters:
      name - Required. The name of the channel resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}`.
      distributionKeys - Optional. A list of keys to identify the distribution configuration in the channel resource. If left empty, all the distributions in the channel specification will be started.
      Throws:
      ApiException - if the remote call fails
    • startDistributionAsync

      public final OperationFuture<ChannelOperationResponse,OperationMetadata> startDistributionAsync(String name, List<String> distributionKeys)
      Starts distribution which delivers outputs to the destination indicated by the Distribution configuration.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         String name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString();
         List<String> distributionKeys = new ArrayList<>();
         ChannelOperationResponse response =
             livestreamServiceClient.startDistributionAsync(name, distributionKeys).get();
       }
       
      Parameters:
      name - Required. The name of the channel resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}`.
      distributionKeys - Optional. A list of keys to identify the distribution configuration in the channel resource. If left empty, all the distributions in the channel specification will be started.
      Throws:
      ApiException - if the remote call fails
    • startDistributionAsync

      Starts distribution which delivers outputs to the destination indicated by the Distribution configuration.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         StartDistributionRequest request =
             StartDistributionRequest.newBuilder()
                 .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .addAllDistributionKeys(new ArrayList<String>())
                 .setRequestId("requestId693933066")
                 .build();
         ChannelOperationResponse response =
             livestreamServiceClient.startDistributionAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • startDistributionOperationCallable

      public final OperationCallable<StartDistributionRequest,ChannelOperationResponse,OperationMetadata> startDistributionOperationCallable()
      Starts distribution which delivers outputs to the destination indicated by the Distribution configuration.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         StartDistributionRequest request =
             StartDistributionRequest.newBuilder()
                 .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .addAllDistributionKeys(new ArrayList<String>())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<ChannelOperationResponse, OperationMetadata> future =
             livestreamServiceClient.startDistributionOperationCallable().futureCall(request);
         // Do something.
         ChannelOperationResponse response = future.get();
       }
       
    • startDistributionCallable

      public final UnaryCallable<StartDistributionRequest,Operation> startDistributionCallable()
      Starts distribution which delivers outputs to the destination indicated by the Distribution configuration.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         StartDistributionRequest request =
             StartDistributionRequest.newBuilder()
                 .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .addAllDistributionKeys(new ArrayList<String>())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             livestreamServiceClient.startDistributionCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • stopDistributionAsync

      public final OperationFuture<ChannelOperationResponse,OperationMetadata> stopDistributionAsync(ChannelName name, List<String> distributionKeys)
      Stops the specified distribution.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ChannelName name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]");
         List<String> distributionKeys = new ArrayList<>();
         ChannelOperationResponse response =
             livestreamServiceClient.stopDistributionAsync(name, distributionKeys).get();
       }
       
      Parameters:
      name - Required. The name of the channel resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}`.
      distributionKeys - Optional. A list of key to identify the distribution configuration in the channel resource. If left empty, all the distributions in the channel specification will be stopped.
      Throws:
      ApiException - if the remote call fails
    • stopDistributionAsync

      public final OperationFuture<ChannelOperationResponse,OperationMetadata> stopDistributionAsync(String name, List<String> distributionKeys)
      Stops the specified distribution.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         String name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString();
         List<String> distributionKeys = new ArrayList<>();
         ChannelOperationResponse response =
             livestreamServiceClient.stopDistributionAsync(name, distributionKeys).get();
       }
       
      Parameters:
      name - Required. The name of the channel resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}`.
      distributionKeys - Optional. A list of key to identify the distribution configuration in the channel resource. If left empty, all the distributions in the channel specification will be stopped.
      Throws:
      ApiException - if the remote call fails
    • stopDistributionAsync

      Stops the specified distribution.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         StopDistributionRequest request =
             StopDistributionRequest.newBuilder()
                 .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .addAllDistributionKeys(new ArrayList<String>())
                 .setRequestId("requestId693933066")
                 .build();
         ChannelOperationResponse response =
             livestreamServiceClient.stopDistributionAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • stopDistributionOperationCallable

      public final OperationCallable<StopDistributionRequest,ChannelOperationResponse,OperationMetadata> stopDistributionOperationCallable()
      Stops the specified distribution.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         StopDistributionRequest request =
             StopDistributionRequest.newBuilder()
                 .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .addAllDistributionKeys(new ArrayList<String>())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<ChannelOperationResponse, OperationMetadata> future =
             livestreamServiceClient.stopDistributionOperationCallable().futureCall(request);
         // Do something.
         ChannelOperationResponse response = future.get();
       }
       
    • stopDistributionCallable

      public final UnaryCallable<StopDistributionRequest,Operation> stopDistributionCallable()
      Stops the specified distribution.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         StopDistributionRequest request =
             StopDistributionRequest.newBuilder()
                 .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .addAllDistributionKeys(new ArrayList<String>())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             livestreamServiceClient.stopDistributionCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • createInputAsync

      public final OperationFuture<Input,OperationMetadata> createInputAsync(LocationName parent, Input input, String inputId)
      Creates an input with the provided unique ID in the specified region.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         Input input = Input.newBuilder().build();
         String inputId = "inputId1954846341";
         Input response = livestreamServiceClient.createInputAsync(parent, input, inputId).get();
       }
       
      Parameters:
      parent - Required. The parent location for the resource, in the form of: `projects/{project}/locations/{location}`.
      input - Required. The input resource to be created.
      inputId - Required. The ID of the input resource to be created.

      This value must be 1-63 characters, begin and end with a lower-case letter or a number, and consist of only lower-case letters, numbers, and hyphens. In other words, it must match the following regex: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.

      Throws:
      ApiException - if the remote call fails
    • createInputAsync

      public final OperationFuture<Input,OperationMetadata> createInputAsync(String parent, Input input, String inputId)
      Creates an input with the provided unique ID in the specified region.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         Input input = Input.newBuilder().build();
         String inputId = "inputId1954846341";
         Input response = livestreamServiceClient.createInputAsync(parent, input, inputId).get();
       }
       
      Parameters:
      parent - Required. The parent location for the resource, in the form of: `projects/{project}/locations/{location}`.
      input - Required. The input resource to be created.
      inputId - Required. The ID of the input resource to be created.

      This value must be 1-63 characters, begin and end with a lower-case letter or a number, and consist of only lower-case letters, numbers, and hyphens. In other words, it must match the following regex: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.

      Throws:
      ApiException - if the remote call fails
    • createInputAsync

      public final OperationFuture<Input,OperationMetadata> createInputAsync(CreateInputRequest request)
      Creates an input with the provided unique ID in the specified region.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         CreateInputRequest request =
             CreateInputRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setInput(Input.newBuilder().build())
                 .setInputId("inputId1954846341")
                 .setRequestId("requestId693933066")
                 .build();
         Input response = livestreamServiceClient.createInputAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createInputOperationCallable

      public final OperationCallable<CreateInputRequest,Input,OperationMetadata> createInputOperationCallable()
      Creates an input with the provided unique ID in the specified region.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         CreateInputRequest request =
             CreateInputRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setInput(Input.newBuilder().build())
                 .setInputId("inputId1954846341")
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Input, OperationMetadata> future =
             livestreamServiceClient.createInputOperationCallable().futureCall(request);
         // Do something.
         Input response = future.get();
       }
       
    • createInputCallable

      public final UnaryCallable<CreateInputRequest,Operation> createInputCallable()
      Creates an input with the provided unique ID in the specified region.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         CreateInputRequest request =
             CreateInputRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setInput(Input.newBuilder().build())
                 .setInputId("inputId1954846341")
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             livestreamServiceClient.createInputCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • listInputs

      Returns a list of all inputs in the specified region.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (Input element : livestreamServiceClient.listInputs(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent location for the resource, in the form of: `projects/{project}/locations/{location}`.
      Throws:
      ApiException - if the remote call fails
    • listInputs

      public final LivestreamServiceClient.ListInputsPagedResponse listInputs(String parent)
      Returns a list of all inputs in the specified region.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (Input element : livestreamServiceClient.listInputs(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent location for the resource, in the form of: `projects/{project}/locations/{location}`.
      Throws:
      ApiException - if the remote call fails
    • listInputs

      Returns a list of all inputs in the specified region.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ListInputsRequest request =
             ListInputsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         for (Input element : livestreamServiceClient.listInputs(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
    • listInputsPagedCallable

      Returns a list of all inputs in the specified region.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ListInputsRequest request =
             ListInputsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         ApiFuture<Input> future =
             livestreamServiceClient.listInputsPagedCallable().futureCall(request);
         // Do something.
         for (Input element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listInputsCallable

      public final UnaryCallable<ListInputsRequest,ListInputsResponse> listInputsCallable()
      Returns a list of all inputs in the specified region.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ListInputsRequest request =
             ListInputsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         while (true) {
           ListInputsResponse response = livestreamServiceClient.listInputsCallable().call(request);
           for (Input element : response.getInputsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getInput

      public final Input getInput(InputName name)
      Returns the specified input.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         InputName name = InputName.of("[PROJECT]", "[LOCATION]", "[INPUT]");
         Input response = livestreamServiceClient.getInput(name);
       }
       
      Parameters:
      name - Required. The name of the input resource, in the form of: `projects/{project}/locations/{location}/inputs/{inputId}`.
      Throws:
      ApiException - if the remote call fails
    • getInput

      public final Input getInput(String name)
      Returns the specified input.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         String name = InputName.of("[PROJECT]", "[LOCATION]", "[INPUT]").toString();
         Input response = livestreamServiceClient.getInput(name);
       }
       
      Parameters:
      name - Required. The name of the input resource, in the form of: `projects/{project}/locations/{location}/inputs/{inputId}`.
      Throws:
      ApiException - if the remote call fails
    • getInput

      public final Input getInput(GetInputRequest request)
      Returns the specified input.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         GetInputRequest request =
             GetInputRequest.newBuilder()
                 .setName(InputName.of("[PROJECT]", "[LOCATION]", "[INPUT]").toString())
                 .build();
         Input response = livestreamServiceClient.getInput(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getInputCallable

      public final UnaryCallable<GetInputRequest,Input> getInputCallable()
      Returns the specified input.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         GetInputRequest request =
             GetInputRequest.newBuilder()
                 .setName(InputName.of("[PROJECT]", "[LOCATION]", "[INPUT]").toString())
                 .build();
         ApiFuture<Input> future = livestreamServiceClient.getInputCallable().futureCall(request);
         // Do something.
         Input response = future.get();
       }
       
    • deleteInputAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteInputAsync(InputName name)
      Deletes the specified input.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         InputName name = InputName.of("[PROJECT]", "[LOCATION]", "[INPUT]");
         livestreamServiceClient.deleteInputAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of the input resource, in the form of: `projects/{project}/locations/{location}/inputs/{inputId}`.
      Throws:
      ApiException - if the remote call fails
    • deleteInputAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteInputAsync(String name)
      Deletes the specified input.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         String name = InputName.of("[PROJECT]", "[LOCATION]", "[INPUT]").toString();
         livestreamServiceClient.deleteInputAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of the input resource, in the form of: `projects/{project}/locations/{location}/inputs/{inputId}`.
      Throws:
      ApiException - if the remote call fails
    • deleteInputAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteInputAsync(DeleteInputRequest request)
      Deletes the specified input.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         DeleteInputRequest request =
             DeleteInputRequest.newBuilder()
                 .setName(InputName.of("[PROJECT]", "[LOCATION]", "[INPUT]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         livestreamServiceClient.deleteInputAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteInputOperationCallable

      public final OperationCallable<DeleteInputRequest,com.google.protobuf.Empty,OperationMetadata> deleteInputOperationCallable()
      Deletes the specified input.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         DeleteInputRequest request =
             DeleteInputRequest.newBuilder()
                 .setName(InputName.of("[PROJECT]", "[LOCATION]", "[INPUT]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             livestreamServiceClient.deleteInputOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteInputCallable

      public final UnaryCallable<DeleteInputRequest,Operation> deleteInputCallable()
      Deletes the specified input.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         DeleteInputRequest request =
             DeleteInputRequest.newBuilder()
                 .setName(InputName.of("[PROJECT]", "[LOCATION]", "[INPUT]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             livestreamServiceClient.deleteInputCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • updateInputAsync

      public final OperationFuture<Input,OperationMetadata> updateInputAsync(Input input, com.google.protobuf.FieldMask updateMask)
      Updates the specified input.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         Input input = Input.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         Input response = livestreamServiceClient.updateInputAsync(input, updateMask).get();
       }
       
      Parameters:
      input - Required. The input resource to be updated.
      updateMask - Field mask is used to specify the fields to be overwritten in the Input resource by the update. You can only update the following fields:
      • [`tier`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#Tier)
      • [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig)
      • [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule)

      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 mask is not present, then each field from the list above is updated if the field appears in the request payload. To unset a field, add the field to the update mask and remove it from the request payload.

      Throws:
      ApiException - if the remote call fails
    • updateInputAsync

      public final OperationFuture<Input,OperationMetadata> updateInputAsync(UpdateInputRequest request)
      Updates the specified input.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         UpdateInputRequest request =
             UpdateInputRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setInput(Input.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         Input response = livestreamServiceClient.updateInputAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateInputOperationCallable

      public final OperationCallable<UpdateInputRequest,Input,OperationMetadata> updateInputOperationCallable()
      Updates the specified input.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         UpdateInputRequest request =
             UpdateInputRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setInput(Input.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Input, OperationMetadata> future =
             livestreamServiceClient.updateInputOperationCallable().futureCall(request);
         // Do something.
         Input response = future.get();
       }
       
    • updateInputCallable

      public final UnaryCallable<UpdateInputRequest,Operation> updateInputCallable()
      Updates the specified input.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         UpdateInputRequest request =
             UpdateInputRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setInput(Input.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             livestreamServiceClient.updateInputCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • previewInput

      public final PreviewInputResponse previewInput(InputName name)
      Preview the streaming content of the specified input.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         InputName name = InputName.of("[PROJECT]", "[LOCATION]", "[INPUT]");
         PreviewInputResponse response = livestreamServiceClient.previewInput(name);
       }
       
      Parameters:
      name - Required. The name of the input resource, in the form of: `projects/{project}/locations/{location}/inputs/{inputId}`.
      Throws:
      ApiException - if the remote call fails
    • previewInput

      public final PreviewInputResponse previewInput(String name)
      Preview the streaming content of the specified input.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         String name = InputName.of("[PROJECT]", "[LOCATION]", "[INPUT]").toString();
         PreviewInputResponse response = livestreamServiceClient.previewInput(name);
       }
       
      Parameters:
      name - Required. The name of the input resource, in the form of: `projects/{project}/locations/{location}/inputs/{inputId}`.
      Throws:
      ApiException - if the remote call fails
    • previewInput

      public final PreviewInputResponse previewInput(PreviewInputRequest request)
      Preview the streaming content of the specified input.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         PreviewInputRequest request =
             PreviewInputRequest.newBuilder()
                 .setName(InputName.of("[PROJECT]", "[LOCATION]", "[INPUT]").toString())
                 .build();
         PreviewInputResponse response = livestreamServiceClient.previewInput(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • previewInputCallable

      public final UnaryCallable<PreviewInputRequest,PreviewInputResponse> previewInputCallable()
      Preview the streaming content of the specified input.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         PreviewInputRequest request =
             PreviewInputRequest.newBuilder()
                 .setName(InputName.of("[PROJECT]", "[LOCATION]", "[INPUT]").toString())
                 .build();
         ApiFuture<PreviewInputResponse> future =
             livestreamServiceClient.previewInputCallable().futureCall(request);
         // Do something.
         PreviewInputResponse response = future.get();
       }
       
    • createEvent

      public final Event createEvent(ChannelName parent, Event event, String eventId)
      Creates an event with the provided unique ID in the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ChannelName parent = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]");
         Event event = Event.newBuilder().build();
         String eventId = "eventId-1376502443";
         Event response = livestreamServiceClient.createEvent(parent, event, eventId);
       }
       
      Parameters:
      parent - Required. The parent channel for the resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}`.
      event - Required. The event resource to be created.
      eventId - Required. The ID of the event resource to be created.

      This value must be 1-63 characters, begin and end with a lower-case letter or a number, and consist of only lower-case letters, numbers, and hyphens. In other words, it must match the following regex: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.

      Throws:
      ApiException - if the remote call fails
    • createEvent

      public final Event createEvent(String parent, Event event, String eventId)
      Creates an event with the provided unique ID in the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         String parent = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString();
         Event event = Event.newBuilder().build();
         String eventId = "eventId-1376502443";
         Event response = livestreamServiceClient.createEvent(parent, event, eventId);
       }
       
      Parameters:
      parent - Required. The parent channel for the resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}`.
      event - Required. The event resource to be created.
      eventId - Required. The ID of the event resource to be created.

      This value must be 1-63 characters, begin and end with a lower-case letter or a number, and consist of only lower-case letters, numbers, and hyphens. In other words, it must match the following regex: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.

      Throws:
      ApiException - if the remote call fails
    • createEvent

      public final Event createEvent(CreateEventRequest request)
      Creates an event with the provided unique ID in the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         CreateEventRequest request =
             CreateEventRequest.newBuilder()
                 .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .setEvent(Event.newBuilder().build())
                 .setEventId("eventId-1376502443")
                 .setRequestId("requestId693933066")
                 .build();
         Event response = livestreamServiceClient.createEvent(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createEventCallable

      public final UnaryCallable<CreateEventRequest,Event> createEventCallable()
      Creates an event with the provided unique ID in the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         CreateEventRequest request =
             CreateEventRequest.newBuilder()
                 .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .setEvent(Event.newBuilder().build())
                 .setEventId("eventId-1376502443")
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Event> future = livestreamServiceClient.createEventCallable().futureCall(request);
         // Do something.
         Event response = future.get();
       }
       
    • listEvents

      Returns a list of all events in the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ChannelName parent = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]");
         for (Event element : livestreamServiceClient.listEvents(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent channel for the resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}`.
      Throws:
      ApiException - if the remote call fails
    • listEvents

      public final LivestreamServiceClient.ListEventsPagedResponse listEvents(String parent)
      Returns a list of all events in the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         String parent = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString();
         for (Event element : livestreamServiceClient.listEvents(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent channel for the resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}`.
      Throws:
      ApiException - if the remote call fails
    • listEvents

      Returns a list of all events in the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ListEventsRequest request =
             ListEventsRequest.newBuilder()
                 .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         for (Event element : livestreamServiceClient.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

      Returns a list of all events in the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ListEventsRequest request =
             ListEventsRequest.newBuilder()
                 .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         ApiFuture<Event> future =
             livestreamServiceClient.listEventsPagedCallable().futureCall(request);
         // Do something.
         for (Event element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listEventsCallable

      public final UnaryCallable<ListEventsRequest,ListEventsResponse> listEventsCallable()
      Returns a list of all events in the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ListEventsRequest request =
             ListEventsRequest.newBuilder()
                 .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         while (true) {
           ListEventsResponse response = livestreamServiceClient.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)
      Returns the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         EventName name = EventName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[EVENT]");
         Event response = livestreamServiceClient.getEvent(name);
       }
       
      Parameters:
      name - Required. The name of the event resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`.
      Throws:
      ApiException - if the remote call fails
    • getEvent

      public final Event getEvent(String name)
      Returns the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         String name = EventName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[EVENT]").toString();
         Event response = livestreamServiceClient.getEvent(name);
       }
       
      Parameters:
      name - Required. The name of the event resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`.
      Throws:
      ApiException - if the remote call fails
    • getEvent

      public final Event getEvent(GetEventRequest request)
      Returns the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         GetEventRequest request =
             GetEventRequest.newBuilder()
                 .setName(EventName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[EVENT]").toString())
                 .build();
         Event response = livestreamServiceClient.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()
      Returns the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         GetEventRequest request =
             GetEventRequest.newBuilder()
                 .setName(EventName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[EVENT]").toString())
                 .build();
         ApiFuture<Event> future = livestreamServiceClient.getEventCallable().futureCall(request);
         // Do something.
         Event response = future.get();
       }
       
    • deleteEvent

      public final void deleteEvent(EventName name)
      Deletes the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         EventName name = EventName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[EVENT]");
         livestreamServiceClient.deleteEvent(name);
       }
       
      Parameters:
      name - Required. The name of the event resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`.
      Throws:
      ApiException - if the remote call fails
    • deleteEvent

      public final void deleteEvent(String name)
      Deletes the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         String name = EventName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[EVENT]").toString();
         livestreamServiceClient.deleteEvent(name);
       }
       
      Parameters:
      name - Required. The name of the event resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`.
      Throws:
      ApiException - if the remote call fails
    • deleteEvent

      public final void deleteEvent(DeleteEventRequest request)
      Deletes the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         DeleteEventRequest request =
             DeleteEventRequest.newBuilder()
                 .setName(EventName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[EVENT]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         livestreamServiceClient.deleteEvent(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteEventCallable

      public final UnaryCallable<DeleteEventRequest,com.google.protobuf.Empty> deleteEventCallable()
      Deletes the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         DeleteEventRequest request =
             DeleteEventRequest.newBuilder()
                 .setName(EventName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[EVENT]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Empty> future = livestreamServiceClient.deleteEventCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • listClips

      Returns a list of all clips in the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ChannelName parent = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]");
         for (Clip element : livestreamServiceClient.listClips(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListClipsRequest
      Throws:
      ApiException - if the remote call fails
    • listClips

      public final LivestreamServiceClient.ListClipsPagedResponse listClips(String parent)
      Returns a list of all clips in the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         String parent = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString();
         for (Clip element : livestreamServiceClient.listClips(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListClipsRequest
      Throws:
      ApiException - if the remote call fails
    • listClips

      Returns a list of all clips in the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ListClipsRequest request =
             ListClipsRequest.newBuilder()
                 .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         for (Clip element : livestreamServiceClient.listClips(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
    • listClipsPagedCallable

      Returns a list of all clips in the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ListClipsRequest request =
             ListClipsRequest.newBuilder()
                 .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         ApiFuture<Clip> future = livestreamServiceClient.listClipsPagedCallable().futureCall(request);
         // Do something.
         for (Clip element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listClipsCallable

      public final UnaryCallable<ListClipsRequest,ListClipsResponse> listClipsCallable()
      Returns a list of all clips in the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ListClipsRequest request =
             ListClipsRequest.newBuilder()
                 .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         while (true) {
           ListClipsResponse response = livestreamServiceClient.listClipsCallable().call(request);
           for (Clip element : response.getClipsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getClip

      public final Clip getClip(ClipName name)
      Returns the specified clip.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ClipName name = ClipName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[CLIP]");
         Clip response = livestreamServiceClient.getClip(name);
       }
       
      Parameters:
      name - Required. Name of the resource, in the following form: `projects/{project}/locations/{location}/channels/{channel}/clips/{clip}`.
      Throws:
      ApiException - if the remote call fails
    • getClip

      public final Clip getClip(String name)
      Returns the specified clip.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         String name = ClipName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[CLIP]").toString();
         Clip response = livestreamServiceClient.getClip(name);
       }
       
      Parameters:
      name - Required. Name of the resource, in the following form: `projects/{project}/locations/{location}/channels/{channel}/clips/{clip}`.
      Throws:
      ApiException - if the remote call fails
    • getClip

      public final Clip getClip(GetClipRequest request)
      Returns the specified clip.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         GetClipRequest request =
             GetClipRequest.newBuilder()
                 .setName(ClipName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[CLIP]").toString())
                 .build();
         Clip response = livestreamServiceClient.getClip(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getClipCallable

      public final UnaryCallable<GetClipRequest,Clip> getClipCallable()
      Returns the specified clip.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         GetClipRequest request =
             GetClipRequest.newBuilder()
                 .setName(ClipName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[CLIP]").toString())
                 .build();
         ApiFuture<Clip> future = livestreamServiceClient.getClipCallable().futureCall(request);
         // Do something.
         Clip response = future.get();
       }
       
    • createClipAsync

      public final OperationFuture<Clip,OperationMetadata> createClipAsync(ChannelName parent, Clip clip, String clipId)
      Creates a clip with the provided clip ID in the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ChannelName parent = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]");
         Clip clip = Clip.newBuilder().build();
         String clipId = "clipId-1357703029";
         Clip response = livestreamServiceClient.createClipAsync(parent, clip, clipId).get();
       }
       
      Parameters:
      parent - Required. The parent resource name, in the following form: `projects/{project}/locations/{location}/channels/{channel}`.
      clip - Required. The resource being created
      clipId - Required. The ID of the clip resource to be created.

      This value must be 1-63 characters, begin and end with a lower-case letter or a number, and consist of only lower-case letters, numbers, and hyphens. In other words, it must match the following regex: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.

      Throws:
      ApiException - if the remote call fails
    • createClipAsync

      public final OperationFuture<Clip,OperationMetadata> createClipAsync(String parent, Clip clip, String clipId)
      Creates a clip with the provided clip ID in the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         String parent = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString();
         Clip clip = Clip.newBuilder().build();
         String clipId = "clipId-1357703029";
         Clip response = livestreamServiceClient.createClipAsync(parent, clip, clipId).get();
       }
       
      Parameters:
      parent - Required. The parent resource name, in the following form: `projects/{project}/locations/{location}/channels/{channel}`.
      clip - Required. The resource being created
      clipId - Required. The ID of the clip resource to be created.

      This value must be 1-63 characters, begin and end with a lower-case letter or a number, and consist of only lower-case letters, numbers, and hyphens. In other words, it must match the following regex: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.

      Throws:
      ApiException - if the remote call fails
    • createClipAsync

      public final OperationFuture<Clip,OperationMetadata> createClipAsync(CreateClipRequest request)
      Creates a clip with the provided clip ID in the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         CreateClipRequest request =
             CreateClipRequest.newBuilder()
                 .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .setClipId("clipId-1357703029")
                 .setClip(Clip.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         Clip response = livestreamServiceClient.createClipAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createClipOperationCallable

      public final OperationCallable<CreateClipRequest,Clip,OperationMetadata> createClipOperationCallable()
      Creates a clip with the provided clip ID in the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         CreateClipRequest request =
             CreateClipRequest.newBuilder()
                 .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .setClipId("clipId-1357703029")
                 .setClip(Clip.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Clip, OperationMetadata> future =
             livestreamServiceClient.createClipOperationCallable().futureCall(request);
         // Do something.
         Clip response = future.get();
       }
       
    • createClipCallable

      public final UnaryCallable<CreateClipRequest,Operation> createClipCallable()
      Creates a clip with the provided clip ID in the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         CreateClipRequest request =
             CreateClipRequest.newBuilder()
                 .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .setClipId("clipId-1357703029")
                 .setClip(Clip.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             livestreamServiceClient.createClipCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteClipAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteClipAsync(ClipName name)
      Deletes the specified clip job resource. This method only deletes the clip job and does not delete the VOD clip stored in Cloud Storage.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ClipName name = ClipName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[CLIP]");
         livestreamServiceClient.deleteClipAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of the clip resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}/clips/{clipId}`.
      Throws:
      ApiException - if the remote call fails
    • deleteClipAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteClipAsync(String name)
      Deletes the specified clip job resource. This method only deletes the clip job and does not delete the VOD clip stored in Cloud Storage.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         String name = ClipName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[CLIP]").toString();
         livestreamServiceClient.deleteClipAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of the clip resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}/clips/{clipId}`.
      Throws:
      ApiException - if the remote call fails
    • deleteClipAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteClipAsync(DeleteClipRequest request)
      Deletes the specified clip job resource. This method only deletes the clip job and does not delete the VOD clip stored in Cloud Storage.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         DeleteClipRequest request =
             DeleteClipRequest.newBuilder()
                 .setName(ClipName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[CLIP]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         livestreamServiceClient.deleteClipAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteClipOperationCallable

      public final OperationCallable<DeleteClipRequest,com.google.protobuf.Empty,OperationMetadata> deleteClipOperationCallable()
      Deletes the specified clip job resource. This method only deletes the clip job and does not delete the VOD clip stored in Cloud Storage.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         DeleteClipRequest request =
             DeleteClipRequest.newBuilder()
                 .setName(ClipName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[CLIP]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             livestreamServiceClient.deleteClipOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteClipCallable

      public final UnaryCallable<DeleteClipRequest,Operation> deleteClipCallable()
      Deletes the specified clip job resource. This method only deletes the clip job and does not delete the VOD clip stored in Cloud Storage.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         DeleteClipRequest request =
             DeleteClipRequest.newBuilder()
                 .setName(ClipName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[CLIP]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             livestreamServiceClient.deleteClipCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • createDvrSessionAsync

      public final OperationFuture<DvrSession,OperationMetadata> createDvrSessionAsync(ChannelName parent, DvrSession dvrSession, String dvrSessionId)
      Creates a DVR session with the provided unique ID in the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ChannelName parent = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]");
         DvrSession dvrSession = DvrSession.newBuilder().build();
         String dvrSessionId = "dvrSessionId120568849";
         DvrSession response =
             livestreamServiceClient.createDvrSessionAsync(parent, dvrSession, dvrSessionId).get();
       }
       
      Parameters:
      parent - Required. The parent resource name, in the following form: `projects/{project}/locations/{location}/channels/{channelId}`.
      dvrSession - Required. The resource being created
      dvrSessionId - Required. The ID of the DVR session resource to be created.

      This value must be 1-63 characters, begin and end with a lower-case letter or a number, and consist of only lower-case letters, numbers, and hyphens. In other words, it must match the following regex: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.

      Throws:
      ApiException - if the remote call fails
    • createDvrSessionAsync

      public final OperationFuture<DvrSession,OperationMetadata> createDvrSessionAsync(String parent, DvrSession dvrSession, String dvrSessionId)
      Creates a DVR session with the provided unique ID in the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         String parent = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString();
         DvrSession dvrSession = DvrSession.newBuilder().build();
         String dvrSessionId = "dvrSessionId120568849";
         DvrSession response =
             livestreamServiceClient.createDvrSessionAsync(parent, dvrSession, dvrSessionId).get();
       }
       
      Parameters:
      parent - Required. The parent resource name, in the following form: `projects/{project}/locations/{location}/channels/{channelId}`.
      dvrSession - Required. The resource being created
      dvrSessionId - Required. The ID of the DVR session resource to be created.

      This value must be 1-63 characters, begin and end with a lower-case letter or a number, and consist of only lower-case letters, numbers, and hyphens. In other words, it must match the following regex: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.

      Throws:
      ApiException - if the remote call fails
    • createDvrSessionAsync

      public final OperationFuture<DvrSession,OperationMetadata> createDvrSessionAsync(CreateDvrSessionRequest request)
      Creates a DVR session with the provided unique ID in the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         CreateDvrSessionRequest request =
             CreateDvrSessionRequest.newBuilder()
                 .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .setDvrSessionId("dvrSessionId120568849")
                 .setDvrSession(DvrSession.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         DvrSession response = livestreamServiceClient.createDvrSessionAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createDvrSessionOperationCallable

      public final OperationCallable<CreateDvrSessionRequest,DvrSession,OperationMetadata> createDvrSessionOperationCallable()
      Creates a DVR session with the provided unique ID in the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         CreateDvrSessionRequest request =
             CreateDvrSessionRequest.newBuilder()
                 .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .setDvrSessionId("dvrSessionId120568849")
                 .setDvrSession(DvrSession.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<DvrSession, OperationMetadata> future =
             livestreamServiceClient.createDvrSessionOperationCallable().futureCall(request);
         // Do something.
         DvrSession response = future.get();
       }
       
    • createDvrSessionCallable

      public final UnaryCallable<CreateDvrSessionRequest,Operation> createDvrSessionCallable()
      Creates a DVR session with the provided unique ID in the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         CreateDvrSessionRequest request =
             CreateDvrSessionRequest.newBuilder()
                 .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .setDvrSessionId("dvrSessionId120568849")
                 .setDvrSession(DvrSession.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             livestreamServiceClient.createDvrSessionCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • listDvrSessions

      Returns a list of all DVR sessions in the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ChannelName parent = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]");
         for (DvrSession element : livestreamServiceClient.listDvrSessions(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListDvrSessionsRequest
      Throws:
      ApiException - if the remote call fails
    • listDvrSessions

      public final LivestreamServiceClient.ListDvrSessionsPagedResponse listDvrSessions(String parent)
      Returns a list of all DVR sessions in the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         String parent = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString();
         for (DvrSession element : livestreamServiceClient.listDvrSessions(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListDvrSessionsRequest
      Throws:
      ApiException - if the remote call fails
    • listDvrSessions

      Returns a list of all DVR sessions in the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ListDvrSessionsRequest request =
             ListDvrSessionsRequest.newBuilder()
                 .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         for (DvrSession element : livestreamServiceClient.listDvrSessions(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
    • listDvrSessionsPagedCallable

      Returns a list of all DVR sessions in the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ListDvrSessionsRequest request =
             ListDvrSessionsRequest.newBuilder()
                 .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         ApiFuture<DvrSession> future =
             livestreamServiceClient.listDvrSessionsPagedCallable().futureCall(request);
         // Do something.
         for (DvrSession element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listDvrSessionsCallable

      public final UnaryCallable<ListDvrSessionsRequest,ListDvrSessionsResponse> listDvrSessionsCallable()
      Returns a list of all DVR sessions in the specified 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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ListDvrSessionsRequest request =
             ListDvrSessionsRequest.newBuilder()
                 .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         while (true) {
           ListDvrSessionsResponse response =
               livestreamServiceClient.listDvrSessionsCallable().call(request);
           for (DvrSession element : response.getDvrSessionsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getDvrSession

      public final DvrSession getDvrSession(DvrSessionName name)
      Returns the specified DVR session.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         DvrSessionName name =
             DvrSessionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[DVR_SESSION]");
         DvrSession response = livestreamServiceClient.getDvrSession(name);
       }
       
      Parameters:
      name - Required. Name of the resource, in the following form: `projects/{project}/locations/{location}/channels/{channelId}/dvrSessions/{dvrSessionId}`.
      Throws:
      ApiException - if the remote call fails
    • getDvrSession

      public final DvrSession getDvrSession(String name)
      Returns the specified DVR session.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         String name =
             DvrSessionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[DVR_SESSION]").toString();
         DvrSession response = livestreamServiceClient.getDvrSession(name);
       }
       
      Parameters:
      name - Required. Name of the resource, in the following form: `projects/{project}/locations/{location}/channels/{channelId}/dvrSessions/{dvrSessionId}`.
      Throws:
      ApiException - if the remote call fails
    • getDvrSession

      public final DvrSession getDvrSession(GetDvrSessionRequest request)
      Returns the specified DVR session.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         GetDvrSessionRequest request =
             GetDvrSessionRequest.newBuilder()
                 .setName(
                     DvrSessionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[DVR_SESSION]")
                         .toString())
                 .build();
         DvrSession response = livestreamServiceClient.getDvrSession(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getDvrSessionCallable

      public final UnaryCallable<GetDvrSessionRequest,DvrSession> getDvrSessionCallable()
      Returns the specified DVR session.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         GetDvrSessionRequest request =
             GetDvrSessionRequest.newBuilder()
                 .setName(
                     DvrSessionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[DVR_SESSION]")
                         .toString())
                 .build();
         ApiFuture<DvrSession> future =
             livestreamServiceClient.getDvrSessionCallable().futureCall(request);
         // Do something.
         DvrSession response = future.get();
       }
       
    • deleteDvrSessionAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDvrSessionAsync(DvrSessionName name)
      Deletes the specified DVR session.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         DvrSessionName name =
             DvrSessionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[DVR_SESSION]");
         livestreamServiceClient.deleteDvrSessionAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of the event resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}/dvrSessions/{dvrSessionId}`.
      Throws:
      ApiException - if the remote call fails
    • deleteDvrSessionAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDvrSessionAsync(String name)
      Deletes the specified DVR session.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         String name =
             DvrSessionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[DVR_SESSION]").toString();
         livestreamServiceClient.deleteDvrSessionAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of the event resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}/dvrSessions/{dvrSessionId}`.
      Throws:
      ApiException - if the remote call fails
    • deleteDvrSessionAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDvrSessionAsync(DeleteDvrSessionRequest request)
      Deletes the specified DVR session.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         DeleteDvrSessionRequest request =
             DeleteDvrSessionRequest.newBuilder()
                 .setName(
                     DvrSessionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[DVR_SESSION]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .build();
         livestreamServiceClient.deleteDvrSessionAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteDvrSessionOperationCallable

      public final OperationCallable<DeleteDvrSessionRequest,com.google.protobuf.Empty,OperationMetadata> deleteDvrSessionOperationCallable()
      Deletes the specified DVR session.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         DeleteDvrSessionRequest request =
             DeleteDvrSessionRequest.newBuilder()
                 .setName(
                     DvrSessionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[DVR_SESSION]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             livestreamServiceClient.deleteDvrSessionOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteDvrSessionCallable

      public final UnaryCallable<DeleteDvrSessionRequest,Operation> deleteDvrSessionCallable()
      Deletes the specified DVR session.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         DeleteDvrSessionRequest request =
             DeleteDvrSessionRequest.newBuilder()
                 .setName(
                     DvrSessionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[DVR_SESSION]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             livestreamServiceClient.deleteDvrSessionCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • updateDvrSessionAsync

      public final OperationFuture<DvrSession,OperationMetadata> updateDvrSessionAsync(DvrSession dvrSession, com.google.protobuf.FieldMask updateMask)
      Updates the specified DVR session.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         DvrSession dvrSession = DvrSession.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         DvrSession response =
             livestreamServiceClient.updateDvrSessionAsync(dvrSession, updateMask).get();
       }
       
      Parameters:
      dvrSession - Required. The DVR session resource to be updated.
      updateMask - Required. Field mask is used to specify the fields to be overwritten in the DvrSession resource by the update. You can only update the following fields:
      • `dvrWindows`

      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.

      Throws:
      ApiException - if the remote call fails
    • updateDvrSessionAsync

      public final OperationFuture<DvrSession,OperationMetadata> updateDvrSessionAsync(UpdateDvrSessionRequest request)
      Updates the specified DVR session.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         UpdateDvrSessionRequest request =
             UpdateDvrSessionRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setDvrSession(DvrSession.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         DvrSession response = livestreamServiceClient.updateDvrSessionAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateDvrSessionOperationCallable

      public final OperationCallable<UpdateDvrSessionRequest,DvrSession,OperationMetadata> updateDvrSessionOperationCallable()
      Updates the specified DVR session.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         UpdateDvrSessionRequest request =
             UpdateDvrSessionRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setDvrSession(DvrSession.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<DvrSession, OperationMetadata> future =
             livestreamServiceClient.updateDvrSessionOperationCallable().futureCall(request);
         // Do something.
         DvrSession response = future.get();
       }
       
    • updateDvrSessionCallable

      public final UnaryCallable<UpdateDvrSessionRequest,Operation> updateDvrSessionCallable()
      Updates the specified DVR session.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         UpdateDvrSessionRequest request =
             UpdateDvrSessionRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setDvrSession(DvrSession.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             livestreamServiceClient.updateDvrSessionCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • createAssetAsync

      public final OperationFuture<Asset,OperationMetadata> createAssetAsync(LocationName parent, Asset asset, String assetId)
      Creates a Asset with the provided unique ID in the specified region.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         Asset asset = Asset.newBuilder().build();
         String assetId = "assetId-704776149";
         Asset response = livestreamServiceClient.createAssetAsync(parent, asset, assetId).get();
       }
       
      Parameters:
      parent - Required. The parent location for the resource, in the form of: `projects/{project}/locations/{location}`.
      asset - Required. The asset resource to be created.
      assetId - Required. The ID of the asset resource to be created.

      This value must be 1-63 characters, begin and end with a lower-case letter or a number, and consist of only lower-case letters, numbers, and hyphens. In other words, it must match the following regex: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.

      Throws:
      ApiException - if the remote call fails
    • createAssetAsync

      public final OperationFuture<Asset,OperationMetadata> createAssetAsync(String parent, Asset asset, String assetId)
      Creates a Asset with the provided unique ID in the specified region.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         Asset asset = Asset.newBuilder().build();
         String assetId = "assetId-704776149";
         Asset response = livestreamServiceClient.createAssetAsync(parent, asset, assetId).get();
       }
       
      Parameters:
      parent - Required. The parent location for the resource, in the form of: `projects/{project}/locations/{location}`.
      asset - Required. The asset resource to be created.
      assetId - Required. The ID of the asset resource to be created.

      This value must be 1-63 characters, begin and end with a lower-case letter or a number, and consist of only lower-case letters, numbers, and hyphens. In other words, it must match the following regex: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.

      Throws:
      ApiException - if the remote call fails
    • createAssetAsync

      public final OperationFuture<Asset,OperationMetadata> createAssetAsync(CreateAssetRequest request)
      Creates a Asset with the provided unique ID in the specified region.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         CreateAssetRequest request =
             CreateAssetRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setAsset(Asset.newBuilder().build())
                 .setAssetId("assetId-704776149")
                 .setRequestId("requestId693933066")
                 .build();
         Asset response = livestreamServiceClient.createAssetAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createAssetOperationCallable

      public final OperationCallable<CreateAssetRequest,Asset,OperationMetadata> createAssetOperationCallable()
      Creates a Asset with the provided unique ID in the specified region.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         CreateAssetRequest request =
             CreateAssetRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setAsset(Asset.newBuilder().build())
                 .setAssetId("assetId-704776149")
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Asset, OperationMetadata> future =
             livestreamServiceClient.createAssetOperationCallable().futureCall(request);
         // Do something.
         Asset response = future.get();
       }
       
    • createAssetCallable

      public final UnaryCallable<CreateAssetRequest,Operation> createAssetCallable()
      Creates a Asset with the provided unique ID in the specified region.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         CreateAssetRequest request =
             CreateAssetRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setAsset(Asset.newBuilder().build())
                 .setAssetId("assetId-704776149")
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             livestreamServiceClient.createAssetCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteAssetAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAssetAsync(AssetName name)
      Deletes the specified asset if it is not used.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         AssetName name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]");
         livestreamServiceClient.deleteAssetAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of the asset resource, in the form of: `projects/{project}/locations/{location}/assets/{assetId}`.
      Throws:
      ApiException - if the remote call fails
    • deleteAssetAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAssetAsync(String name)
      Deletes the specified asset if it is not used.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         String name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString();
         livestreamServiceClient.deleteAssetAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of the asset resource, in the form of: `projects/{project}/locations/{location}/assets/{assetId}`.
      Throws:
      ApiException - if the remote call fails
    • deleteAssetAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAssetAsync(DeleteAssetRequest request)
      Deletes the specified asset if it is not used.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         DeleteAssetRequest request =
             DeleteAssetRequest.newBuilder()
                 .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         livestreamServiceClient.deleteAssetAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteAssetOperationCallable

      public final OperationCallable<DeleteAssetRequest,com.google.protobuf.Empty,OperationMetadata> deleteAssetOperationCallable()
      Deletes the specified asset if it is not used.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         DeleteAssetRequest request =
             DeleteAssetRequest.newBuilder()
                 .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             livestreamServiceClient.deleteAssetOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteAssetCallable

      public final UnaryCallable<DeleteAssetRequest,Operation> deleteAssetCallable()
      Deletes the specified asset if it is not used.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         DeleteAssetRequest request =
             DeleteAssetRequest.newBuilder()
                 .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             livestreamServiceClient.deleteAssetCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • getAsset

      public final Asset getAsset(AssetName name)
      Returns the specified asset.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         AssetName name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]");
         Asset response = livestreamServiceClient.getAsset(name);
       }
       
      Parameters:
      name - Required. Name of the resource, in the following form: `projects/{project}/locations/{location}/assets/{asset}`.
      Throws:
      ApiException - if the remote call fails
    • getAsset

      public final Asset getAsset(String name)
      Returns the specified asset.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         String name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString();
         Asset response = livestreamServiceClient.getAsset(name);
       }
       
      Parameters:
      name - Required. Name of the resource, in the following form: `projects/{project}/locations/{location}/assets/{asset}`.
      Throws:
      ApiException - if the remote call fails
    • getAsset

      public final Asset getAsset(GetAssetRequest request)
      Returns the specified asset.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         GetAssetRequest request =
             GetAssetRequest.newBuilder()
                 .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString())
                 .build();
         Asset response = livestreamServiceClient.getAsset(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getAssetCallable

      public final UnaryCallable<GetAssetRequest,Asset> getAssetCallable()
      Returns the specified asset.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         GetAssetRequest request =
             GetAssetRequest.newBuilder()
                 .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString())
                 .build();
         ApiFuture<Asset> future = livestreamServiceClient.getAssetCallable().futureCall(request);
         // Do something.
         Asset response = future.get();
       }
       
    • listAssets

      Returns a list of all assets in the specified region.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (Asset element : livestreamServiceClient.listAssets(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent location for the resource, in the form of: `projects/{project}/locations/{location}`.
      Throws:
      ApiException - if the remote call fails
    • listAssets

      public final LivestreamServiceClient.ListAssetsPagedResponse listAssets(String parent)
      Returns a list of all assets in the specified region.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (Asset element : livestreamServiceClient.listAssets(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent location for the resource, in the form of: `projects/{project}/locations/{location}`.
      Throws:
      ApiException - if the remote call fails
    • listAssets

      Returns a list of all assets in the specified region.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ListAssetsRequest request =
             ListAssetsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         for (Asset element : livestreamServiceClient.listAssets(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
    • listAssetsPagedCallable

      Returns a list of all assets in the specified region.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ListAssetsRequest request =
             ListAssetsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         ApiFuture<Asset> future =
             livestreamServiceClient.listAssetsPagedCallable().futureCall(request);
         // Do something.
         for (Asset element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listAssetsCallable

      public final UnaryCallable<ListAssetsRequest,ListAssetsResponse> listAssetsCallable()
      Returns a list of all assets in the specified region.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ListAssetsRequest request =
             ListAssetsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         while (true) {
           ListAssetsResponse response = livestreamServiceClient.listAssetsCallable().call(request);
           for (Asset element : response.getAssetsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getPool

      public final Pool getPool(PoolName name)
      Returns the specified pool.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         PoolName name = PoolName.of("[PROJECT]", "[LOCATION]", "[POOL]");
         Pool response = livestreamServiceClient.getPool(name);
       }
       
      Parameters:
      name - Required. The name of the pool resource, in the form of: `projects/{project}/locations/{location}/pools/{poolId}`.
      Throws:
      ApiException - if the remote call fails
    • getPool

      public final Pool getPool(String name)
      Returns the specified pool.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         String name = PoolName.of("[PROJECT]", "[LOCATION]", "[POOL]").toString();
         Pool response = livestreamServiceClient.getPool(name);
       }
       
      Parameters:
      name - Required. The name of the pool resource, in the form of: `projects/{project}/locations/{location}/pools/{poolId}`.
      Throws:
      ApiException - if the remote call fails
    • getPool

      public final Pool getPool(GetPoolRequest request)
      Returns the specified pool.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         GetPoolRequest request =
             GetPoolRequest.newBuilder()
                 .setName(PoolName.of("[PROJECT]", "[LOCATION]", "[POOL]").toString())
                 .build();
         Pool response = livestreamServiceClient.getPool(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getPoolCallable

      public final UnaryCallable<GetPoolRequest,Pool> getPoolCallable()
      Returns the specified pool.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         GetPoolRequest request =
             GetPoolRequest.newBuilder()
                 .setName(PoolName.of("[PROJECT]", "[LOCATION]", "[POOL]").toString())
                 .build();
         ApiFuture<Pool> future = livestreamServiceClient.getPoolCallable().futureCall(request);
         // Do something.
         Pool response = future.get();
       }
       
    • updatePoolAsync

      public final OperationFuture<Pool,OperationMetadata> updatePoolAsync(Pool pool, com.google.protobuf.FieldMask updateMask)
      Updates the specified pool.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         Pool pool = Pool.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         Pool response = livestreamServiceClient.updatePoolAsync(pool, updateMask).get();
       }
       
      Parameters:
      pool - Required. The pool resource to be updated.
      updateMask - Field mask is used to specify the fields to be overwritten in the Pool resource by the update. You can only update the following fields:
      • `networkConfig`

      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.

      Throws:
      ApiException - if the remote call fails
    • updatePoolAsync

      public final OperationFuture<Pool,OperationMetadata> updatePoolAsync(UpdatePoolRequest request)
      Updates the specified pool.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         UpdatePoolRequest request =
             UpdatePoolRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setPool(Pool.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         Pool response = livestreamServiceClient.updatePoolAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updatePoolOperationCallable

      public final OperationCallable<UpdatePoolRequest,Pool,OperationMetadata> updatePoolOperationCallable()
      Updates the specified pool.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         UpdatePoolRequest request =
             UpdatePoolRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setPool(Pool.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Pool, OperationMetadata> future =
             livestreamServiceClient.updatePoolOperationCallable().futureCall(request);
         // Do something.
         Pool response = future.get();
       }
       
    • updatePoolCallable

      public final UnaryCallable<UpdatePoolRequest,Operation> updatePoolCallable()
      Updates the specified pool.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         UpdatePoolRequest request =
             UpdatePoolRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setPool(Pool.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             livestreamServiceClient.updatePoolCallable().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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (Location element : livestreamServiceClient.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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<Location> future =
             livestreamServiceClient.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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListLocationsResponse response =
               livestreamServiceClient.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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
         Location response = livestreamServiceClient.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 (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
         GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
         ApiFuture<Location> future =
             livestreamServiceClient.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