Class LiveStreamServiceClient (0.54.0)

GitHub RepositoryProduct Reference

Service Description: Provides methods for handling LiveStream objects.

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()) {
   LiveStreamName name = LiveStreamName.of("[NETWORK_CODE]", "[LIVE_STREAM]");
   LiveStream response = liveStreamServiceClient.getLiveStream(name);
 }
 

Note: close() needs to be called on the LiveStreamServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

Methods
Method Description Method Variants

GetLiveStream

Retrieves a LiveStream object.

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

  • getLiveStream(GetLiveStreamRequest request)

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

  • getLiveStream(LiveStreamName name)

  • getLiveStream(String name)

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

  • getLiveStreamCallable()

ListLiveStreams

Lists LiveStream objects.

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

  • listLiveStreams(ListLiveStreamsRequest request)

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

  • listLiveStreams(NetworkName parent)

  • listLiveStreams(String parent)

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

  • listLiveStreamsPagedCallable()

  • listLiveStreamsCallable()

CreateLiveStream

Creates a LiveStream object.

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

  • createLiveStream(CreateLiveStreamRequest request)

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

  • createLiveStream(NetworkName parent, LiveStream liveStream)

  • createLiveStream(String parent, LiveStream liveStream)

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

  • createLiveStreamCallable()

BatchCreateLiveStreams

Batch creates LiveStream objects.

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

  • batchCreateLiveStreams(NetworkName parent, List<CreateLiveStreamRequest> requests)

  • batchCreateLiveStreams(String parent, List<CreateLiveStreamRequest> requests)

  • batchCreateLiveStreams(BatchCreateLiveStreamsRequest request)

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

  • batchCreateLiveStreamsCallable()

UpdateLiveStream

Updates a LiveStream object.

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

  • updateLiveStream(UpdateLiveStreamRequest request)

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

  • updateLiveStream(LiveStream liveStream, FieldMask updateMask)

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

  • updateLiveStreamCallable()

BatchUpdateLiveStreams

Batch updates LiveStream objects.

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

  • batchUpdateLiveStreams(NetworkName parent, List<UpdateLiveStreamRequest> requests)

  • batchUpdateLiveStreams(String parent, List<UpdateLiveStreamRequest> requests)

  • batchUpdateLiveStreams(BatchUpdateLiveStreamsRequest request)

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

  • batchUpdateLiveStreamsCallable()

BatchActivateLiveStreams

Batch activates LiveStream objects.

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

  • batchActivateLiveStreams(BatchActivateLiveStreamsRequest request)

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

  • batchActivateLiveStreams(NetworkName parent, List<String> names)

  • batchActivateLiveStreams(String parent, List<String> names)

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

  • batchActivateLiveStreamsCallable()

BatchPauseLiveStreams

Batch pauses LiveStream objects.

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

  • batchPauseLiveStreams(BatchPauseLiveStreamsRequest request)

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

  • batchPauseLiveStreams(NetworkName parent, List<String> names)

  • batchPauseLiveStreams(String parent, List<String> names)

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

  • batchPauseLiveStreamsCallable()

BatchArchiveLiveStreams

Batch archives LiveStream objects.

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

  • batchArchiveLiveStreams(BatchArchiveLiveStreamsRequest request)

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

  • batchArchiveLiveStreams(NetworkName parent, List<String> names)

  • batchArchiveLiveStreams(String parent, List<String> names)

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

  • batchArchiveLiveStreamsCallable()

BatchPauseAdsLiveStreams

Batch pauses ads on LiveStream objects.

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

  • batchPauseAdsLiveStreams(BatchPauseAdsLiveStreamsRequest request)

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

  • batchPauseAdsLiveStreams(NetworkName parent, List<String> names)

  • batchPauseAdsLiveStreams(String parent, List<String> names)

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

  • batchPauseAdsLiveStreamsCallable()

BatchRefreshMasterPlaylists

Batch refreshes master playlists on LiveStream objects.

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

  • batchRefreshMasterPlaylists(BatchRefreshMasterPlaylistsRequest request)

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

  • batchRefreshMasterPlaylists(NetworkName parent, List<String> names)

  • batchRefreshMasterPlaylists(String parent, List<String> names)

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

  • batchRefreshMasterPlaylistsCallable()

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

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

Inheritance

java.lang.Object > LiveStreamServiceClient

Static Methods

create()

public static final LiveStreamServiceClient create()

Constructs an instance of LiveStreamServiceClient with default settings.

Returns
Type Description
LiveStreamServiceClient
Exceptions
Type Description
IOException

create(LiveStreamServiceSettings settings)

public static final LiveStreamServiceClient create(LiveStreamServiceSettings settings)

Constructs an instance of LiveStreamServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.

Parameter
Name Description
settings LiveStreamServiceSettings
Returns
Type Description
LiveStreamServiceClient
Exceptions
Type Description
IOException

create(LiveStreamServiceStub stub)

public static final LiveStreamServiceClient create(LiveStreamServiceStub stub)

Constructs an instance of LiveStreamServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(LiveStreamServiceSettings).

Parameter
Name Description
stub LiveStreamServiceStub
Returns
Type Description
LiveStreamServiceClient

Constructors

LiveStreamServiceClient(LiveStreamServiceSettings settings)

protected LiveStreamServiceClient(LiveStreamServiceSettings settings)

Constructs an instance of LiveStreamServiceClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.

Parameter
Name Description
settings LiveStreamServiceSettings

LiveStreamServiceClient(LiveStreamServiceStub stub)

protected LiveStreamServiceClient(LiveStreamServiceStub stub)
Parameter
Name Description
stub LiveStreamServiceStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
Name Description
duration long
unit TimeUnit
Returns
Type Description
boolean
Exceptions
Type Description
InterruptedException

batchActivateLiveStreams(@Nullable NetworkName parent, List<String> names)

public final BatchActivateLiveStreamsResponse batchActivateLiveStreams(@Nullable NetworkName parent, List<String> names)

Batch activates LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
   List<String> names = new ArrayList<>();
   BatchActivateLiveStreamsResponse response =
       liveStreamServiceClient.batchActivateLiveStreams(parent, names);
 }
 
Parameters
Name Description
parent @org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkName

Required. Format: networks/{network_code}

names List<String>

Required. The resource names of the LiveStreams to activate. Format: networks/{network_code}/liveStreams/{live_stream_id}

Returns
Type Description
BatchActivateLiveStreamsResponse

batchActivateLiveStreams(BatchActivateLiveStreamsRequest request)

public final BatchActivateLiveStreamsResponse batchActivateLiveStreams(BatchActivateLiveStreamsRequest request)

Batch activates LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   BatchActivateLiveStreamsRequest request =
       BatchActivateLiveStreamsRequest.newBuilder()
           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
           .addAllNames(new ArrayList<String>())
           .build();
   BatchActivateLiveStreamsResponse response =
       liveStreamServiceClient.batchActivateLiveStreams(request);
 }
 
Parameter
Name Description
request BatchActivateLiveStreamsRequest

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

Returns
Type Description
BatchActivateLiveStreamsResponse

batchActivateLiveStreams(String parent, List<String> names)

public final BatchActivateLiveStreamsResponse batchActivateLiveStreams(String parent, List<String> names)

Batch activates LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating 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 = NetworkName.of("[NETWORK_CODE]").toString();
   List<String> names = new ArrayList<>();
   BatchActivateLiveStreamsResponse response =
       liveStreamServiceClient.batchActivateLiveStreams(parent, names);
 }
 
Parameters
Name Description
parent String

Required. Format: networks/{network_code}

names List<String>

Required. The resource names of the LiveStreams to activate. Format: networks/{network_code}/liveStreams/{live_stream_id}

Returns
Type Description
BatchActivateLiveStreamsResponse

batchActivateLiveStreamsCallable()

public final UnaryCallable<BatchActivateLiveStreamsRequest,BatchActivateLiveStreamsResponse> batchActivateLiveStreamsCallable()

Batch activates LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   BatchActivateLiveStreamsRequest request =
       BatchActivateLiveStreamsRequest.newBuilder()
           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
           .addAllNames(new ArrayList<String>())
           .build();
   ApiFuture<BatchActivateLiveStreamsResponse> future =
       liveStreamServiceClient.batchActivateLiveStreamsCallable().futureCall(request);
   // Do something.
   BatchActivateLiveStreamsResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<BatchActivateLiveStreamsRequest,BatchActivateLiveStreamsResponse>

batchArchiveLiveStreams(@Nullable NetworkName parent, List<String> names)

public final BatchArchiveLiveStreamsResponse batchArchiveLiveStreams(@Nullable NetworkName parent, List<String> names)

Batch archives LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
   List<String> names = new ArrayList<>();
   BatchArchiveLiveStreamsResponse response =
       liveStreamServiceClient.batchArchiveLiveStreams(parent, names);
 }
 
Parameters
Name Description
parent @org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkName

Required. Format: networks/{network_code}

names List<String>

Required. The resource names of the LiveStreams to archive. Format: networks/{network_code}/liveStreams/{live_stream_id}

Returns
Type Description
BatchArchiveLiveStreamsResponse

batchArchiveLiveStreams(BatchArchiveLiveStreamsRequest request)

public final BatchArchiveLiveStreamsResponse batchArchiveLiveStreams(BatchArchiveLiveStreamsRequest request)

Batch archives LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   BatchArchiveLiveStreamsRequest request =
       BatchArchiveLiveStreamsRequest.newBuilder()
           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
           .addAllNames(new ArrayList<String>())
           .build();
   BatchArchiveLiveStreamsResponse response =
       liveStreamServiceClient.batchArchiveLiveStreams(request);
 }
 
Parameter
Name Description
request BatchArchiveLiveStreamsRequest

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

Returns
Type Description
BatchArchiveLiveStreamsResponse

batchArchiveLiveStreams(String parent, List<String> names)

public final BatchArchiveLiveStreamsResponse batchArchiveLiveStreams(String parent, List<String> names)

Batch archives LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating 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 = NetworkName.of("[NETWORK_CODE]").toString();
   List<String> names = new ArrayList<>();
   BatchArchiveLiveStreamsResponse response =
       liveStreamServiceClient.batchArchiveLiveStreams(parent, names);
 }
 
Parameters
Name Description
parent String

Required. Format: networks/{network_code}

names List<String>

Required. The resource names of the LiveStreams to archive. Format: networks/{network_code}/liveStreams/{live_stream_id}

Returns
Type Description
BatchArchiveLiveStreamsResponse

batchArchiveLiveStreamsCallable()

public final UnaryCallable<BatchArchiveLiveStreamsRequest,BatchArchiveLiveStreamsResponse> batchArchiveLiveStreamsCallable()

Batch archives LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   BatchArchiveLiveStreamsRequest request =
       BatchArchiveLiveStreamsRequest.newBuilder()
           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
           .addAllNames(new ArrayList<String>())
           .build();
   ApiFuture<BatchArchiveLiveStreamsResponse> future =
       liveStreamServiceClient.batchArchiveLiveStreamsCallable().futureCall(request);
   // Do something.
   BatchArchiveLiveStreamsResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<BatchArchiveLiveStreamsRequest,BatchArchiveLiveStreamsResponse>

batchCreateLiveStreams(@Nullable NetworkName parent, List<CreateLiveStreamRequest> requests)

public final BatchCreateLiveStreamsResponse batchCreateLiveStreams(@Nullable NetworkName parent, List<CreateLiveStreamRequest> requests)

Batch creates LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
   List<CreateLiveStreamRequest> requests = new ArrayList<>();
   BatchCreateLiveStreamsResponse response =
       liveStreamServiceClient.batchCreateLiveStreams(parent, requests);
 }
 
Parameters
Name Description
parent @org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkName

Required. The parent resource where LiveStreams will be created. Format: networks/{network_code} The parent field in the CreateLiveStreamRequest must match this field.

requests List<CreateLiveStreamRequest>

Required. The LiveStream objects to create. A maximum of 100 objects can be created in a batch.

Returns
Type Description
BatchCreateLiveStreamsResponse

batchCreateLiveStreams(BatchCreateLiveStreamsRequest request)

public final BatchCreateLiveStreamsResponse batchCreateLiveStreams(BatchCreateLiveStreamsRequest request)

Batch creates LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   BatchCreateLiveStreamsRequest request =
       BatchCreateLiveStreamsRequest.newBuilder()
           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
           .addAllRequests(new ArrayList<CreateLiveStreamRequest>())
           .build();
   BatchCreateLiveStreamsResponse response =
       liveStreamServiceClient.batchCreateLiveStreams(request);
 }
 
Parameter
Name Description
request BatchCreateLiveStreamsRequest

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

Returns
Type Description
BatchCreateLiveStreamsResponse

batchCreateLiveStreams(String parent, List<CreateLiveStreamRequest> requests)

public final BatchCreateLiveStreamsResponse batchCreateLiveStreams(String parent, List<CreateLiveStreamRequest> requests)

Batch creates LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating 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 = NetworkName.of("[NETWORK_CODE]").toString();
   List<CreateLiveStreamRequest> requests = new ArrayList<>();
   BatchCreateLiveStreamsResponse response =
       liveStreamServiceClient.batchCreateLiveStreams(parent, requests);
 }
 
Parameters
Name Description
parent String

Required. The parent resource where LiveStreams will be created. Format: networks/{network_code} The parent field in the CreateLiveStreamRequest must match this field.

requests List<CreateLiveStreamRequest>

Required. The LiveStream objects to create. A maximum of 100 objects can be created in a batch.

Returns
Type Description
BatchCreateLiveStreamsResponse

batchCreateLiveStreamsCallable()

public final UnaryCallable<BatchCreateLiveStreamsRequest,BatchCreateLiveStreamsResponse> batchCreateLiveStreamsCallable()

Batch creates LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   BatchCreateLiveStreamsRequest request =
       BatchCreateLiveStreamsRequest.newBuilder()
           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
           .addAllRequests(new ArrayList<CreateLiveStreamRequest>())
           .build();
   ApiFuture<BatchCreateLiveStreamsResponse> future =
       liveStreamServiceClient.batchCreateLiveStreamsCallable().futureCall(request);
   // Do something.
   BatchCreateLiveStreamsResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<BatchCreateLiveStreamsRequest,BatchCreateLiveStreamsResponse>

batchPauseAdsLiveStreams(@Nullable NetworkName parent, List<String> names)

public final BatchPauseAdsLiveStreamsResponse batchPauseAdsLiveStreams(@Nullable NetworkName parent, List<String> names)

Batch pauses ads on LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
   List<String> names = new ArrayList<>();
   BatchPauseAdsLiveStreamsResponse response =
       liveStreamServiceClient.batchPauseAdsLiveStreams(parent, names);
 }
 
Parameters
Name Description
parent @org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkName

Required. Format: networks/{network_code}

names List<String>

Required. The resource names of the LiveStreams to pause ads on. Format: networks/{network_code}/liveStreams/{live_stream_id}

Returns
Type Description
BatchPauseAdsLiveStreamsResponse

batchPauseAdsLiveStreams(BatchPauseAdsLiveStreamsRequest request)

public final BatchPauseAdsLiveStreamsResponse batchPauseAdsLiveStreams(BatchPauseAdsLiveStreamsRequest request)

Batch pauses ads on LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   BatchPauseAdsLiveStreamsRequest request =
       BatchPauseAdsLiveStreamsRequest.newBuilder()
           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
           .addAllNames(new ArrayList<String>())
           .build();
   BatchPauseAdsLiveStreamsResponse response =
       liveStreamServiceClient.batchPauseAdsLiveStreams(request);
 }
 
Parameter
Name Description
request BatchPauseAdsLiveStreamsRequest

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

Returns
Type Description
BatchPauseAdsLiveStreamsResponse

batchPauseAdsLiveStreams(String parent, List<String> names)

public final BatchPauseAdsLiveStreamsResponse batchPauseAdsLiveStreams(String parent, List<String> names)

Batch pauses ads on LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating 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 = NetworkName.of("[NETWORK_CODE]").toString();
   List<String> names = new ArrayList<>();
   BatchPauseAdsLiveStreamsResponse response =
       liveStreamServiceClient.batchPauseAdsLiveStreams(parent, names);
 }
 
Parameters
Name Description
parent String

Required. Format: networks/{network_code}

names List<String>

Required. The resource names of the LiveStreams to pause ads on. Format: networks/{network_code}/liveStreams/{live_stream_id}

Returns
Type Description
BatchPauseAdsLiveStreamsResponse

batchPauseAdsLiveStreamsCallable()

public final UnaryCallable<BatchPauseAdsLiveStreamsRequest,BatchPauseAdsLiveStreamsResponse> batchPauseAdsLiveStreamsCallable()

Batch pauses ads on LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   BatchPauseAdsLiveStreamsRequest request =
       BatchPauseAdsLiveStreamsRequest.newBuilder()
           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
           .addAllNames(new ArrayList<String>())
           .build();
   ApiFuture<BatchPauseAdsLiveStreamsResponse> future =
       liveStreamServiceClient.batchPauseAdsLiveStreamsCallable().futureCall(request);
   // Do something.
   BatchPauseAdsLiveStreamsResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<BatchPauseAdsLiveStreamsRequest,BatchPauseAdsLiveStreamsResponse>

batchPauseLiveStreams(@Nullable NetworkName parent, List<String> names)

public final BatchPauseLiveStreamsResponse batchPauseLiveStreams(@Nullable NetworkName parent, List<String> names)

Batch pauses LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
   List<String> names = new ArrayList<>();
   BatchPauseLiveStreamsResponse response =
       liveStreamServiceClient.batchPauseLiveStreams(parent, names);
 }
 
Parameters
Name Description
parent @org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkName

Required. Format: networks/{network_code}

names List<String>

Required. The resource names of the LiveStreams to pause. Format: networks/{network_code}/liveStreams/{live_stream_id}

Returns
Type Description
BatchPauseLiveStreamsResponse

batchPauseLiveStreams(BatchPauseLiveStreamsRequest request)

public final BatchPauseLiveStreamsResponse batchPauseLiveStreams(BatchPauseLiveStreamsRequest request)

Batch pauses LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   BatchPauseLiveStreamsRequest request =
       BatchPauseLiveStreamsRequest.newBuilder()
           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
           .addAllNames(new ArrayList<String>())
           .build();
   BatchPauseLiveStreamsResponse response =
       liveStreamServiceClient.batchPauseLiveStreams(request);
 }
 
Parameter
Name Description
request BatchPauseLiveStreamsRequest

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

Returns
Type Description
BatchPauseLiveStreamsResponse

batchPauseLiveStreams(String parent, List<String> names)

public final BatchPauseLiveStreamsResponse batchPauseLiveStreams(String parent, List<String> names)

Batch pauses LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating 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 = NetworkName.of("[NETWORK_CODE]").toString();
   List<String> names = new ArrayList<>();
   BatchPauseLiveStreamsResponse response =
       liveStreamServiceClient.batchPauseLiveStreams(parent, names);
 }
 
Parameters
Name Description
parent String

Required. Format: networks/{network_code}

names List<String>

Required. The resource names of the LiveStreams to pause. Format: networks/{network_code}/liveStreams/{live_stream_id}

Returns
Type Description
BatchPauseLiveStreamsResponse

batchPauseLiveStreamsCallable()

public final UnaryCallable<BatchPauseLiveStreamsRequest,BatchPauseLiveStreamsResponse> batchPauseLiveStreamsCallable()

Batch pauses LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   BatchPauseLiveStreamsRequest request =
       BatchPauseLiveStreamsRequest.newBuilder()
           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
           .addAllNames(new ArrayList<String>())
           .build();
   ApiFuture<BatchPauseLiveStreamsResponse> future =
       liveStreamServiceClient.batchPauseLiveStreamsCallable().futureCall(request);
   // Do something.
   BatchPauseLiveStreamsResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<BatchPauseLiveStreamsRequest,BatchPauseLiveStreamsResponse>

batchRefreshMasterPlaylists(@Nullable NetworkName parent, List<String> names)

public final BatchRefreshMasterPlaylistsResponse batchRefreshMasterPlaylists(@Nullable NetworkName parent, List<String> names)

Batch refreshes master playlists on LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
   List<String> names = new ArrayList<>();
   BatchRefreshMasterPlaylistsResponse response =
       liveStreamServiceClient.batchRefreshMasterPlaylists(parent, names);
 }
 
Parameters
Name Description
parent @org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkName

Required. Format: networks/{network_code}

names List<String>

Required. The resource names of the LiveStreams to refresh master playlists on. Format: networks/{network_code}/liveStreams/{live_stream_id}

Returns
Type Description
BatchRefreshMasterPlaylistsResponse

batchRefreshMasterPlaylists(BatchRefreshMasterPlaylistsRequest request)

public final BatchRefreshMasterPlaylistsResponse batchRefreshMasterPlaylists(BatchRefreshMasterPlaylistsRequest request)

Batch refreshes master playlists on LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   BatchRefreshMasterPlaylistsRequest request =
       BatchRefreshMasterPlaylistsRequest.newBuilder()
           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
           .addAllNames(new ArrayList<String>())
           .build();
   BatchRefreshMasterPlaylistsResponse response =
       liveStreamServiceClient.batchRefreshMasterPlaylists(request);
 }
 
Parameter
Name Description
request BatchRefreshMasterPlaylistsRequest

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

Returns
Type Description
BatchRefreshMasterPlaylistsResponse

batchRefreshMasterPlaylists(String parent, List<String> names)

public final BatchRefreshMasterPlaylistsResponse batchRefreshMasterPlaylists(String parent, List<String> names)

Batch refreshes master playlists on LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating 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 = NetworkName.of("[NETWORK_CODE]").toString();
   List<String> names = new ArrayList<>();
   BatchRefreshMasterPlaylistsResponse response =
       liveStreamServiceClient.batchRefreshMasterPlaylists(parent, names);
 }
 
Parameters
Name Description
parent String

Required. Format: networks/{network_code}

names List<String>

Required. The resource names of the LiveStreams to refresh master playlists on. Format: networks/{network_code}/liveStreams/{live_stream_id}

Returns
Type Description
BatchRefreshMasterPlaylistsResponse

batchRefreshMasterPlaylistsCallable()

public final UnaryCallable<BatchRefreshMasterPlaylistsRequest,BatchRefreshMasterPlaylistsResponse> batchRefreshMasterPlaylistsCallable()

Batch refreshes master playlists on LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   BatchRefreshMasterPlaylistsRequest request =
       BatchRefreshMasterPlaylistsRequest.newBuilder()
           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
           .addAllNames(new ArrayList<String>())
           .build();
   ApiFuture<BatchRefreshMasterPlaylistsResponse> future =
       liveStreamServiceClient.batchRefreshMasterPlaylistsCallable().futureCall(request);
   // Do something.
   BatchRefreshMasterPlaylistsResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<BatchRefreshMasterPlaylistsRequest,BatchRefreshMasterPlaylistsResponse>

batchUpdateLiveStreams(@Nullable NetworkName parent, List<UpdateLiveStreamRequest> requests)

public final BatchUpdateLiveStreamsResponse batchUpdateLiveStreams(@Nullable NetworkName parent, List<UpdateLiveStreamRequest> requests)

Batch updates LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
   List<UpdateLiveStreamRequest> requests = new ArrayList<>();
   BatchUpdateLiveStreamsResponse response =
       liveStreamServiceClient.batchUpdateLiveStreams(parent, requests);
 }
 
Parameters
Name Description
parent @org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkName

Required. The parent resource where LiveStreams will be updated. Format: networks/{network_code} The parent field in the UpdateLiveStreamRequest must match this field.

requests List<UpdateLiveStreamRequest>

Required. The LiveStream objects to update. A maximum of 100 objects can be updated in a batch.

Returns
Type Description
BatchUpdateLiveStreamsResponse

batchUpdateLiveStreams(BatchUpdateLiveStreamsRequest request)

public final BatchUpdateLiveStreamsResponse batchUpdateLiveStreams(BatchUpdateLiveStreamsRequest request)

Batch updates LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   BatchUpdateLiveStreamsRequest request =
       BatchUpdateLiveStreamsRequest.newBuilder()
           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
           .addAllRequests(new ArrayList<UpdateLiveStreamRequest>())
           .build();
   BatchUpdateLiveStreamsResponse response =
       liveStreamServiceClient.batchUpdateLiveStreams(request);
 }
 
Parameter
Name Description
request BatchUpdateLiveStreamsRequest

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

Returns
Type Description
BatchUpdateLiveStreamsResponse

batchUpdateLiveStreams(String parent, List<UpdateLiveStreamRequest> requests)

public final BatchUpdateLiveStreamsResponse batchUpdateLiveStreams(String parent, List<UpdateLiveStreamRequest> requests)

Batch updates LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating 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 = NetworkName.of("[NETWORK_CODE]").toString();
   List<UpdateLiveStreamRequest> requests = new ArrayList<>();
   BatchUpdateLiveStreamsResponse response =
       liveStreamServiceClient.batchUpdateLiveStreams(parent, requests);
 }
 
Parameters
Name Description
parent String

Required. The parent resource where LiveStreams will be updated. Format: networks/{network_code} The parent field in the UpdateLiveStreamRequest must match this field.

requests List<UpdateLiveStreamRequest>

Required. The LiveStream objects to update. A maximum of 100 objects can be updated in a batch.

Returns
Type Description
BatchUpdateLiveStreamsResponse

batchUpdateLiveStreamsCallable()

public final UnaryCallable<BatchUpdateLiveStreamsRequest,BatchUpdateLiveStreamsResponse> batchUpdateLiveStreamsCallable()

Batch updates LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   BatchUpdateLiveStreamsRequest request =
       BatchUpdateLiveStreamsRequest.newBuilder()
           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
           .addAllRequests(new ArrayList<UpdateLiveStreamRequest>())
           .build();
   ApiFuture<BatchUpdateLiveStreamsResponse> future =
       liveStreamServiceClient.batchUpdateLiveStreamsCallable().futureCall(request);
   // Do something.
   BatchUpdateLiveStreamsResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<BatchUpdateLiveStreamsRequest,BatchUpdateLiveStreamsResponse>

close()

public final void close()

createLiveStream(@Nullable NetworkName parent, LiveStream liveStream)

public final LiveStream createLiveStream(@Nullable NetworkName parent, LiveStream liveStream)

Creates a LiveStream object.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
   LiveStream liveStream = LiveStream.newBuilder().build();
   LiveStream response = liveStreamServiceClient.createLiveStream(parent, liveStream);
 }
 
Parameters
Name Description
parent @org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkName

Required. The parent resource where this LiveStream will be created. Format: networks/{network_code}

liveStream LiveStream

Required. The LiveStream to create.

Returns
Type Description
LiveStream

createLiveStream(CreateLiveStreamRequest request)

public final LiveStream createLiveStream(CreateLiveStreamRequest request)

Creates a LiveStream object.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   CreateLiveStreamRequest request =
       CreateLiveStreamRequest.newBuilder()
           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
           .setLiveStream(LiveStream.newBuilder().build())
           .build();
   LiveStream response = liveStreamServiceClient.createLiveStream(request);
 }
 
Parameter
Name Description
request CreateLiveStreamRequest

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

Returns
Type Description
LiveStream

createLiveStream(String parent, LiveStream liveStream)

public final LiveStream createLiveStream(String parent, LiveStream liveStream)

Creates a LiveStream object.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating 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 = NetworkName.of("[NETWORK_CODE]").toString();
   LiveStream liveStream = LiveStream.newBuilder().build();
   LiveStream response = liveStreamServiceClient.createLiveStream(parent, liveStream);
 }
 
Parameters
Name Description
parent String

Required. The parent resource where this LiveStream will be created. Format: networks/{network_code}

liveStream LiveStream

Required. The LiveStream to create.

Returns
Type Description
LiveStream

createLiveStreamCallable()

public final UnaryCallable<CreateLiveStreamRequest,LiveStream> createLiveStreamCallable()

Creates a LiveStream object.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   CreateLiveStreamRequest request =
       CreateLiveStreamRequest.newBuilder()
           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
           .setLiveStream(LiveStream.newBuilder().build())
           .build();
   ApiFuture<LiveStream> future =
       liveStreamServiceClient.createLiveStreamCallable().futureCall(request);
   // Do something.
   LiveStream response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateLiveStreamRequest,LiveStream>

getLiveStream(@Nullable LiveStreamName name)

public final LiveStream getLiveStream(@Nullable LiveStreamName name)

Retrieves a LiveStream object.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   LiveStreamName name = LiveStreamName.of("[NETWORK_CODE]", "[LIVE_STREAM]");
   LiveStream response = liveStreamServiceClient.getLiveStream(name);
 }
 
Parameter
Name Description
name @org.jspecify.annotations.Nullable com.google.ads.admanager.v1.LiveStreamName

Required. The resource name of the LiveStream. Format: networks/{network_code}/liveStreams/{live_stream_id}

Returns
Type Description
LiveStream

getLiveStream(GetLiveStreamRequest request)

public final LiveStream getLiveStream(GetLiveStreamRequest request)

Retrieves a LiveStream object.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   GetLiveStreamRequest request =
       GetLiveStreamRequest.newBuilder()
           .setName(LiveStreamName.of("[NETWORK_CODE]", "[LIVE_STREAM]").toString())
           .build();
   LiveStream response = liveStreamServiceClient.getLiveStream(request);
 }
 
Parameter
Name Description
request GetLiveStreamRequest

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

Returns
Type Description
LiveStream

getLiveStream(String name)

public final LiveStream getLiveStream(String name)

Retrieves a LiveStream object.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating 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 = LiveStreamName.of("[NETWORK_CODE]", "[LIVE_STREAM]").toString();
   LiveStream response = liveStreamServiceClient.getLiveStream(name);
 }
 
Parameter
Name Description
name String

Required. The resource name of the LiveStream. Format: networks/{network_code}/liveStreams/{live_stream_id}

Returns
Type Description
LiveStream

getLiveStreamCallable()

public final UnaryCallable<GetLiveStreamRequest,LiveStream> getLiveStreamCallable()

Retrieves a LiveStream object.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   GetLiveStreamRequest request =
       GetLiveStreamRequest.newBuilder()
           .setName(LiveStreamName.of("[NETWORK_CODE]", "[LIVE_STREAM]").toString())
           .build();
   ApiFuture<LiveStream> future =
       liveStreamServiceClient.getLiveStreamCallable().futureCall(request);
   // Do something.
   LiveStream response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetLiveStreamRequest,LiveStream>

getSettings()

public final @Nullable LiveStreamServiceSettings getSettings()
Returns
Type Description
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.LiveStreamServiceSettings

getStub()

public LiveStreamServiceStub getStub()
Returns
Type Description
LiveStreamServiceStub

isShutdown()

public boolean isShutdown()
Returns
Type Description
boolean

isTerminated()

public boolean isTerminated()
Returns
Type Description
boolean

listLiveStreams(@Nullable NetworkName parent)

public final LiveStreamServiceClient.ListLiveStreamsPagedResponse listLiveStreams(@Nullable NetworkName parent)

Lists LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   NetworkName parent = NetworkName.of("[NETWORK_CODE]");
   for (LiveStream element : liveStreamServiceClient.listLiveStreams(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent @org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkName

Required. The parent, which owns this collection of LiveStreams. Format: networks/{network_code}

Returns
Type Description
LiveStreamServiceClient.ListLiveStreamsPagedResponse

listLiveStreams(ListLiveStreamsRequest request)

public final LiveStreamServiceClient.ListLiveStreamsPagedResponse listLiveStreams(ListLiveStreamsRequest request)

Lists LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   ListLiveStreamsRequest request =
       ListLiveStreamsRequest.newBuilder()
           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .setSkip(3532159)
           .build();
   for (LiveStream element : liveStreamServiceClient.listLiveStreams(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListLiveStreamsRequest

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

Returns
Type Description
LiveStreamServiceClient.ListLiveStreamsPagedResponse

listLiveStreams(String parent)

public final LiveStreamServiceClient.ListLiveStreamsPagedResponse listLiveStreams(String parent)

Lists LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating 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 = NetworkName.of("[NETWORK_CODE]").toString();
   for (LiveStream element : liveStreamServiceClient.listLiveStreams(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent, which owns this collection of LiveStreams. Format: networks/{network_code}

Returns
Type Description
LiveStreamServiceClient.ListLiveStreamsPagedResponse

listLiveStreamsCallable()

public final UnaryCallable<ListLiveStreamsRequest,ListLiveStreamsResponse> listLiveStreamsCallable()

Lists LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   ListLiveStreamsRequest request =
       ListLiveStreamsRequest.newBuilder()
           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .setSkip(3532159)
           .build();
   while (true) {
     ListLiveStreamsResponse response =
         liveStreamServiceClient.listLiveStreamsCallable().call(request);
     for (LiveStream element : response.getLiveStreamsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListLiveStreamsRequest,ListLiveStreamsResponse>

listLiveStreamsPagedCallable()

public final UnaryCallable<ListLiveStreamsRequest,LiveStreamServiceClient.ListLiveStreamsPagedResponse> listLiveStreamsPagedCallable()

Lists LiveStream objects.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   ListLiveStreamsRequest request =
       ListLiveStreamsRequest.newBuilder()
           .setParent(NetworkName.of("[NETWORK_CODE]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .setSkip(3532159)
           .build();
   ApiFuture<LiveStream> future =
       liveStreamServiceClient.listLiveStreamsPagedCallable().futureCall(request);
   // Do something.
   for (LiveStream element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListLiveStreamsRequest,ListLiveStreamsPagedResponse>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

updateLiveStream(LiveStream liveStream, FieldMask updateMask)

public final LiveStream updateLiveStream(LiveStream liveStream, FieldMask updateMask)

Updates a LiveStream object.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   LiveStream liveStream = LiveStream.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   LiveStream response = liveStreamServiceClient.updateLiveStream(liveStream, updateMask);
 }
 
Parameters
Name Description
liveStream LiveStream

Required. The LiveStream to update.

The LiveStream's name is used to identify the LiveStream to update.

updateMask FieldMask

Optional. The list of fields to update.

Returns
Type Description
LiveStream

updateLiveStream(UpdateLiveStreamRequest request)

public final LiveStream updateLiveStream(UpdateLiveStreamRequest request)

Updates a LiveStream object.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   UpdateLiveStreamRequest request =
       UpdateLiveStreamRequest.newBuilder()
           .setLiveStream(LiveStream.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   LiveStream response = liveStreamServiceClient.updateLiveStream(request);
 }
 
Parameter
Name Description
request UpdateLiveStreamRequest

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

Returns
Type Description
LiveStream

updateLiveStreamCallable()

public final UnaryCallable<UpdateLiveStreamRequest,LiveStream> updateLiveStreamCallable()

Updates a LiveStream object.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (LiveStreamServiceClient liveStreamServiceClient = LiveStreamServiceClient.create()) {
   UpdateLiveStreamRequest request =
       UpdateLiveStreamRequest.newBuilder()
           .setLiveStream(LiveStream.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<LiveStream> future =
       liveStreamServiceClient.updateLiveStreamCallable().futureCall(request);
   // Do something.
   LiveStream response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateLiveStreamRequest,LiveStream>