Class LivestreamServiceClient (0.20.0)

public class LivestreamServiceClient 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().

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

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

See the individual methods for example code.

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

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

Inheritance

java.lang.Object > LivestreamServiceClient

Implements

BackgroundResource

Static Methods

create()

public static final LivestreamServiceClient create()

Constructs an instance of LivestreamServiceClient with default settings.

Returns
TypeDescription
LivestreamServiceClient
Exceptions
TypeDescription
IOException

create(LivestreamServiceSettings settings)

public static final LivestreamServiceClient create(LivestreamServiceSettings settings)

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.

Parameter
NameDescription
settingsLivestreamServiceSettings
Returns
TypeDescription
LivestreamServiceClient
Exceptions
TypeDescription
IOException

create(LivestreamServiceStub stub)

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

Parameter
NameDescription
stubLivestreamServiceStub
Returns
TypeDescription
LivestreamServiceClient

Constructors

LivestreamServiceClient(LivestreamServiceSettings settings)

protected LivestreamServiceClient(LivestreamServiceSettings settings)

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.

Parameter
NameDescription
settingsLivestreamServiceSettings

LivestreamServiceClient(LivestreamServiceStub stub)

protected LivestreamServiceClient(LivestreamServiceStub stub)
Parameter
NameDescription
stubLivestreamServiceStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
NameDescription
durationlong
unitTimeUnit
Returns
TypeDescription
boolean
Exceptions
TypeDescription
InterruptedException

close()

public final void close()

createChannelAsync(CreateChannelRequest request)

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();
 }
 
Parameter
NameDescription
requestCreateChannelRequest

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

Returns
TypeDescription
OperationFuture<Channel,OperationMetadata>

createChannelAsync(LocationName parent, Channel channel, String channelId)

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

Required. The parent location for the resource, in the form of: projects/{project}/locations/{location}.

channelChannel

Required. The channel resource to be created.

channelIdString

Required. The ID of the channel resource to be created. This value must be 1-63 characters, begin and end with [a-z0-9], could contain dashes (-) in between.

Returns
TypeDescription
OperationFuture<Channel,OperationMetadata>

createChannelAsync(String parent, Channel channel, String channelId)

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

Required. The parent location for the resource, in the form of: projects/{project}/locations/{location}.

channelChannel

Required. The channel resource to be created.

channelIdString

Required. The ID of the channel resource to be created. This value must be 1-63 characters, begin and end with [a-z0-9], could contain dashes (-) in between.

Returns
TypeDescription
OperationFuture<Channel,OperationMetadata>

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();
 }
 
Returns
TypeDescription
UnaryCallable<CreateChannelRequest,Operation>

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();
 }
 
Returns
TypeDescription
OperationCallable<CreateChannelRequest,Channel,OperationMetadata>

createEvent(ChannelName parent, Event event, String eventId)

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

Required. The parent channel for the resource, in the form of: projects/{project}/locations/{location}/channels/{channelId}.

eventEvent

Required. The event resource to be created.

eventIdString

Required. The ID of the event resource to be created. This value must be 1-63 characters, begin and end with [a-z0-9], could contain dashes (-) in between.

Returns
TypeDescription
Event

createEvent(CreateEventRequest request)

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);
 }
 
Parameter
NameDescription
requestCreateEventRequest

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

Returns
TypeDescription
Event

createEvent(String parent, Event event, String eventId)

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

Required. The parent channel for the resource, in the form of: projects/{project}/locations/{location}/channels/{channelId}.

eventEvent

Required. The event resource to be created.

eventIdString

Required. The ID of the event resource to be created. This value must be 1-63 characters, begin and end with [a-z0-9], could contain dashes (-) in between.

Returns
TypeDescription
Event

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();
 }
 
Returns
TypeDescription
UnaryCallable<CreateEventRequest,Event>

createInputAsync(CreateInputRequest request)

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();
 }
 
Parameter
NameDescription
requestCreateInputRequest

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

Returns
TypeDescription
OperationFuture<Input,OperationMetadata>

createInputAsync(LocationName parent, Input input, String inputId)

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

Required. The parent location for the resource, in the form of: projects/{project}/locations/{location}.

inputInput

Required. The input resource to be created.

inputIdString

Required. The ID of the input resource to be created. This value must be 1-63 characters, begin and end with [a-z0-9], could contain dashes (-) in between.

Returns
TypeDescription
OperationFuture<Input,OperationMetadata>

createInputAsync(String parent, Input input, String inputId)

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

Required. The parent location for the resource, in the form of: projects/{project}/locations/{location}.

inputInput

Required. The input resource to be created.

inputIdString

Required. The ID of the input resource to be created. This value must be 1-63 characters, begin and end with [a-z0-9], could contain dashes (-) in between.

Returns
TypeDescription
OperationFuture<Input,OperationMetadata>

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();
 }
 
Returns
TypeDescription
UnaryCallable<CreateInputRequest,Operation>

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();
 }
 
Returns
TypeDescription
OperationCallable<CreateInputRequest,Input,OperationMetadata>

deleteChannelAsync(ChannelName name)

public final OperationFuture<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();
 }
 
Parameter
NameDescription
nameChannelName

Required. The name of the channel resource, in the form of: projects/{project}/locations/{location}/channels/{channelId}.

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteChannelAsync(DeleteChannelRequest request)

public final OperationFuture<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();
 }
 
Parameter
NameDescription
requestDeleteChannelRequest

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

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteChannelAsync(String name)

public final OperationFuture<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();
 }
 
Parameter
NameDescription
nameString

Required. The name of the channel resource, in the form of: projects/{project}/locations/{location}/channels/{channelId}.

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

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();
 }
 
Returns
TypeDescription
UnaryCallable<DeleteChannelRequest,Operation>

deleteChannelOperationCallable()

public final OperationCallable<DeleteChannelRequest,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();
 }
 
Returns
TypeDescription
OperationCallable<DeleteChannelRequest,Empty,OperationMetadata>

deleteEvent(DeleteEventRequest request)

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);
 }
 
Parameter
NameDescription
requestDeleteEventRequest

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

deleteEvent(EventName name)

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);
 }
 
Parameter
NameDescription
nameEventName

Required. The name of the event resource, in the form of: projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}.

deleteEvent(String name)

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);
 }
 
Parameter
NameDescription
nameString

Required. The name of the event resource, in the form of: projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}.

deleteEventCallable()

public final UnaryCallable<DeleteEventRequest,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();
 }
 
Returns
TypeDescription
UnaryCallable<DeleteEventRequest,Empty>

deleteInputAsync(DeleteInputRequest request)

public final OperationFuture<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();
 }
 
Parameter
NameDescription
requestDeleteInputRequest

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

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteInputAsync(InputName name)

public final OperationFuture<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();
 }
 
Parameter
NameDescription
nameInputName

Required. The name of the input resource, in the form of: projects/{project}/locations/{location}/inputs/{inputId}.

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteInputAsync(String name)

public final OperationFuture<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();
 }
 
Parameter
NameDescription
nameString

Required. The name of the input resource, in the form of: projects/{project}/locations/{location}/inputs/{inputId}.

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

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();
 }
 
Returns
TypeDescription
UnaryCallable<DeleteInputRequest,Operation>

deleteInputOperationCallable()

public final OperationCallable<DeleteInputRequest,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();
 }
 
Returns
TypeDescription
OperationCallable<DeleteInputRequest,Empty,OperationMetadata>

getChannel(ChannelName name)

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);
 }
 
Parameter
NameDescription
nameChannelName

Required. The name of the channel resource, in the form of: projects/{project}/locations/{location}/channels/{channelId}.

Returns
TypeDescription
Channel

getChannel(GetChannelRequest request)

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);
 }
 
Parameter
NameDescription
requestGetChannelRequest

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

Returns
TypeDescription
Channel

getChannel(String name)

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);
 }
 
Parameter
NameDescription
nameString

Required. The name of the channel resource, in the form of: projects/{project}/locations/{location}/channels/{channelId}.

Returns
TypeDescription
Channel

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();
 }
 
Returns
TypeDescription
UnaryCallable<GetChannelRequest,Channel>

getEvent(EventName name)

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);
 }
 
Parameter
NameDescription
nameEventName

Required. The name of the event resource, in the form of: projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}.

Returns
TypeDescription
Event

getEvent(GetEventRequest request)

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);
 }
 
Parameter
NameDescription
requestGetEventRequest

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

Returns
TypeDescription
Event

getEvent(String name)

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);
 }
 
Parameter
NameDescription
nameString

Required. The name of the event resource, in the form of: projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}.

Returns
TypeDescription
Event

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();
 }
 
Returns
TypeDescription
UnaryCallable<GetEventRequest,Event>

getHttpJsonOperationsClient()

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.

Returns
TypeDescription
OperationsClient

getInput(GetInputRequest request)

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);
 }
 
Parameter
NameDescription
requestGetInputRequest

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

Returns
TypeDescription
Input

getInput(InputName name)

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);
 }
 
Parameter
NameDescription
nameInputName

Required. The name of the input resource, in the form of: projects/{project}/locations/{location}/inputs/{inputId}.

Returns
TypeDescription
Input

getInput(String name)

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);
 }
 
Parameter
NameDescription
nameString

Required. The name of the input resource, in the form of: projects/{project}/locations/{location}/inputs/{inputId}.

Returns
TypeDescription
Input

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();
 }
 
Returns
TypeDescription
UnaryCallable<GetInputRequest,Input>

getLocation(GetLocationRequest request)

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);
 }
 
Parameter
NameDescription
requestcom.google.cloud.location.GetLocationRequest

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

Returns
TypeDescription
com.google.cloud.location.Location

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();
 }
 
Returns
TypeDescription
UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location>

getOperationsClient()

public final OperationsClient getOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.

Returns
TypeDescription
OperationsClient

getSettings()

public final LivestreamServiceSettings getSettings()
Returns
TypeDescription
LivestreamServiceSettings

getStub()

public LivestreamServiceStub getStub()
Returns
TypeDescription
LivestreamServiceStub

isShutdown()

public boolean isShutdown()
Returns
TypeDescription
boolean

isTerminated()

public boolean isTerminated()
Returns
TypeDescription
boolean

listChannels(ListChannelsRequest request)

public final LivestreamServiceClient.ListChannelsPagedResponse listChannels(ListChannelsRequest request)

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);
   }
 }
 
Parameter
NameDescription
requestListChannelsRequest

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

Returns
TypeDescription
LivestreamServiceClient.ListChannelsPagedResponse

listChannels(LocationName parent)

public final LivestreamServiceClient.ListChannelsPagedResponse listChannels(LocationName 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()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (Channel element : livestreamServiceClient.listChannels(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentLocationName

Required. The parent location for the resource, in the form of: projects/{project}/locations/{location}.

Returns
TypeDescription
LivestreamServiceClient.ListChannelsPagedResponse

listChannels(String parent)

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);
   }
 }
 
Parameter
NameDescription
parentString

Required. The parent location for the resource, in the form of: projects/{project}/locations/{location}.

Returns
TypeDescription
LivestreamServiceClient.ListChannelsPagedResponse

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;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListChannelsRequest,ListChannelsResponse>

listChannelsPagedCallable()

public final UnaryCallable<ListChannelsRequest,LivestreamServiceClient.ListChannelsPagedResponse> 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);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListChannelsRequest,ListChannelsPagedResponse>

listEvents(ChannelName parent)

public final LivestreamServiceClient.ListEventsPagedResponse listEvents(ChannelName 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()) {
   ChannelName parent = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]");
   for (Event element : livestreamServiceClient.listEvents(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentChannelName

Required. The parent channel for the resource, in the form of: projects/{project}/locations/{location}/channels/{channelId}.

Returns
TypeDescription
LivestreamServiceClient.ListEventsPagedResponse

listEvents(ListEventsRequest request)

public final LivestreamServiceClient.ListEventsPagedResponse listEvents(ListEventsRequest request)

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);
   }
 }
 
Parameter
NameDescription
requestListEventsRequest

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

Returns
TypeDescription
LivestreamServiceClient.ListEventsPagedResponse

listEvents(String parent)

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);
   }
 }
 
Parameter
NameDescription
parentString

Required. The parent channel for the resource, in the form of: projects/{project}/locations/{location}/channels/{channelId}.

Returns
TypeDescription
LivestreamServiceClient.ListEventsPagedResponse

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;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListEventsRequest,ListEventsResponse>

listEventsPagedCallable()

public final UnaryCallable<ListEventsRequest,LivestreamServiceClient.ListEventsPagedResponse> 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);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListEventsRequest,ListEventsPagedResponse>

listInputs(ListInputsRequest request)

public final LivestreamServiceClient.ListInputsPagedResponse listInputs(ListInputsRequest request)

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);
   }
 }
 
Parameter
NameDescription
requestListInputsRequest

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

Returns
TypeDescription
LivestreamServiceClient.ListInputsPagedResponse

listInputs(LocationName parent)

public final LivestreamServiceClient.ListInputsPagedResponse listInputs(LocationName 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()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (Input element : livestreamServiceClient.listInputs(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentLocationName

Required. The parent location for the resource, in the form of: projects/{project}/locations/{location}.

Returns
TypeDescription
LivestreamServiceClient.ListInputsPagedResponse

listInputs(String parent)

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);
   }
 }
 
Parameter
NameDescription
parentString

Required. The parent location for the resource, in the form of: projects/{project}/locations/{location}.

Returns
TypeDescription
LivestreamServiceClient.ListInputsPagedResponse

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;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListInputsRequest,ListInputsResponse>

listInputsPagedCallable()

public final UnaryCallable<ListInputsRequest,LivestreamServiceClient.ListInputsPagedResponse> 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);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListInputsRequest,ListInputsPagedResponse>

listLocations(ListLocationsRequest request)

public final LivestreamServiceClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request)

Lists information about the supported locations for this service.

Sample code:


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

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

Returns
TypeDescription
LivestreamServiceClient.ListLocationsPagedResponse

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;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse>

listLocationsPagedCallable()

public final UnaryCallable<ListLocationsRequest,LivestreamServiceClient.ListLocationsPagedResponse> listLocationsPagedCallable()

Lists information about the supported locations for this service.

Sample code:


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

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

startChannelAsync(ChannelName name)

public final OperationFuture<ChannelOperationResponse,OperationMetadata> startChannelAsync(ChannelName 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()) {
   ChannelName name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]");
   ChannelOperationResponse response = livestreamServiceClient.startChannelAsync(name).get();
 }
 
Parameter
NameDescription
nameChannelName

Required. The name of the channel resource, in the form of: projects/{project}/locations/{location}/channels/{channelId}.

Returns
TypeDescription
OperationFuture<ChannelOperationResponse,OperationMetadata>

startChannelAsync(StartChannelRequest request)

public final OperationFuture<ChannelOperationResponse,OperationMetadata> startChannelAsync(StartChannelRequest request)

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();
 }
 
Parameter
NameDescription
requestStartChannelRequest

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

Returns
TypeDescription
OperationFuture<ChannelOperationResponse,OperationMetadata>

startChannelAsync(String name)

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();
 }
 
Parameter
NameDescription
nameString

Required. The name of the channel resource, in the form of: projects/{project}/locations/{location}/channels/{channelId}.

Returns
TypeDescription
OperationFuture<ChannelOperationResponse,OperationMetadata>

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();
 }
 
Returns
TypeDescription
UnaryCallable<StartChannelRequest,Operation>

startChannelOperationCallable()

public final OperationCallable<StartChannelRequest,ChannelOperationResponse,OperationMetadata> 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();
 }
 
Returns
TypeDescription
OperationCallable<StartChannelRequest,ChannelOperationResponse,OperationMetadata>

stopChannelAsync(ChannelName name)

public final OperationFuture<ChannelOperationResponse,OperationMetadata> stopChannelAsync(ChannelName 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()) {
   ChannelName name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]");
   ChannelOperationResponse response = livestreamServiceClient.stopChannelAsync(name).get();
 }
 
Parameter
NameDescription
nameChannelName

Required. The name of the channel resource, in the form of: projects/{project}/locations/{location}/channels/{channelId}.

Returns
TypeDescription
OperationFuture<ChannelOperationResponse,OperationMetadata>

stopChannelAsync(StopChannelRequest request)

public final OperationFuture<ChannelOperationResponse,OperationMetadata> stopChannelAsync(StopChannelRequest request)

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();
 }
 
Parameter
NameDescription
requestStopChannelRequest

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

Returns
TypeDescription
OperationFuture<ChannelOperationResponse,OperationMetadata>

stopChannelAsync(String name)

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();
 }
 
Parameter
NameDescription
nameString

Required. The name of the channel resource, in the form of: projects/{project}/locations/{location}/channels/{channelId}.

Returns
TypeDescription
OperationFuture<ChannelOperationResponse,OperationMetadata>

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();
 }
 
Returns
TypeDescription
UnaryCallable<StopChannelRequest,Operation>

stopChannelOperationCallable()

public final OperationCallable<StopChannelRequest,ChannelOperationResponse,OperationMetadata> 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();
 }
 
Returns
TypeDescription
OperationCallable<StopChannelRequest,ChannelOperationResponse,OperationMetadata>

updateChannelAsync(Channel channel, FieldMask updateMask)

public final OperationFuture<Channel,OperationMetadata> updateChannelAsync(Channel channel, 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
NameDescription
channelChannel

Required. The channel resource to be updated.

updateMaskFieldMask

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:

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.

Returns
TypeDescription
OperationFuture<Channel,OperationMetadata>

updateChannelAsync(UpdateChannelRequest request)

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();
 }
 
Parameter
NameDescription
requestUpdateChannelRequest

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

Returns
TypeDescription
OperationFuture<Channel,OperationMetadata>

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();
 }
 
Returns
TypeDescription
UnaryCallable<UpdateChannelRequest,Operation>

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();
 }
 
Returns
TypeDescription
OperationCallable<UpdateChannelRequest,Channel,OperationMetadata>

updateInputAsync(Input input, FieldMask updateMask)

public final OperationFuture<Input,OperationMetadata> updateInputAsync(Input input, 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
NameDescription
inputInput

Required. The input resource to be updated.

updateMaskFieldMask

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:

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.

Returns
TypeDescription
OperationFuture<Input,OperationMetadata>

updateInputAsync(UpdateInputRequest request)

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();
 }
 
Parameter
NameDescription
requestUpdateInputRequest

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

Returns
TypeDescription
OperationFuture<Input,OperationMetadata>

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();
 }
 
Returns
TypeDescription
UnaryCallable<UpdateInputRequest,Operation>

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();
 }
 
Returns
TypeDescription
OperationCallable<UpdateInputRequest,Input,OperationMetadata>