Class LivestreamServiceClient
- All Implemented Interfaces:
BackgroundResource,AutoCloseable
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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().
| Method | Description | Method Variants |
|---|---|---|
CreateChannel |
Creates a channel with the provided unique ID in the specified region. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListChannels |
Returns a list of all channels in the specified region. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetChannel |
Returns the specified channel. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteChannel |
Deletes the specified channel. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateChannel |
Updates the specified channel. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
StartChannel |
Starts the specified channel. Part of the video pipeline will be created only when the StartChannel request is received by the server. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
StopChannel |
Stops the specified channel. Part of the video pipeline will be released when the StopChannel request is received by the server. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
StartDistribution |
Starts distribution which delivers outputs to the destination indicated by the Distribution configuration. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
StopDistribution |
Stops the specified distribution. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateInput |
Creates an input with the provided unique ID in the specified region. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListInputs |
Returns a list of all inputs in the specified region. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetInput |
Returns the specified input. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteInput |
Deletes the specified input. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateInput |
Updates the specified input. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
PreviewInput |
Preview the streaming content of the specified input. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateEvent |
Creates an event with the provided unique ID in the specified channel. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListEvents |
Returns a list of all events in the specified channel. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetEvent |
Returns the specified event. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteEvent |
Deletes the specified event. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListClips |
Returns a list of all clips in the specified channel. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetClip |
Returns the specified clip. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateClip |
Creates a clip with the provided clip ID in the specified channel. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteClip |
Deletes the specified clip job resource. This method only deletes the clip job and does not delete the VOD clip stored in Cloud Storage. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateDvrSession |
Creates a DVR session with the provided unique ID in the specified channel. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListDvrSessions |
Returns a list of all DVR sessions in the specified channel. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetDvrSession |
Returns the specified DVR session. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteDvrSession |
Deletes the specified DVR session. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateDvrSession |
Updates the specified DVR session. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateAsset |
Creates a Asset with the provided unique ID in the specified region. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteAsset |
Deletes the specified asset if it is not used. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetAsset |
Returns the specified asset. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListAssets |
Returns a list of all assets in the specified region. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetPool |
Returns the specified pool. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdatePool |
Updates the specified pool. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListLocations |
Lists information about the supported locations for this service. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of 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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructs an instance of LivestreamServiceClient, using the given settings.protected -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long duration, TimeUnit unit) final voidclose()static final LivestreamServiceClientcreate()Constructs an instance of LivestreamServiceClient with default settings.static final LivestreamServiceClientcreate(LivestreamServiceSettings settings) Constructs an instance of LivestreamServiceClient, using the given settings.static final LivestreamServiceClientcreate(LivestreamServiceStub stub) Constructs an instance of LivestreamServiceClient, using the given stub for making calls.createAssetAsync(CreateAssetRequest request) Creates a Asset with the provided unique ID in the specified region.createAssetAsync(LocationName parent, Asset asset, String assetId) Creates a Asset with the provided unique ID in the specified region.createAssetAsync(String parent, Asset asset, String assetId) Creates a Asset with the provided unique ID in the specified region.Creates a Asset with the provided unique ID in the specified region.Creates a Asset with the provided unique ID in the specified region.createChannelAsync(CreateChannelRequest request) Creates a channel with the provided unique ID in the specified region.createChannelAsync(LocationName parent, Channel channel, String channelId) Creates a channel with the provided unique ID in the specified region.createChannelAsync(String parent, Channel channel, String channelId) Creates a channel with the provided unique ID in the specified region.Creates a channel with the provided unique ID in the specified region.Creates a channel with the provided unique ID in the specified region.final OperationFuture<Clip,OperationMetadata> createClipAsync(ChannelName parent, Clip clip, String clipId) Creates a clip with the provided clip ID in the specified channel.final OperationFuture<Clip,OperationMetadata> createClipAsync(CreateClipRequest request) Creates a clip with the provided clip ID in the specified channel.final OperationFuture<Clip,OperationMetadata> createClipAsync(String parent, Clip clip, String clipId) Creates a clip with the provided clip ID in the specified channel.Creates a clip with the provided clip ID in the specified channel.Creates a clip with the provided clip ID in the specified channel.createDvrSessionAsync(ChannelName parent, DvrSession dvrSession, String dvrSessionId) Creates a DVR session with the provided unique ID in the specified channel.Creates a DVR session with the provided unique ID in the specified channel.createDvrSessionAsync(String parent, DvrSession dvrSession, String dvrSessionId) Creates a DVR session with the provided unique ID in the specified channel.Creates a DVR session with the provided unique ID in the specified channel.Creates a DVR session with the provided unique ID in the specified channel.final EventcreateEvent(ChannelName parent, Event event, String eventId) Creates an event with the provided unique ID in the specified channel.final EventcreateEvent(CreateEventRequest request) Creates an event with the provided unique ID in the specified channel.final EventcreateEvent(String parent, Event event, String eventId) Creates an event with the provided unique ID in the specified channel.final UnaryCallable<CreateEventRequest,Event> Creates an event with the provided unique ID in the specified channel.createInputAsync(CreateInputRequest request) Creates an input with the provided unique ID in the specified region.createInputAsync(LocationName parent, Input input, String inputId) Creates an input with the provided unique ID in the specified region.createInputAsync(String parent, Input input, String inputId) Creates an input with the provided unique ID in the specified region.Creates an input with the provided unique ID in the specified region.Creates an input with the provided unique ID in the specified region.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAssetAsync(AssetName name) Deletes the specified asset if it is not used.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAssetAsync(DeleteAssetRequest request) Deletes the specified asset if it is not used.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAssetAsync(String name) Deletes the specified asset if it is not used.Deletes the specified asset if it is not used.final OperationCallable<DeleteAssetRequest,com.google.protobuf.Empty, OperationMetadata> Deletes the specified asset if it is not used.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes the specified channel.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteChannelAsync(DeleteChannelRequest request) Deletes the specified channel.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteChannelAsync(String name) Deletes the specified channel.Deletes the specified channel.final OperationCallable<DeleteChannelRequest,com.google.protobuf.Empty, OperationMetadata> Deletes the specified channel.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteClipAsync(ClipName name) Deletes the specified clip job resource.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteClipAsync(DeleteClipRequest request) Deletes the specified clip job resource.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteClipAsync(String name) Deletes the specified clip job resource.Deletes the specified clip job resource.final OperationCallable<DeleteClipRequest,com.google.protobuf.Empty, OperationMetadata> Deletes the specified clip job resource.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes the specified DVR session.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes the specified DVR session.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDvrSessionAsync(String name) Deletes the specified DVR session.Deletes the specified DVR session.final OperationCallable<DeleteDvrSessionRequest,com.google.protobuf.Empty, OperationMetadata> Deletes the specified DVR session.final voiddeleteEvent(DeleteEventRequest request) Deletes the specified event.final voiddeleteEvent(EventName name) Deletes the specified event.final voiddeleteEvent(String name) Deletes the specified event.final UnaryCallable<DeleteEventRequest,com.google.protobuf.Empty> Deletes the specified event.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteInputAsync(DeleteInputRequest request) Deletes the specified input.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteInputAsync(InputName name) Deletes the specified input.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteInputAsync(String name) Deletes the specified input.Deletes the specified input.final OperationCallable<DeleteInputRequest,com.google.protobuf.Empty, OperationMetadata> Deletes the specified input.final AssetReturns the specified asset.final AssetgetAsset(GetAssetRequest request) Returns the specified asset.final AssetReturns the specified asset.final UnaryCallable<GetAssetRequest,Asset> Returns the specified asset.final ChannelgetChannel(ChannelName name) Returns the specified channel.final ChannelgetChannel(GetChannelRequest request) Returns the specified channel.final ChannelgetChannel(String name) Returns the specified channel.Returns the specified channel.final ClipReturns the specified clip.final ClipgetClip(GetClipRequest request) Returns the specified clip.final ClipReturns the specified clip.final UnaryCallable<GetClipRequest,Clip> Returns the specified clip.final DvrSessiongetDvrSession(DvrSessionName name) Returns the specified DVR session.final DvrSessiongetDvrSession(GetDvrSessionRequest request) Returns the specified DVR session.final DvrSessiongetDvrSession(String name) Returns the specified DVR session.Returns the specified DVR session.final EventReturns the specified event.final EventgetEvent(GetEventRequest request) Returns the specified event.final EventReturns the specified event.final UnaryCallable<GetEventRequest,Event> Returns the specified event.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final InputgetInput(GetInputRequest request) Returns the specified input.final InputReturns the specified input.final InputReturns the specified input.final UnaryCallable<GetInputRequest,Input> Returns the specified input.final LocationgetLocation(GetLocationRequest request) Gets information about a location.Gets information about a location.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final PoolgetPool(GetPoolRequest request) Returns the specified pool.final PoolReturns the specified pool.final PoolReturns the specified pool.final UnaryCallable<GetPoolRequest,Pool> Returns the specified pool.getStub()booleanbooleanlistAssets(ListAssetsRequest request) Returns a list of all assets in the specified region.listAssets(LocationName parent) Returns a list of all assets in the specified region.listAssets(String parent) Returns a list of all assets in the specified region.Returns a list of all assets in the specified region.Returns a list of all assets in the specified region.listChannels(ListChannelsRequest request) Returns a list of all channels in the specified region.listChannels(LocationName parent) Returns a list of all channels in the specified region.listChannels(String parent) Returns a list of all channels in the specified region.Returns a list of all channels in the specified region.Returns a list of all channels in the specified region.listClips(ChannelName parent) Returns a list of all clips in the specified channel.listClips(ListClipsRequest request) Returns a list of all clips in the specified channel.Returns a list of all clips in the specified channel.Returns a list of all clips in the specified channel.Returns a list of all clips in the specified channel.listDvrSessions(ChannelName parent) Returns a list of all DVR sessions in the specified channel.listDvrSessions(ListDvrSessionsRequest request) Returns a list of all DVR sessions in the specified channel.listDvrSessions(String parent) Returns a list of all DVR sessions in the specified channel.Returns a list of all DVR sessions in the specified channel.Returns a list of all DVR sessions in the specified channel.listEvents(ChannelName parent) Returns a list of all events in the specified channel.listEvents(ListEventsRequest request) Returns a list of all events in the specified channel.listEvents(String parent) Returns a list of all events in the specified channel.Returns a list of all events in the specified channel.Returns a list of all events in the specified channel.listInputs(ListInputsRequest request) Returns a list of all inputs in the specified region.listInputs(LocationName parent) Returns a list of all inputs in the specified region.listInputs(String parent) Returns a list of all inputs in the specified region.Returns a list of all inputs in the specified region.Returns a list of all inputs in the specified region.listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Lists information about the supported locations for this service.Lists information about the supported locations for this service.final PreviewInputResponsepreviewInput(InputName name) Preview the streaming content of the specified input.final PreviewInputResponsepreviewInput(PreviewInputRequest request) Preview the streaming content of the specified input.final PreviewInputResponsepreviewInput(String name) Preview the streaming content of the specified input.Preview the streaming content of the specified input.voidshutdown()voidstartChannelAsync(ChannelName name) Starts the specified channel.startChannelAsync(StartChannelRequest request) Starts the specified channel.startChannelAsync(String name) Starts the specified channel.Starts the specified channel.Starts the specified channel.startDistributionAsync(ChannelName name, List<String> distributionKeys) Starts distribution which delivers outputs to the destination indicated by the Distribution configuration.Starts distribution which delivers outputs to the destination indicated by the Distribution configuration.startDistributionAsync(String name, List<String> distributionKeys) Starts distribution which delivers outputs to the destination indicated by the Distribution configuration.Starts distribution which delivers outputs to the destination indicated by the Distribution configuration.Starts distribution which delivers outputs to the destination indicated by the Distribution configuration.stopChannelAsync(ChannelName name) Stops the specified channel.stopChannelAsync(StopChannelRequest request) Stops the specified channel.stopChannelAsync(String name) Stops the specified channel.Stops the specified channel.Stops the specified channel.stopDistributionAsync(ChannelName name, List<String> distributionKeys) Stops the specified distribution.Stops the specified distribution.stopDistributionAsync(String name, List<String> distributionKeys) Stops the specified distribution.Stops the specified distribution.Stops the specified distribution.updateChannelAsync(Channel channel, com.google.protobuf.FieldMask updateMask) Updates the specified channel.updateChannelAsync(UpdateChannelRequest request) Updates the specified channel.Updates the specified channel.Updates the specified channel.updateDvrSessionAsync(DvrSession dvrSession, com.google.protobuf.FieldMask updateMask) Updates the specified DVR session.Updates the specified DVR session.Updates the specified DVR session.Updates the specified DVR session.updateInputAsync(Input input, com.google.protobuf.FieldMask updateMask) Updates the specified input.updateInputAsync(UpdateInputRequest request) Updates the specified input.Updates the specified input.Updates the specified input.final OperationFuture<Pool,OperationMetadata> updatePoolAsync(Pool pool, com.google.protobuf.FieldMask updateMask) Updates the specified pool.final OperationFuture<Pool,OperationMetadata> updatePoolAsync(UpdatePoolRequest request) Updates the specified pool.Updates the specified pool.Updates the specified pool.
-
Constructor Details
-
LivestreamServiceClient
Constructs an instance of LivestreamServiceClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.- Throws:
IOException
-
LivestreamServiceClient
-
-
Method Details
-
create
Constructs an instance of LivestreamServiceClient with default settings.- Throws:
IOException
-
create
public static final LivestreamServiceClient create(LivestreamServiceSettings settings) throws IOException Constructs an instance of LivestreamServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.- Throws:
IOException
-
create
Constructs an instance of LivestreamServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(LivestreamServiceSettings). -
getSettings
-
getStub
-
getOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
getHttpJsonOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
createChannelAsync
public final OperationFuture<Channel,OperationMetadata> createChannelAsync(LocationName parent, Channel channel, String channelId) Creates a channel with the provided unique ID in the specified region.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); Channel channel = Channel.newBuilder().build(); String channelId = "channelId1461735806"; Channel response = livestreamServiceClient.createChannelAsync(parent, channel, channelId).get(); }- Parameters:
parent- Required. The parent location for the resource, in the form of: `projects/{project}/locations/{location}`.channel- Required. The channel resource to be created.channelId- Required. The ID of the channel resource to be created.This value must be 1-63 characters, begin and end with a lower-case letter or a number, and consist of only lower-case letters, numbers, and hyphens. In other words, it must match the following regex: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.
- Throws:
ApiException- if the remote call fails
-
createChannelAsync
public final OperationFuture<Channel,OperationMetadata> createChannelAsync(String parent, Channel channel, String channelId) Creates a channel with the provided unique ID in the specified region.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); Channel channel = Channel.newBuilder().build(); String channelId = "channelId1461735806"; Channel response = livestreamServiceClient.createChannelAsync(parent, channel, channelId).get(); }- Parameters:
parent- Required. The parent location for the resource, in the form of: `projects/{project}/locations/{location}`.channel- Required. The channel resource to be created.channelId- Required. The ID of the channel resource to be created.This value must be 1-63 characters, begin and end with a lower-case letter or a number, and consist of only lower-case letters, numbers, and hyphens. In other words, it must match the following regex: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.
- Throws:
ApiException- if the remote call fails
-
createChannelAsync
public final OperationFuture<Channel,OperationMetadata> createChannelAsync(CreateChannelRequest request) Creates a channel with the provided unique ID in the specified region.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { CreateChannelRequest request = CreateChannelRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setChannel(Channel.newBuilder().build()) .setChannelId("channelId1461735806") .setRequestId("requestId693933066") .build(); Channel response = livestreamServiceClient.createChannelAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createChannelOperationCallable
public final OperationCallable<CreateChannelRequest,Channel, createChannelOperationCallable()OperationMetadata> Creates a channel with the provided unique ID in the specified region.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { CreateChannelRequest request = CreateChannelRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setChannel(Channel.newBuilder().build()) .setChannelId("channelId1461735806") .setRequestId("requestId693933066") .build(); OperationFuture<Channel, OperationMetadata> future = livestreamServiceClient.createChannelOperationCallable().futureCall(request); // Do something. Channel response = future.get(); } -
createChannelCallable
Creates a channel with the provided unique ID in the specified region.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { CreateChannelRequest request = CreateChannelRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setChannel(Channel.newBuilder().build()) .setChannelId("channelId1461735806") .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = livestreamServiceClient.createChannelCallable().futureCall(request); // Do something. Operation response = future.get(); } -
listChannels
Returns a list of all channels in the specified region.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (Channel element : livestreamServiceClient.listChannels(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent location for the resource, in the form of: `projects/{project}/locations/{location}`.- Throws:
ApiException- if the remote call fails
-
listChannels
Returns a list of all channels in the specified region.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (Channel element : livestreamServiceClient.listChannels(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent location for the resource, in the form of: `projects/{project}/locations/{location}`.- Throws:
ApiException- if the remote call fails
-
listChannels
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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); } } -
listChannelsCallable
Returns a list of all channels in the specified region.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { ListChannelsRequest request = ListChannelsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListChannelsResponse response = livestreamServiceClient.listChannelsCallable().call(request); for (Channel element : response.getChannelsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getChannel
Returns the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { ChannelName name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]"); Channel response = livestreamServiceClient.getChannel(name); }- Parameters:
name- Required. The name of the channel resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}`.- Throws:
ApiException- if the remote call fails
-
getChannel
Returns the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { String name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString(); Channel response = livestreamServiceClient.getChannel(name); }- Parameters:
name- Required. The name of the channel resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}`.- Throws:
ApiException- if the remote call fails
-
getChannel
Returns the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { GetChannelRequest request = GetChannelRequest.newBuilder() .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString()) .build(); Channel response = livestreamServiceClient.getChannel(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getChannelCallable
Returns the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { GetChannelRequest request = GetChannelRequest.newBuilder() .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString()) .build(); ApiFuture<Channel> future = livestreamServiceClient.getChannelCallable().futureCall(request); // Do something. Channel response = future.get(); } -
deleteChannelAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteChannelAsync(ChannelName name) Deletes the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { ChannelName name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]"); livestreamServiceClient.deleteChannelAsync(name).get(); }- Parameters:
name- Required. The name of the channel resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}`.- Throws:
ApiException- if the remote call fails
-
deleteChannelAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteChannelAsync(String name) Deletes the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { String name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString(); livestreamServiceClient.deleteChannelAsync(name).get(); }- Parameters:
name- Required. The name of the channel resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}`.- Throws:
ApiException- if the remote call fails
-
deleteChannelAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteChannelAsync(DeleteChannelRequest request) Deletes the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { DeleteChannelRequest request = DeleteChannelRequest.newBuilder() .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString()) .setRequestId("requestId693933066") .setForce(true) .build(); livestreamServiceClient.deleteChannelAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteChannelOperationCallable
public final OperationCallable<DeleteChannelRequest,com.google.protobuf.Empty, deleteChannelOperationCallable()OperationMetadata> Deletes the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { DeleteChannelRequest request = DeleteChannelRequest.newBuilder() .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString()) .setRequestId("requestId693933066") .setForce(true) .build(); OperationFuture<Empty, OperationMetadata> future = livestreamServiceClient.deleteChannelOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteChannelCallable
Deletes the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { DeleteChannelRequest request = DeleteChannelRequest.newBuilder() .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString()) .setRequestId("requestId693933066") .setForce(true) .build(); ApiFuture<Operation> future = livestreamServiceClient.deleteChannelCallable().futureCall(request); // Do something. future.get(); } -
updateChannelAsync
public final OperationFuture<Channel,OperationMetadata> updateChannelAsync(Channel channel, com.google.protobuf.FieldMask updateMask) Updates the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { Channel channel = Channel.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); Channel response = livestreamServiceClient.updateChannelAsync(channel, updateMask).get(); }- Parameters:
channel- Required. The channel resource to be updated.updateMask- Field mask is used to specify the fields to be overwritten in the Channel resource by the update. You can only update the following fields:- [`inputAttachments`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment)
- [`inputConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig)
- [`output`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output)
- [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream)
- [`muxStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream)
- [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest)
- [`spriteSheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet)
- [`logConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig)
- [`timecodeConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig)
- [`encryptions`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption)
The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask.
If the mask is not present, then each field from the list above is updated if the field appears in the request payload. To unset a field, add the field to the update mask and remove it from the request payload.
- Throws:
ApiException- if the remote call fails
-
updateChannelAsync
public final OperationFuture<Channel,OperationMetadata> updateChannelAsync(UpdateChannelRequest request) Updates the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { UpdateChannelRequest request = UpdateChannelRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setChannel(Channel.newBuilder().build()) .setRequestId("requestId693933066") .build(); Channel response = livestreamServiceClient.updateChannelAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateChannelOperationCallable
public final OperationCallable<UpdateChannelRequest,Channel, updateChannelOperationCallable()OperationMetadata> Updates the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { UpdateChannelRequest request = UpdateChannelRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setChannel(Channel.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<Channel, OperationMetadata> future = livestreamServiceClient.updateChannelOperationCallable().futureCall(request); // Do something. Channel response = future.get(); } -
updateChannelCallable
Updates the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { UpdateChannelRequest request = UpdateChannelRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setChannel(Channel.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = livestreamServiceClient.updateChannelCallable().futureCall(request); // Do something. Operation response = future.get(); } -
startChannelAsync
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(); }- Parameters:
name- Required. The name of the channel resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}`.- Throws:
ApiException- if the remote call fails
-
startChannelAsync
public final OperationFuture<ChannelOperationResponse,OperationMetadata> startChannelAsync(String name) Starts the specified channel. Part of the video pipeline will be created only when the StartChannel request is received by the server.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { String name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString(); ChannelOperationResponse response = livestreamServiceClient.startChannelAsync(name).get(); }- Parameters:
name- Required. The name of the channel resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}`.- Throws:
ApiException- if the remote call fails
-
startChannelAsync
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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
startChannelOperationCallable
public final OperationCallable<StartChannelRequest,ChannelOperationResponse, startChannelOperationCallable()OperationMetadata> Starts the specified channel. Part of the video pipeline will be created only when the StartChannel request is received by the server.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { StartChannelRequest request = StartChannelRequest.newBuilder() .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString()) .setRequestId("requestId693933066") .build(); OperationFuture<ChannelOperationResponse, OperationMetadata> future = livestreamServiceClient.startChannelOperationCallable().futureCall(request); // Do something. ChannelOperationResponse response = future.get(); } -
startChannelCallable
Starts the specified channel. Part of the video pipeline will be created only when the StartChannel request is received by the server.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { StartChannelRequest request = StartChannelRequest.newBuilder() .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = livestreamServiceClient.startChannelCallable().futureCall(request); // Do something. Operation response = future.get(); } -
stopChannelAsync
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(); }- Parameters:
name- Required. The name of the channel resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}`.- Throws:
ApiException- if the remote call fails
-
stopChannelAsync
public final OperationFuture<ChannelOperationResponse,OperationMetadata> stopChannelAsync(String name) Stops the specified channel. Part of the video pipeline will be released when the StopChannel request is received by the server.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { String name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString(); ChannelOperationResponse response = livestreamServiceClient.stopChannelAsync(name).get(); }- Parameters:
name- Required. The name of the channel resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}`.- Throws:
ApiException- if the remote call fails
-
stopChannelAsync
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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
stopChannelOperationCallable
public final OperationCallable<StopChannelRequest,ChannelOperationResponse, stopChannelOperationCallable()OperationMetadata> Stops the specified channel. Part of the video pipeline will be released when the StopChannel request is received by the server.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { StopChannelRequest request = StopChannelRequest.newBuilder() .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString()) .setRequestId("requestId693933066") .build(); OperationFuture<ChannelOperationResponse, OperationMetadata> future = livestreamServiceClient.stopChannelOperationCallable().futureCall(request); // Do something. ChannelOperationResponse response = future.get(); } -
stopChannelCallable
Stops the specified channel. Part of the video pipeline will be released when the StopChannel request is received by the server.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { StopChannelRequest request = StopChannelRequest.newBuilder() .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = livestreamServiceClient.stopChannelCallable().futureCall(request); // Do something. Operation response = future.get(); } -
startDistributionAsync
public final OperationFuture<ChannelOperationResponse,OperationMetadata> startDistributionAsync(ChannelName name, List<String> distributionKeys) Starts distribution which delivers outputs to the destination indicated by the Distribution configuration.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { ChannelName name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]"); List<String> distributionKeys = new ArrayList<>(); ChannelOperationResponse response = livestreamServiceClient.startDistributionAsync(name, distributionKeys).get(); }- Parameters:
name- Required. The name of the channel resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}`.distributionKeys- Optional. A list of keys to identify the distribution configuration in the channel resource. If left empty, all the distributions in the channel specification will be started.- Throws:
ApiException- if the remote call fails
-
startDistributionAsync
public final OperationFuture<ChannelOperationResponse,OperationMetadata> startDistributionAsync(String name, List<String> distributionKeys) Starts distribution which delivers outputs to the destination indicated by the Distribution configuration.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { String name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString(); List<String> distributionKeys = new ArrayList<>(); ChannelOperationResponse response = livestreamServiceClient.startDistributionAsync(name, distributionKeys).get(); }- Parameters:
name- Required. The name of the channel resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}`.distributionKeys- Optional. A list of keys to identify the distribution configuration in the channel resource. If left empty, all the distributions in the channel specification will be started.- Throws:
ApiException- if the remote call fails
-
startDistributionAsync
public final OperationFuture<ChannelOperationResponse,OperationMetadata> startDistributionAsync(StartDistributionRequest request) Starts distribution which delivers outputs to the destination indicated by the Distribution configuration.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { StartDistributionRequest request = StartDistributionRequest.newBuilder() .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString()) .addAllDistributionKeys(new ArrayList<String>()) .setRequestId("requestId693933066") .build(); ChannelOperationResponse response = livestreamServiceClient.startDistributionAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
startDistributionOperationCallable
public final OperationCallable<StartDistributionRequest,ChannelOperationResponse, startDistributionOperationCallable()OperationMetadata> Starts distribution which delivers outputs to the destination indicated by the Distribution configuration.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { StartDistributionRequest request = StartDistributionRequest.newBuilder() .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString()) .addAllDistributionKeys(new ArrayList<String>()) .setRequestId("requestId693933066") .build(); OperationFuture<ChannelOperationResponse, OperationMetadata> future = livestreamServiceClient.startDistributionOperationCallable().futureCall(request); // Do something. ChannelOperationResponse response = future.get(); } -
startDistributionCallable
Starts distribution which delivers outputs to the destination indicated by the Distribution configuration.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { StartDistributionRequest request = StartDistributionRequest.newBuilder() .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString()) .addAllDistributionKeys(new ArrayList<String>()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = livestreamServiceClient.startDistributionCallable().futureCall(request); // Do something. Operation response = future.get(); } -
stopDistributionAsync
public final OperationFuture<ChannelOperationResponse,OperationMetadata> stopDistributionAsync(ChannelName name, List<String> distributionKeys) Stops the specified distribution.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { ChannelName name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]"); List<String> distributionKeys = new ArrayList<>(); ChannelOperationResponse response = livestreamServiceClient.stopDistributionAsync(name, distributionKeys).get(); }- Parameters:
name- Required. The name of the channel resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}`.distributionKeys- Optional. A list of key to identify the distribution configuration in the channel resource. If left empty, all the distributions in the channel specification will be stopped.- Throws:
ApiException- if the remote call fails
-
stopDistributionAsync
public final OperationFuture<ChannelOperationResponse,OperationMetadata> stopDistributionAsync(String name, List<String> distributionKeys) Stops the specified distribution.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { String name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString(); List<String> distributionKeys = new ArrayList<>(); ChannelOperationResponse response = livestreamServiceClient.stopDistributionAsync(name, distributionKeys).get(); }- Parameters:
name- Required. The name of the channel resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}`.distributionKeys- Optional. A list of key to identify the distribution configuration in the channel resource. If left empty, all the distributions in the channel specification will be stopped.- Throws:
ApiException- if the remote call fails
-
stopDistributionAsync
public final OperationFuture<ChannelOperationResponse,OperationMetadata> stopDistributionAsync(StopDistributionRequest request) Stops the specified distribution.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { StopDistributionRequest request = StopDistributionRequest.newBuilder() .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString()) .addAllDistributionKeys(new ArrayList<String>()) .setRequestId("requestId693933066") .build(); ChannelOperationResponse response = livestreamServiceClient.stopDistributionAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
stopDistributionOperationCallable
public final OperationCallable<StopDistributionRequest,ChannelOperationResponse, stopDistributionOperationCallable()OperationMetadata> Stops the specified distribution.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { StopDistributionRequest request = StopDistributionRequest.newBuilder() .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString()) .addAllDistributionKeys(new ArrayList<String>()) .setRequestId("requestId693933066") .build(); OperationFuture<ChannelOperationResponse, OperationMetadata> future = livestreamServiceClient.stopDistributionOperationCallable().futureCall(request); // Do something. ChannelOperationResponse response = future.get(); } -
stopDistributionCallable
Stops the specified distribution.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { StopDistributionRequest request = StopDistributionRequest.newBuilder() .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString()) .addAllDistributionKeys(new ArrayList<String>()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = livestreamServiceClient.stopDistributionCallable().futureCall(request); // Do something. Operation response = future.get(); } -
createInputAsync
public final OperationFuture<Input,OperationMetadata> createInputAsync(LocationName parent, Input input, String inputId) Creates an input with the provided unique ID in the specified region.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); Input input = Input.newBuilder().build(); String inputId = "inputId1954846341"; Input response = livestreamServiceClient.createInputAsync(parent, input, inputId).get(); }- Parameters:
parent- Required. The parent location for the resource, in the form of: `projects/{project}/locations/{location}`.input- Required. The input resource to be created.inputId- Required. The ID of the input resource to be created.This value must be 1-63 characters, begin and end with a lower-case letter or a number, and consist of only lower-case letters, numbers, and hyphens. In other words, it must match the following regex: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.
- Throws:
ApiException- if the remote call fails
-
createInputAsync
public final OperationFuture<Input,OperationMetadata> createInputAsync(String parent, Input input, String inputId) Creates an input with the provided unique ID in the specified region.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); Input input = Input.newBuilder().build(); String inputId = "inputId1954846341"; Input response = livestreamServiceClient.createInputAsync(parent, input, inputId).get(); }- Parameters:
parent- Required. The parent location for the resource, in the form of: `projects/{project}/locations/{location}`.input- Required. The input resource to be created.inputId- Required. The ID of the input resource to be created.This value must be 1-63 characters, begin and end with a lower-case letter or a number, and consist of only lower-case letters, numbers, and hyphens. In other words, it must match the following regex: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.
- Throws:
ApiException- if the remote call fails
-
createInputAsync
Creates an input with the provided unique ID in the specified region.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { CreateInputRequest request = CreateInputRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setInput(Input.newBuilder().build()) .setInputId("inputId1954846341") .setRequestId("requestId693933066") .build(); Input response = livestreamServiceClient.createInputAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createInputOperationCallable
public final OperationCallable<CreateInputRequest,Input, createInputOperationCallable()OperationMetadata> Creates an input with the provided unique ID in the specified region.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { CreateInputRequest request = CreateInputRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setInput(Input.newBuilder().build()) .setInputId("inputId1954846341") .setRequestId("requestId693933066") .build(); OperationFuture<Input, OperationMetadata> future = livestreamServiceClient.createInputOperationCallable().futureCall(request); // Do something. Input response = future.get(); } -
createInputCallable
Creates an input with the provided unique ID in the specified region.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { CreateInputRequest request = CreateInputRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setInput(Input.newBuilder().build()) .setInputId("inputId1954846341") .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = livestreamServiceClient.createInputCallable().futureCall(request); // Do something. Operation response = future.get(); } -
listInputs
Returns a list of all inputs in the specified region.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (Input element : livestreamServiceClient.listInputs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent location for the resource, in the form of: `projects/{project}/locations/{location}`.- Throws:
ApiException- if the remote call fails
-
listInputs
Returns a list of all inputs in the specified region.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (Input element : livestreamServiceClient.listInputs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent location for the resource, in the form of: `projects/{project}/locations/{location}`.- Throws:
ApiException- if the remote call fails
-
listInputs
Returns a list of all inputs in the specified region.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { ListInputsRequest request = ListInputsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (Input element : livestreamServiceClient.listInputs(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listInputsPagedCallable
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); } } -
listInputsCallable
Returns a list of all inputs in the specified region.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { ListInputsRequest request = ListInputsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListInputsResponse response = livestreamServiceClient.listInputsCallable().call(request); for (Input element : response.getInputsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getInput
Returns the specified input.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { InputName name = InputName.of("[PROJECT]", "[LOCATION]", "[INPUT]"); Input response = livestreamServiceClient.getInput(name); }- Parameters:
name- Required. The name of the input resource, in the form of: `projects/{project}/locations/{location}/inputs/{inputId}`.- Throws:
ApiException- if the remote call fails
-
getInput
Returns the specified input.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { String name = InputName.of("[PROJECT]", "[LOCATION]", "[INPUT]").toString(); Input response = livestreamServiceClient.getInput(name); }- Parameters:
name- Required. The name of the input resource, in the form of: `projects/{project}/locations/{location}/inputs/{inputId}`.- Throws:
ApiException- if the remote call fails
-
getInput
Returns the specified input.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { GetInputRequest request = GetInputRequest.newBuilder() .setName(InputName.of("[PROJECT]", "[LOCATION]", "[INPUT]").toString()) .build(); Input response = livestreamServiceClient.getInput(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getInputCallable
Returns the specified input.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { GetInputRequest request = GetInputRequest.newBuilder() .setName(InputName.of("[PROJECT]", "[LOCATION]", "[INPUT]").toString()) .build(); ApiFuture<Input> future = livestreamServiceClient.getInputCallable().futureCall(request); // Do something. Input response = future.get(); } -
deleteInputAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteInputAsync(InputName name) Deletes the specified input.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { InputName name = InputName.of("[PROJECT]", "[LOCATION]", "[INPUT]"); livestreamServiceClient.deleteInputAsync(name).get(); }- Parameters:
name- Required. The name of the input resource, in the form of: `projects/{project}/locations/{location}/inputs/{inputId}`.- Throws:
ApiException- if the remote call fails
-
deleteInputAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteInputAsync(String name) Deletes the specified input.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { String name = InputName.of("[PROJECT]", "[LOCATION]", "[INPUT]").toString(); livestreamServiceClient.deleteInputAsync(name).get(); }- Parameters:
name- Required. The name of the input resource, in the form of: `projects/{project}/locations/{location}/inputs/{inputId}`.- Throws:
ApiException- if the remote call fails
-
deleteInputAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteInputAsync(DeleteInputRequest request) Deletes the specified input.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { DeleteInputRequest request = DeleteInputRequest.newBuilder() .setName(InputName.of("[PROJECT]", "[LOCATION]", "[INPUT]").toString()) .setRequestId("requestId693933066") .build(); livestreamServiceClient.deleteInputAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteInputOperationCallable
public final OperationCallable<DeleteInputRequest,com.google.protobuf.Empty, deleteInputOperationCallable()OperationMetadata> Deletes the specified input.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { DeleteInputRequest request = DeleteInputRequest.newBuilder() .setName(InputName.of("[PROJECT]", "[LOCATION]", "[INPUT]").toString()) .setRequestId("requestId693933066") .build(); OperationFuture<Empty, OperationMetadata> future = livestreamServiceClient.deleteInputOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteInputCallable
Deletes the specified input.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { DeleteInputRequest request = DeleteInputRequest.newBuilder() .setName(InputName.of("[PROJECT]", "[LOCATION]", "[INPUT]").toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = livestreamServiceClient.deleteInputCallable().futureCall(request); // Do something. future.get(); } -
updateInputAsync
public final OperationFuture<Input,OperationMetadata> updateInputAsync(Input input, com.google.protobuf.FieldMask updateMask) Updates the specified input.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { Input input = Input.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); Input response = livestreamServiceClient.updateInputAsync(input, updateMask).get(); }- Parameters:
input- Required. The input resource to be updated.updateMask- Field mask is used to specify the fields to be overwritten in the Input resource by the update. You can only update the following fields:- [`tier`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#Tier)
- [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig)
- [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule)
The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask.
If the mask is not present, then each field from the list above is updated if the field appears in the request payload. To unset a field, add the field to the update mask and remove it from the request payload.
- Throws:
ApiException- if the remote call fails
-
updateInputAsync
Updates the specified input.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { UpdateInputRequest request = UpdateInputRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setInput(Input.newBuilder().build()) .setRequestId("requestId693933066") .build(); Input response = livestreamServiceClient.updateInputAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateInputOperationCallable
public final OperationCallable<UpdateInputRequest,Input, updateInputOperationCallable()OperationMetadata> Updates the specified input.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { UpdateInputRequest request = UpdateInputRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setInput(Input.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<Input, OperationMetadata> future = livestreamServiceClient.updateInputOperationCallable().futureCall(request); // Do something. Input response = future.get(); } -
updateInputCallable
Updates the specified input.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { UpdateInputRequest request = UpdateInputRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setInput(Input.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = livestreamServiceClient.updateInputCallable().futureCall(request); // Do something. Operation response = future.get(); } -
previewInput
Preview the streaming content of the specified input.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { InputName name = InputName.of("[PROJECT]", "[LOCATION]", "[INPUT]"); PreviewInputResponse response = livestreamServiceClient.previewInput(name); }- Parameters:
name- Required. The name of the input resource, in the form of: `projects/{project}/locations/{location}/inputs/{inputId}`.- Throws:
ApiException- if the remote call fails
-
previewInput
Preview the streaming content of the specified input.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { String name = InputName.of("[PROJECT]", "[LOCATION]", "[INPUT]").toString(); PreviewInputResponse response = livestreamServiceClient.previewInput(name); }- Parameters:
name- Required. The name of the input resource, in the form of: `projects/{project}/locations/{location}/inputs/{inputId}`.- Throws:
ApiException- if the remote call fails
-
previewInput
Preview the streaming content of the specified input.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { PreviewInputRequest request = PreviewInputRequest.newBuilder() .setName(InputName.of("[PROJECT]", "[LOCATION]", "[INPUT]").toString()) .build(); PreviewInputResponse response = livestreamServiceClient.previewInput(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
previewInputCallable
Preview the streaming content of the specified input.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { PreviewInputRequest request = PreviewInputRequest.newBuilder() .setName(InputName.of("[PROJECT]", "[LOCATION]", "[INPUT]").toString()) .build(); ApiFuture<PreviewInputResponse> future = livestreamServiceClient.previewInputCallable().futureCall(request); // Do something. PreviewInputResponse response = future.get(); } -
createEvent
Creates an event with the provided unique ID in the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { ChannelName parent = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]"); Event event = Event.newBuilder().build(); String eventId = "eventId-1376502443"; Event response = livestreamServiceClient.createEvent(parent, event, eventId); }- Parameters:
parent- Required. The parent channel for the resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}`.event- Required. The event resource to be created.eventId- Required. The ID of the event resource to be created.This value must be 1-63 characters, begin and end with a lower-case letter or a number, and consist of only lower-case letters, numbers, and hyphens. In other words, it must match the following regex: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.
- Throws:
ApiException- if the remote call fails
-
createEvent
Creates an event with the provided unique ID in the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { String parent = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString(); Event event = Event.newBuilder().build(); String eventId = "eventId-1376502443"; Event response = livestreamServiceClient.createEvent(parent, event, eventId); }- Parameters:
parent- Required. The parent channel for the resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}`.event- Required. The event resource to be created.eventId- Required. The ID of the event resource to be created.This value must be 1-63 characters, begin and end with a lower-case letter or a number, and consist of only lower-case letters, numbers, and hyphens. In other words, it must match the following regex: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.
- Throws:
ApiException- if the remote call fails
-
createEvent
Creates an event with the provided unique ID in the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { CreateEventRequest request = CreateEventRequest.newBuilder() .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString()) .setEvent(Event.newBuilder().build()) .setEventId("eventId-1376502443") .setRequestId("requestId693933066") .build(); Event response = livestreamServiceClient.createEvent(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createEventCallable
Creates an event with the provided unique ID in the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { CreateEventRequest request = CreateEventRequest.newBuilder() .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString()) .setEvent(Event.newBuilder().build()) .setEventId("eventId-1376502443") .setRequestId("requestId693933066") .build(); ApiFuture<Event> future = livestreamServiceClient.createEventCallable().futureCall(request); // Do something. Event response = future.get(); } -
listEvents
Returns a list of all events in the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { ChannelName parent = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]"); for (Event element : livestreamServiceClient.listEvents(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent channel for the resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}`.- Throws:
ApiException- if the remote call fails
-
listEvents
Returns a list of all events in the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { String parent = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString(); for (Event element : livestreamServiceClient.listEvents(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent channel for the resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}`.- Throws:
ApiException- if the remote call fails
-
listEvents
Returns a list of all events in the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { ListEventsRequest request = ListEventsRequest.newBuilder() .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (Event element : livestreamServiceClient.listEvents(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listEventsPagedCallable
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); } } -
listEventsCallable
Returns a list of all events in the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { ListEventsRequest request = ListEventsRequest.newBuilder() .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListEventsResponse response = livestreamServiceClient.listEventsCallable().call(request); for (Event element : response.getEventsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getEvent
Returns the specified event.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { EventName name = EventName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[EVENT]"); Event response = livestreamServiceClient.getEvent(name); }- Parameters:
name- Required. The name of the event resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`.- Throws:
ApiException- if the remote call fails
-
getEvent
Returns the specified event.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { String name = EventName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[EVENT]").toString(); Event response = livestreamServiceClient.getEvent(name); }- Parameters:
name- Required. The name of the event resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`.- Throws:
ApiException- if the remote call fails
-
getEvent
Returns the specified event.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { GetEventRequest request = GetEventRequest.newBuilder() .setName(EventName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[EVENT]").toString()) .build(); Event response = livestreamServiceClient.getEvent(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getEventCallable
Returns the specified event.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { GetEventRequest request = GetEventRequest.newBuilder() .setName(EventName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[EVENT]").toString()) .build(); ApiFuture<Event> future = livestreamServiceClient.getEventCallable().futureCall(request); // Do something. Event response = future.get(); } -
deleteEvent
Deletes the specified event.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { EventName name = EventName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[EVENT]"); livestreamServiceClient.deleteEvent(name); }- Parameters:
name- Required. The name of the event resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`.- Throws:
ApiException- if the remote call fails
-
deleteEvent
Deletes the specified event.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { String name = EventName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[EVENT]").toString(); livestreamServiceClient.deleteEvent(name); }- Parameters:
name- Required. The name of the event resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`.- Throws:
ApiException- if the remote call fails
-
deleteEvent
Deletes the specified event.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { DeleteEventRequest request = DeleteEventRequest.newBuilder() .setName(EventName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[EVENT]").toString()) .setRequestId("requestId693933066") .build(); livestreamServiceClient.deleteEvent(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteEventCallable
Deletes the specified event.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { DeleteEventRequest request = DeleteEventRequest.newBuilder() .setName(EventName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[EVENT]").toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Empty> future = livestreamServiceClient.deleteEventCallable().futureCall(request); // Do something. future.get(); } -
listClips
Returns a list of all clips in the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { ChannelName parent = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]"); for (Clip element : livestreamServiceClient.listClips(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListClipsRequest- Throws:
ApiException- if the remote call fails
-
listClips
Returns a list of all clips in the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { String parent = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString(); for (Clip element : livestreamServiceClient.listClips(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListClipsRequest- Throws:
ApiException- if the remote call fails
-
listClips
Returns a list of all clips in the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { ListClipsRequest request = ListClipsRequest.newBuilder() .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (Clip element : livestreamServiceClient.listClips(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listClipsPagedCallable
public final UnaryCallable<ListClipsRequest,LivestreamServiceClient.ListClipsPagedResponse> listClipsPagedCallable()Returns a list of all clips in the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { ListClipsRequest request = ListClipsRequest.newBuilder() .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<Clip> future = livestreamServiceClient.listClipsPagedCallable().futureCall(request); // Do something. for (Clip element : future.get().iterateAll()) { // doThingsWith(element); } } -
listClipsCallable
Returns a list of all clips in the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { ListClipsRequest request = ListClipsRequest.newBuilder() .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListClipsResponse response = livestreamServiceClient.listClipsCallable().call(request); for (Clip element : response.getClipsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getClip
Returns the specified clip.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { ClipName name = ClipName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[CLIP]"); Clip response = livestreamServiceClient.getClip(name); }- Parameters:
name- Required. Name of the resource, in the following form: `projects/{project}/locations/{location}/channels/{channel}/clips/{clip}`.- Throws:
ApiException- if the remote call fails
-
getClip
Returns the specified clip.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { String name = ClipName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[CLIP]").toString(); Clip response = livestreamServiceClient.getClip(name); }- Parameters:
name- Required. Name of the resource, in the following form: `projects/{project}/locations/{location}/channels/{channel}/clips/{clip}`.- Throws:
ApiException- if the remote call fails
-
getClip
Returns the specified clip.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { GetClipRequest request = GetClipRequest.newBuilder() .setName(ClipName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[CLIP]").toString()) .build(); Clip response = livestreamServiceClient.getClip(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getClipCallable
Returns the specified clip.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { GetClipRequest request = GetClipRequest.newBuilder() .setName(ClipName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[CLIP]").toString()) .build(); ApiFuture<Clip> future = livestreamServiceClient.getClipCallable().futureCall(request); // Do something. Clip response = future.get(); } -
createClipAsync
public final OperationFuture<Clip,OperationMetadata> createClipAsync(ChannelName parent, Clip clip, String clipId) Creates a clip with the provided clip ID in the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { ChannelName parent = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]"); Clip clip = Clip.newBuilder().build(); String clipId = "clipId-1357703029"; Clip response = livestreamServiceClient.createClipAsync(parent, clip, clipId).get(); }- Parameters:
parent- Required. The parent resource name, in the following form: `projects/{project}/locations/{location}/channels/{channel}`.clip- Required. The resource being createdclipId- Required. The ID of the clip resource to be created.This value must be 1-63 characters, begin and end with a lower-case letter or a number, and consist of only lower-case letters, numbers, and hyphens. In other words, it must match the following regex: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.
- Throws:
ApiException- if the remote call fails
-
createClipAsync
public final OperationFuture<Clip,OperationMetadata> createClipAsync(String parent, Clip clip, String clipId) Creates a clip with the provided clip ID in the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { String parent = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString(); Clip clip = Clip.newBuilder().build(); String clipId = "clipId-1357703029"; Clip response = livestreamServiceClient.createClipAsync(parent, clip, clipId).get(); }- Parameters:
parent- Required. The parent resource name, in the following form: `projects/{project}/locations/{location}/channels/{channel}`.clip- Required. The resource being createdclipId- Required. The ID of the clip resource to be created.This value must be 1-63 characters, begin and end with a lower-case letter or a number, and consist of only lower-case letters, numbers, and hyphens. In other words, it must match the following regex: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.
- Throws:
ApiException- if the remote call fails
-
createClipAsync
Creates a clip with the provided clip ID in the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { CreateClipRequest request = CreateClipRequest.newBuilder() .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString()) .setClipId("clipId-1357703029") .setClip(Clip.newBuilder().build()) .setRequestId("requestId693933066") .build(); Clip response = livestreamServiceClient.createClipAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createClipOperationCallable
public final OperationCallable<CreateClipRequest,Clip, createClipOperationCallable()OperationMetadata> Creates a clip with the provided clip ID in the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { CreateClipRequest request = CreateClipRequest.newBuilder() .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString()) .setClipId("clipId-1357703029") .setClip(Clip.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<Clip, OperationMetadata> future = livestreamServiceClient.createClipOperationCallable().futureCall(request); // Do something. Clip response = future.get(); } -
createClipCallable
Creates a clip with the provided clip ID in the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { CreateClipRequest request = CreateClipRequest.newBuilder() .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString()) .setClipId("clipId-1357703029") .setClip(Clip.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = livestreamServiceClient.createClipCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteClipAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteClipAsync(ClipName name) Deletes the specified clip job resource. This method only deletes the clip job and does not delete the VOD clip stored in Cloud Storage.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { ClipName name = ClipName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[CLIP]"); livestreamServiceClient.deleteClipAsync(name).get(); }- Parameters:
name- Required. The name of the clip resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}/clips/{clipId}`.- Throws:
ApiException- if the remote call fails
-
deleteClipAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteClipAsync(String name) Deletes the specified clip job resource. This method only deletes the clip job and does not delete the VOD clip stored in Cloud Storage.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { String name = ClipName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[CLIP]").toString(); livestreamServiceClient.deleteClipAsync(name).get(); }- Parameters:
name- Required. The name of the clip resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}/clips/{clipId}`.- Throws:
ApiException- if the remote call fails
-
deleteClipAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteClipAsync(DeleteClipRequest request) Deletes the specified clip job resource. This method only deletes the clip job and does not delete the VOD clip stored in Cloud Storage.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { DeleteClipRequest request = DeleteClipRequest.newBuilder() .setName(ClipName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[CLIP]").toString()) .setRequestId("requestId693933066") .build(); livestreamServiceClient.deleteClipAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteClipOperationCallable
public final OperationCallable<DeleteClipRequest,com.google.protobuf.Empty, deleteClipOperationCallable()OperationMetadata> Deletes the specified clip job resource. This method only deletes the clip job and does not delete the VOD clip stored in Cloud Storage.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { DeleteClipRequest request = DeleteClipRequest.newBuilder() .setName(ClipName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[CLIP]").toString()) .setRequestId("requestId693933066") .build(); OperationFuture<Empty, OperationMetadata> future = livestreamServiceClient.deleteClipOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteClipCallable
Deletes the specified clip job resource. This method only deletes the clip job and does not delete the VOD clip stored in Cloud Storage.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { DeleteClipRequest request = DeleteClipRequest.newBuilder() .setName(ClipName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[CLIP]").toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = livestreamServiceClient.deleteClipCallable().futureCall(request); // Do something. future.get(); } -
createDvrSessionAsync
public final OperationFuture<DvrSession,OperationMetadata> createDvrSessionAsync(ChannelName parent, DvrSession dvrSession, String dvrSessionId) Creates a DVR session with the provided unique ID in the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { ChannelName parent = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]"); DvrSession dvrSession = DvrSession.newBuilder().build(); String dvrSessionId = "dvrSessionId120568849"; DvrSession response = livestreamServiceClient.createDvrSessionAsync(parent, dvrSession, dvrSessionId).get(); }- Parameters:
parent- Required. The parent resource name, in the following form: `projects/{project}/locations/{location}/channels/{channelId}`.dvrSession- Required. The resource being createddvrSessionId- Required. The ID of the DVR session resource to be created.This value must be 1-63 characters, begin and end with a lower-case letter or a number, and consist of only lower-case letters, numbers, and hyphens. In other words, it must match the following regex: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.
- Throws:
ApiException- if the remote call fails
-
createDvrSessionAsync
public final OperationFuture<DvrSession,OperationMetadata> createDvrSessionAsync(String parent, DvrSession dvrSession, String dvrSessionId) Creates a DVR session with the provided unique ID in the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { String parent = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString(); DvrSession dvrSession = DvrSession.newBuilder().build(); String dvrSessionId = "dvrSessionId120568849"; DvrSession response = livestreamServiceClient.createDvrSessionAsync(parent, dvrSession, dvrSessionId).get(); }- Parameters:
parent- Required. The parent resource name, in the following form: `projects/{project}/locations/{location}/channels/{channelId}`.dvrSession- Required. The resource being createddvrSessionId- Required. The ID of the DVR session resource to be created.This value must be 1-63 characters, begin and end with a lower-case letter or a number, and consist of only lower-case letters, numbers, and hyphens. In other words, it must match the following regex: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.
- Throws:
ApiException- if the remote call fails
-
createDvrSessionAsync
public final OperationFuture<DvrSession,OperationMetadata> createDvrSessionAsync(CreateDvrSessionRequest request) Creates a DVR session with the provided unique ID in the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { CreateDvrSessionRequest request = CreateDvrSessionRequest.newBuilder() .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString()) .setDvrSessionId("dvrSessionId120568849") .setDvrSession(DvrSession.newBuilder().build()) .setRequestId("requestId693933066") .build(); DvrSession response = livestreamServiceClient.createDvrSessionAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createDvrSessionOperationCallable
public final OperationCallable<CreateDvrSessionRequest,DvrSession, createDvrSessionOperationCallable()OperationMetadata> Creates a DVR session with the provided unique ID in the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { CreateDvrSessionRequest request = CreateDvrSessionRequest.newBuilder() .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString()) .setDvrSessionId("dvrSessionId120568849") .setDvrSession(DvrSession.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<DvrSession, OperationMetadata> future = livestreamServiceClient.createDvrSessionOperationCallable().futureCall(request); // Do something. DvrSession response = future.get(); } -
createDvrSessionCallable
Creates a DVR session with the provided unique ID in the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { CreateDvrSessionRequest request = CreateDvrSessionRequest.newBuilder() .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString()) .setDvrSessionId("dvrSessionId120568849") .setDvrSession(DvrSession.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = livestreamServiceClient.createDvrSessionCallable().futureCall(request); // Do something. Operation response = future.get(); } -
listDvrSessions
public final LivestreamServiceClient.ListDvrSessionsPagedResponse listDvrSessions(ChannelName parent) Returns a list of all DVR sessions in the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { ChannelName parent = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]"); for (DvrSession element : livestreamServiceClient.listDvrSessions(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListDvrSessionsRequest- Throws:
ApiException- if the remote call fails
-
listDvrSessions
Returns a list of all DVR sessions in the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { String parent = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString(); for (DvrSession element : livestreamServiceClient.listDvrSessions(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListDvrSessionsRequest- Throws:
ApiException- if the remote call fails
-
listDvrSessions
public final LivestreamServiceClient.ListDvrSessionsPagedResponse listDvrSessions(ListDvrSessionsRequest request) Returns a list of all DVR sessions in the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { ListDvrSessionsRequest request = ListDvrSessionsRequest.newBuilder() .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (DvrSession element : livestreamServiceClient.listDvrSessions(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listDvrSessionsPagedCallable
public final UnaryCallable<ListDvrSessionsRequest,LivestreamServiceClient.ListDvrSessionsPagedResponse> listDvrSessionsPagedCallable()Returns a list of all DVR sessions in the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { ListDvrSessionsRequest request = ListDvrSessionsRequest.newBuilder() .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<DvrSession> future = livestreamServiceClient.listDvrSessionsPagedCallable().futureCall(request); // Do something. for (DvrSession element : future.get().iterateAll()) { // doThingsWith(element); } } -
listDvrSessionsCallable
public final UnaryCallable<ListDvrSessionsRequest,ListDvrSessionsResponse> listDvrSessionsCallable()Returns a list of all DVR sessions in the specified channel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { ListDvrSessionsRequest request = ListDvrSessionsRequest.newBuilder() .setParent(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListDvrSessionsResponse response = livestreamServiceClient.listDvrSessionsCallable().call(request); for (DvrSession element : response.getDvrSessionsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getDvrSession
Returns the specified DVR session.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { DvrSessionName name = DvrSessionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[DVR_SESSION]"); DvrSession response = livestreamServiceClient.getDvrSession(name); }- Parameters:
name- Required. Name of the resource, in the following form: `projects/{project}/locations/{location}/channels/{channelId}/dvrSessions/{dvrSessionId}`.- Throws:
ApiException- if the remote call fails
-
getDvrSession
Returns the specified DVR session.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { String name = DvrSessionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[DVR_SESSION]").toString(); DvrSession response = livestreamServiceClient.getDvrSession(name); }- Parameters:
name- Required. Name of the resource, in the following form: `projects/{project}/locations/{location}/channels/{channelId}/dvrSessions/{dvrSessionId}`.- Throws:
ApiException- if the remote call fails
-
getDvrSession
Returns the specified DVR session.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { GetDvrSessionRequest request = GetDvrSessionRequest.newBuilder() .setName( DvrSessionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[DVR_SESSION]") .toString()) .build(); DvrSession response = livestreamServiceClient.getDvrSession(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getDvrSessionCallable
Returns the specified DVR session.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { GetDvrSessionRequest request = GetDvrSessionRequest.newBuilder() .setName( DvrSessionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[DVR_SESSION]") .toString()) .build(); ApiFuture<DvrSession> future = livestreamServiceClient.getDvrSessionCallable().futureCall(request); // Do something. DvrSession response = future.get(); } -
deleteDvrSessionAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDvrSessionAsync(DvrSessionName name) Deletes the specified DVR session.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { DvrSessionName name = DvrSessionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[DVR_SESSION]"); livestreamServiceClient.deleteDvrSessionAsync(name).get(); }- Parameters:
name- Required. The name of the event resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}/dvrSessions/{dvrSessionId}`.- Throws:
ApiException- if the remote call fails
-
deleteDvrSessionAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDvrSessionAsync(String name) Deletes the specified DVR session.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { String name = DvrSessionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[DVR_SESSION]").toString(); livestreamServiceClient.deleteDvrSessionAsync(name).get(); }- Parameters:
name- Required. The name of the event resource, in the form of: `projects/{project}/locations/{location}/channels/{channelId}/dvrSessions/{dvrSessionId}`.- Throws:
ApiException- if the remote call fails
-
deleteDvrSessionAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDvrSessionAsync(DeleteDvrSessionRequest request) Deletes the specified DVR session.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { DeleteDvrSessionRequest request = DeleteDvrSessionRequest.newBuilder() .setName( DvrSessionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[DVR_SESSION]") .toString()) .setRequestId("requestId693933066") .build(); livestreamServiceClient.deleteDvrSessionAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteDvrSessionOperationCallable
public final OperationCallable<DeleteDvrSessionRequest,com.google.protobuf.Empty, deleteDvrSessionOperationCallable()OperationMetadata> Deletes the specified DVR session.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { DeleteDvrSessionRequest request = DeleteDvrSessionRequest.newBuilder() .setName( DvrSessionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[DVR_SESSION]") .toString()) .setRequestId("requestId693933066") .build(); OperationFuture<Empty, OperationMetadata> future = livestreamServiceClient.deleteDvrSessionOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteDvrSessionCallable
Deletes the specified DVR session.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { DeleteDvrSessionRequest request = DeleteDvrSessionRequest.newBuilder() .setName( DvrSessionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]", "[DVR_SESSION]") .toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = livestreamServiceClient.deleteDvrSessionCallable().futureCall(request); // Do something. future.get(); } -
updateDvrSessionAsync
public final OperationFuture<DvrSession,OperationMetadata> updateDvrSessionAsync(DvrSession dvrSession, com.google.protobuf.FieldMask updateMask) Updates the specified DVR session.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { DvrSession dvrSession = DvrSession.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); DvrSession response = livestreamServiceClient.updateDvrSessionAsync(dvrSession, updateMask).get(); }- Parameters:
dvrSession- Required. The DVR session resource to be updated.updateMask- Required. Field mask is used to specify the fields to be overwritten in the DvrSession resource by the update. You can only update the following fields:- `dvrWindows`
The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask.
- Throws:
ApiException- if the remote call fails
-
updateDvrSessionAsync
public final OperationFuture<DvrSession,OperationMetadata> updateDvrSessionAsync(UpdateDvrSessionRequest request) Updates the specified DVR session.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { UpdateDvrSessionRequest request = UpdateDvrSessionRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setDvrSession(DvrSession.newBuilder().build()) .setRequestId("requestId693933066") .build(); DvrSession response = livestreamServiceClient.updateDvrSessionAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateDvrSessionOperationCallable
public final OperationCallable<UpdateDvrSessionRequest,DvrSession, updateDvrSessionOperationCallable()OperationMetadata> Updates the specified DVR session.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { UpdateDvrSessionRequest request = UpdateDvrSessionRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setDvrSession(DvrSession.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<DvrSession, OperationMetadata> future = livestreamServiceClient.updateDvrSessionOperationCallable().futureCall(request); // Do something. DvrSession response = future.get(); } -
updateDvrSessionCallable
Updates the specified DVR session.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { UpdateDvrSessionRequest request = UpdateDvrSessionRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setDvrSession(DvrSession.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = livestreamServiceClient.updateDvrSessionCallable().futureCall(request); // Do something. Operation response = future.get(); } -
createAssetAsync
public final OperationFuture<Asset,OperationMetadata> createAssetAsync(LocationName parent, Asset asset, String assetId) Creates a Asset with the provided unique ID in the specified region.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); Asset asset = Asset.newBuilder().build(); String assetId = "assetId-704776149"; Asset response = livestreamServiceClient.createAssetAsync(parent, asset, assetId).get(); }- Parameters:
parent- Required. The parent location for the resource, in the form of: `projects/{project}/locations/{location}`.asset- Required. The asset resource to be created.assetId- Required. The ID of the asset resource to be created.This value must be 1-63 characters, begin and end with a lower-case letter or a number, and consist of only lower-case letters, numbers, and hyphens. In other words, it must match the following regex: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.
- Throws:
ApiException- if the remote call fails
-
createAssetAsync
public final OperationFuture<Asset,OperationMetadata> createAssetAsync(String parent, Asset asset, String assetId) Creates a Asset with the provided unique ID in the specified region.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); Asset asset = Asset.newBuilder().build(); String assetId = "assetId-704776149"; Asset response = livestreamServiceClient.createAssetAsync(parent, asset, assetId).get(); }- Parameters:
parent- Required. The parent location for the resource, in the form of: `projects/{project}/locations/{location}`.asset- Required. The asset resource to be created.assetId- Required. The ID of the asset resource to be created.This value must be 1-63 characters, begin and end with a lower-case letter or a number, and consist of only lower-case letters, numbers, and hyphens. In other words, it must match the following regex: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.
- Throws:
ApiException- if the remote call fails
-
createAssetAsync
Creates a Asset with the provided unique ID in the specified region.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { CreateAssetRequest request = CreateAssetRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setAsset(Asset.newBuilder().build()) .setAssetId("assetId-704776149") .setRequestId("requestId693933066") .build(); Asset response = livestreamServiceClient.createAssetAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createAssetOperationCallable
public final OperationCallable<CreateAssetRequest,Asset, createAssetOperationCallable()OperationMetadata> Creates a Asset with the provided unique ID in the specified region.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { CreateAssetRequest request = CreateAssetRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setAsset(Asset.newBuilder().build()) .setAssetId("assetId-704776149") .setRequestId("requestId693933066") .build(); OperationFuture<Asset, OperationMetadata> future = livestreamServiceClient.createAssetOperationCallable().futureCall(request); // Do something. Asset response = future.get(); } -
createAssetCallable
Creates a Asset with the provided unique ID in the specified region.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { CreateAssetRequest request = CreateAssetRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setAsset(Asset.newBuilder().build()) .setAssetId("assetId-704776149") .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = livestreamServiceClient.createAssetCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteAssetAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAssetAsync(AssetName name) Deletes the specified asset if it is not used.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { AssetName name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]"); livestreamServiceClient.deleteAssetAsync(name).get(); }- Parameters:
name- Required. The name of the asset resource, in the form of: `projects/{project}/locations/{location}/assets/{assetId}`.- Throws:
ApiException- if the remote call fails
-
deleteAssetAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAssetAsync(String name) Deletes the specified asset if it is not used.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { String name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString(); livestreamServiceClient.deleteAssetAsync(name).get(); }- Parameters:
name- Required. The name of the asset resource, in the form of: `projects/{project}/locations/{location}/assets/{assetId}`.- Throws:
ApiException- if the remote call fails
-
deleteAssetAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAssetAsync(DeleteAssetRequest request) Deletes the specified asset if it is not used.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { DeleteAssetRequest request = DeleteAssetRequest.newBuilder() .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString()) .setRequestId("requestId693933066") .build(); livestreamServiceClient.deleteAssetAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteAssetOperationCallable
public final OperationCallable<DeleteAssetRequest,com.google.protobuf.Empty, deleteAssetOperationCallable()OperationMetadata> Deletes the specified asset if it is not used.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { DeleteAssetRequest request = DeleteAssetRequest.newBuilder() .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString()) .setRequestId("requestId693933066") .build(); OperationFuture<Empty, OperationMetadata> future = livestreamServiceClient.deleteAssetOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteAssetCallable
Deletes the specified asset if it is not used.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { DeleteAssetRequest request = DeleteAssetRequest.newBuilder() .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = livestreamServiceClient.deleteAssetCallable().futureCall(request); // Do something. future.get(); } -
getAsset
Returns the specified asset.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { AssetName name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]"); Asset response = livestreamServiceClient.getAsset(name); }- Parameters:
name- Required. Name of the resource, in the following form: `projects/{project}/locations/{location}/assets/{asset}`.- Throws:
ApiException- if the remote call fails
-
getAsset
Returns the specified asset.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { String name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString(); Asset response = livestreamServiceClient.getAsset(name); }- Parameters:
name- Required. Name of the resource, in the following form: `projects/{project}/locations/{location}/assets/{asset}`.- Throws:
ApiException- if the remote call fails
-
getAsset
Returns the specified asset.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { GetAssetRequest request = GetAssetRequest.newBuilder() .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString()) .build(); Asset response = livestreamServiceClient.getAsset(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getAssetCallable
Returns the specified asset.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { GetAssetRequest request = GetAssetRequest.newBuilder() .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString()) .build(); ApiFuture<Asset> future = livestreamServiceClient.getAssetCallable().futureCall(request); // Do something. Asset response = future.get(); } -
listAssets
Returns a list of all assets in the specified region.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (Asset element : livestreamServiceClient.listAssets(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent location for the resource, in the form of: `projects/{project}/locations/{location}`.- Throws:
ApiException- if the remote call fails
-
listAssets
Returns a list of all assets in the specified region.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (Asset element : livestreamServiceClient.listAssets(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent location for the resource, in the form of: `projects/{project}/locations/{location}`.- Throws:
ApiException- if the remote call fails
-
listAssets
Returns a list of all assets in the specified region.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { ListAssetsRequest request = ListAssetsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (Asset element : livestreamServiceClient.listAssets(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listAssetsPagedCallable
public final UnaryCallable<ListAssetsRequest,LivestreamServiceClient.ListAssetsPagedResponse> listAssetsPagedCallable()Returns a list of all assets in the specified region.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { ListAssetsRequest request = ListAssetsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<Asset> future = livestreamServiceClient.listAssetsPagedCallable().futureCall(request); // Do something. for (Asset element : future.get().iterateAll()) { // doThingsWith(element); } } -
listAssetsCallable
Returns a list of all assets in the specified region.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { ListAssetsRequest request = ListAssetsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListAssetsResponse response = livestreamServiceClient.listAssetsCallable().call(request); for (Asset element : response.getAssetsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getPool
Returns the specified pool.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { PoolName name = PoolName.of("[PROJECT]", "[LOCATION]", "[POOL]"); Pool response = livestreamServiceClient.getPool(name); }- Parameters:
name- Required. The name of the pool resource, in the form of: `projects/{project}/locations/{location}/pools/{poolId}`.- Throws:
ApiException- if the remote call fails
-
getPool
Returns the specified pool.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { String name = PoolName.of("[PROJECT]", "[LOCATION]", "[POOL]").toString(); Pool response = livestreamServiceClient.getPool(name); }- Parameters:
name- Required. The name of the pool resource, in the form of: `projects/{project}/locations/{location}/pools/{poolId}`.- Throws:
ApiException- if the remote call fails
-
getPool
Returns the specified pool.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { GetPoolRequest request = GetPoolRequest.newBuilder() .setName(PoolName.of("[PROJECT]", "[LOCATION]", "[POOL]").toString()) .build(); Pool response = livestreamServiceClient.getPool(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getPoolCallable
Returns the specified pool.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { GetPoolRequest request = GetPoolRequest.newBuilder() .setName(PoolName.of("[PROJECT]", "[LOCATION]", "[POOL]").toString()) .build(); ApiFuture<Pool> future = livestreamServiceClient.getPoolCallable().futureCall(request); // Do something. Pool response = future.get(); } -
updatePoolAsync
public final OperationFuture<Pool,OperationMetadata> updatePoolAsync(Pool pool, com.google.protobuf.FieldMask updateMask) Updates the specified pool.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { Pool pool = Pool.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); Pool response = livestreamServiceClient.updatePoolAsync(pool, updateMask).get(); }- Parameters:
pool- Required. The pool resource to be updated.updateMask- Field mask is used to specify the fields to be overwritten in the Pool resource by the update. You can only update the following fields:- `networkConfig`
The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask.
- Throws:
ApiException- if the remote call fails
-
updatePoolAsync
Updates the specified pool.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { UpdatePoolRequest request = UpdatePoolRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setPool(Pool.newBuilder().build()) .setRequestId("requestId693933066") .build(); Pool response = livestreamServiceClient.updatePoolAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updatePoolOperationCallable
public final OperationCallable<UpdatePoolRequest,Pool, updatePoolOperationCallable()OperationMetadata> Updates the specified pool.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { UpdatePoolRequest request = UpdatePoolRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setPool(Pool.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<Pool, OperationMetadata> future = livestreamServiceClient.updatePoolOperationCallable().futureCall(request); // Do something. Pool response = future.get(); } -
updatePoolCallable
Updates the specified pool.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { UpdatePoolRequest request = UpdatePoolRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setPool(Pool.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = livestreamServiceClient.updatePoolCallable().futureCall(request); // Do something. Operation response = future.get(); } -
listLocations
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listLocationsPagedCallable
public final UnaryCallable<ListLocationsRequest,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); } } -
listLocationsCallable
Lists information about the supported locations for this service.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListLocationsResponse response = livestreamServiceClient.listLocationsCallable().call(request); for (Location element : response.getLocationsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getLocation
Gets information about a location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); Location response = livestreamServiceClient.getLocation(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getLocationCallable
Gets information about a location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); ApiFuture<Location> future = livestreamServiceClient.getLocationCallable().futureCall(request); // Do something. Location response = future.get(); } -
close
public final void close()- Specified by:
closein interfaceAutoCloseable
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceBackgroundResource
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceBackgroundResource
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceBackgroundResource
-
shutdownNow
public void shutdownNow()- Specified by:
shutdownNowin interfaceBackgroundResource
-
awaitTermination
- Specified by:
awaitTerminationin interfaceBackgroundResource- Throws:
InterruptedException
-