| GitHub Repository | Product 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().
| Method | Description | Method Variants |
|---|---|---|
GetLiveStream |
Retrieves a |
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.
|
ListLiveStreams |
Lists |
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.
|
CreateLiveStream |
Creates a |
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.
|
BatchCreateLiveStreams |
Batch creates |
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.
|
UpdateLiveStream |
Updates a |
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.
|
BatchUpdateLiveStreams |
Batch updates |
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.
|
BatchActivateLiveStreams |
Batch activates |
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.
|
BatchPauseLiveStreams |
Batch pauses |
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.
|
BatchArchiveLiveStreams |
Batch archives |
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.
|
BatchPauseAdsLiveStreams |
Batch pauses ads on |
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.
|
BatchRefreshMasterPlaylists |
Batch refreshes master playlists on |
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.
|
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.
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.NetworkNameRequired. Format: |
names |
List<String>Required. The resource names of the |
| 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 |
BatchActivateLiveStreamsRequestThe 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 |
StringRequired. Format: |
names |
List<String>Required. The resource names of the |
| 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.NetworkNameRequired. Format: |
names |
List<String>Required. The resource names of the |
| 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 |
BatchArchiveLiveStreamsRequestThe 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 |
StringRequired. Format: |
names |
List<String>Required. The resource names of the |
| 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.NetworkNameRequired. The parent resource where |
requests |
List<CreateLiveStreamRequest>Required. The |
| 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 |
BatchCreateLiveStreamsRequestThe 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 |
StringRequired. The parent resource where |
requests |
List<CreateLiveStreamRequest>Required. The |
| 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.NetworkNameRequired. Format: |
names |
List<String>Required. The resource names of the |
| 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 |
BatchPauseAdsLiveStreamsRequestThe 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 |
StringRequired. Format: |
names |
List<String>Required. The resource names of the |
| 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.NetworkNameRequired. Format: |
names |
List<String>Required. The resource names of the |
| 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 |
BatchPauseLiveStreamsRequestThe 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 |
StringRequired. Format: |
names |
List<String>Required. The resource names of the |
| 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.NetworkNameRequired. Format: |
names |
List<String>Required. The resource names of the |
| 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 |
BatchRefreshMasterPlaylistsRequestThe 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 |
StringRequired. Format: |
names |
List<String>Required. The resource names of the |
| 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.NetworkNameRequired. The parent resource where |
requests |
List<UpdateLiveStreamRequest>Required. The |
| 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 |
BatchUpdateLiveStreamsRequestThe 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 |
StringRequired. The parent resource where |
requests |
List<UpdateLiveStreamRequest>Required. The |
| 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.NetworkNameRequired. The parent resource where this |
liveStream |
LiveStreamRequired. The |
| 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 |
CreateLiveStreamRequestThe 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 |
StringRequired. The parent resource where this |
liveStream |
LiveStreamRequired. The |
| 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.LiveStreamNameRequired. The resource name of the LiveStream. Format:
|
| 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 |
GetLiveStreamRequestThe 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 |
StringRequired. The resource name of the LiveStream. Format:
|
| 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.NetworkNameRequired. The parent, which owns this collection of LiveStreams. Format:
|
| 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 |
ListLiveStreamsRequestThe 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 |
StringRequired. The parent, which owns this collection of LiveStreams. Format:
|
| 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 |
LiveStreamRequired. The The |
updateMask |
FieldMaskOptional. 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 |
UpdateLiveStreamRequestThe 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> |
|