| GitHub Repository | Product Reference |
Service Description: Provides methods for handling Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
SlateName name = SlateName.of("[NETWORK_CODE]", "[SLATE]");
Slate response = slateServiceClient.getSlate(name);
}
Note: close() needs to be called on the SlateServiceClient 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 |
|---|---|---|
GetSlate |
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.
|
ListSlates |
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.
|
CreateSlate |
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.
|
BatchCreateSlates |
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.
|
UpdateSlate |
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.
|
BatchUpdateSlates |
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.
|
BatchArchiveSlates |
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.
|
BatchUnarchiveSlates |
Batch unarchives |
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 SlateServiceSettings 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
SlateServiceSettings slateServiceSettings =
SlateServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
SlateServiceClient slateServiceClient = SlateServiceClient.create(slateServiceSettings);
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
SlateServiceSettings slateServiceSettings =
SlateServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
SlateServiceClient slateServiceClient = SlateServiceClient.create(slateServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final SlateServiceClient create()Constructs an instance of SlateServiceClient with default settings.
| Returns | |
|---|---|
| Type | Description |
SlateServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(SlateServiceSettings settings)
public static final SlateServiceClient create(SlateServiceSettings settings)Constructs an instance of SlateServiceClient, 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 |
SlateServiceSettings |
| Returns | |
|---|---|
| Type | Description |
SlateServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(SlateServiceStub stub)
public static final SlateServiceClient create(SlateServiceStub stub)Constructs an instance of SlateServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(SlateServiceSettings).
| Parameter | |
|---|---|
| Name | Description |
stub |
SlateServiceStub |
| Returns | |
|---|---|
| Type | Description |
SlateServiceClient |
|
Constructors
SlateServiceClient(SlateServiceSettings settings)
protected SlateServiceClient(SlateServiceSettings settings)Constructs an instance of SlateServiceClient, 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 |
SlateServiceSettings |
SlateServiceClient(SlateServiceStub stub)
protected SlateServiceClient(SlateServiceStub stub)| Parameter | |
|---|---|
| Name | Description |
stub |
SlateServiceStub |
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 |
|
batchArchiveSlates(@Nullable NetworkName parent, List<String> names)
public final BatchArchiveSlatesResponse batchArchiveSlates(@Nullable NetworkName parent, List<String> names)Batch archives Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
List<String> names = new ArrayList<>();
BatchArchiveSlatesResponse response = slateServiceClient.batchArchiveSlates(parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. The parent resource containing the slates. Format: "networks/{network_code}" |
names |
List<String>Required. The resource names of the slates to archive. Format: "networks/{network_code}/slates/{slate_id}" |
| Returns | |
|---|---|
| Type | Description |
BatchArchiveSlatesResponse |
|
batchArchiveSlates(BatchArchiveSlatesRequest request)
public final BatchArchiveSlatesResponse batchArchiveSlates(BatchArchiveSlatesRequest request)Batch archives Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
BatchArchiveSlatesRequest request =
BatchArchiveSlatesRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllNames(new ArrayList<String>())
.build();
BatchArchiveSlatesResponse response = slateServiceClient.batchArchiveSlates(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchArchiveSlatesRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BatchArchiveSlatesResponse |
|
batchArchiveSlates(String parent, List<String> names)
public final BatchArchiveSlatesResponse batchArchiveSlates(String parent, List<String> names)Batch archives Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
List<String> names = new ArrayList<>();
BatchArchiveSlatesResponse response = slateServiceClient.batchArchiveSlates(parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource containing the slates. Format: "networks/{network_code}" |
names |
List<String>Required. The resource names of the slates to archive. Format: "networks/{network_code}/slates/{slate_id}" |
| Returns | |
|---|---|
| Type | Description |
BatchArchiveSlatesResponse |
|
batchArchiveSlatesCallable()
public final UnaryCallable<BatchArchiveSlatesRequest,BatchArchiveSlatesResponse> batchArchiveSlatesCallable()Batch archives Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
BatchArchiveSlatesRequest request =
BatchArchiveSlatesRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllNames(new ArrayList<String>())
.build();
ApiFuture<BatchArchiveSlatesResponse> future =
slateServiceClient.batchArchiveSlatesCallable().futureCall(request);
// Do something.
BatchArchiveSlatesResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchArchiveSlatesRequest,BatchArchiveSlatesResponse> |
|
batchCreateSlates(@Nullable NetworkName parent, List<CreateSlateRequest> requests)
public final BatchCreateSlatesResponse batchCreateSlates(@Nullable NetworkName parent, List<CreateSlateRequest> requests)Batch creates Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
List<CreateSlateRequest> requests = new ArrayList<>();
BatchCreateSlatesResponse response = slateServiceClient.batchCreateSlates(parent, requests);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. The parent resource where |
requests |
List<CreateSlateRequest>Required. The |
| Returns | |
|---|---|
| Type | Description |
BatchCreateSlatesResponse |
|
batchCreateSlates(BatchCreateSlatesRequest request)
public final BatchCreateSlatesResponse batchCreateSlates(BatchCreateSlatesRequest request)Batch creates Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
BatchCreateSlatesRequest request =
BatchCreateSlatesRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllRequests(new ArrayList<CreateSlateRequest>())
.build();
BatchCreateSlatesResponse response = slateServiceClient.batchCreateSlates(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchCreateSlatesRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BatchCreateSlatesResponse |
|
batchCreateSlates(String parent, List<CreateSlateRequest> requests)
public final BatchCreateSlatesResponse batchCreateSlates(String parent, List<CreateSlateRequest> requests)Batch creates Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
List<CreateSlateRequest> requests = new ArrayList<>();
BatchCreateSlatesResponse response = slateServiceClient.batchCreateSlates(parent, requests);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where |
requests |
List<CreateSlateRequest>Required. The |
| Returns | |
|---|---|
| Type | Description |
BatchCreateSlatesResponse |
|
batchCreateSlatesCallable()
public final UnaryCallable<BatchCreateSlatesRequest,BatchCreateSlatesResponse> batchCreateSlatesCallable()Batch creates Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
BatchCreateSlatesRequest request =
BatchCreateSlatesRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllRequests(new ArrayList<CreateSlateRequest>())
.build();
ApiFuture<BatchCreateSlatesResponse> future =
slateServiceClient.batchCreateSlatesCallable().futureCall(request);
// Do something.
BatchCreateSlatesResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchCreateSlatesRequest,BatchCreateSlatesResponse> |
|
batchUnarchiveSlates(@Nullable NetworkName parent, List<String> names)
public final BatchUnarchiveSlatesResponse batchUnarchiveSlates(@Nullable NetworkName parent, List<String> names)Batch unarchives Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
List<String> names = new ArrayList<>();
BatchUnarchiveSlatesResponse response =
slateServiceClient.batchUnarchiveSlates(parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. The parent resource containing the slates. Format: "networks/{network_code}" |
names |
List<String>Required. The resource names of the slates to unarchive. Format: "networks/{network_code}/slates/{slate_id}" |
| Returns | |
|---|---|
| Type | Description |
BatchUnarchiveSlatesResponse |
|
batchUnarchiveSlates(BatchUnarchiveSlatesRequest request)
public final BatchUnarchiveSlatesResponse batchUnarchiveSlates(BatchUnarchiveSlatesRequest request)Batch unarchives Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
BatchUnarchiveSlatesRequest request =
BatchUnarchiveSlatesRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllNames(new ArrayList<String>())
.build();
BatchUnarchiveSlatesResponse response = slateServiceClient.batchUnarchiveSlates(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchUnarchiveSlatesRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BatchUnarchiveSlatesResponse |
|
batchUnarchiveSlates(String parent, List<String> names)
public final BatchUnarchiveSlatesResponse batchUnarchiveSlates(String parent, List<String> names)Batch unarchives Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
List<String> names = new ArrayList<>();
BatchUnarchiveSlatesResponse response =
slateServiceClient.batchUnarchiveSlates(parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource containing the slates. Format: "networks/{network_code}" |
names |
List<String>Required. The resource names of the slates to unarchive. Format: "networks/{network_code}/slates/{slate_id}" |
| Returns | |
|---|---|
| Type | Description |
BatchUnarchiveSlatesResponse |
|
batchUnarchiveSlatesCallable()
public final UnaryCallable<BatchUnarchiveSlatesRequest,BatchUnarchiveSlatesResponse> batchUnarchiveSlatesCallable()Batch unarchives Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
BatchUnarchiveSlatesRequest request =
BatchUnarchiveSlatesRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllNames(new ArrayList<String>())
.build();
ApiFuture<BatchUnarchiveSlatesResponse> future =
slateServiceClient.batchUnarchiveSlatesCallable().futureCall(request);
// Do something.
BatchUnarchiveSlatesResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchUnarchiveSlatesRequest,BatchUnarchiveSlatesResponse> |
|
batchUpdateSlates(@Nullable NetworkName parent, List<UpdateSlateRequest> requests)
public final BatchUpdateSlatesResponse batchUpdateSlates(@Nullable NetworkName parent, List<UpdateSlateRequest> requests)Batch updates Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
List<UpdateSlateRequest> requests = new ArrayList<>();
BatchUpdateSlatesResponse response = slateServiceClient.batchUpdateSlates(parent, requests);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. The parent resource where |
requests |
List<UpdateSlateRequest>Required. The |
| Returns | |
|---|---|
| Type | Description |
BatchUpdateSlatesResponse |
|
batchUpdateSlates(BatchUpdateSlatesRequest request)
public final BatchUpdateSlatesResponse batchUpdateSlates(BatchUpdateSlatesRequest request)Batch updates Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
BatchUpdateSlatesRequest request =
BatchUpdateSlatesRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllRequests(new ArrayList<UpdateSlateRequest>())
.build();
BatchUpdateSlatesResponse response = slateServiceClient.batchUpdateSlates(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchUpdateSlatesRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BatchUpdateSlatesResponse |
|
batchUpdateSlates(String parent, List<UpdateSlateRequest> requests)
public final BatchUpdateSlatesResponse batchUpdateSlates(String parent, List<UpdateSlateRequest> requests)Batch updates Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
List<UpdateSlateRequest> requests = new ArrayList<>();
BatchUpdateSlatesResponse response = slateServiceClient.batchUpdateSlates(parent, requests);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where |
requests |
List<UpdateSlateRequest>Required. The |
| Returns | |
|---|---|
| Type | Description |
BatchUpdateSlatesResponse |
|
batchUpdateSlatesCallable()
public final UnaryCallable<BatchUpdateSlatesRequest,BatchUpdateSlatesResponse> batchUpdateSlatesCallable()Batch updates Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
BatchUpdateSlatesRequest request =
BatchUpdateSlatesRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllRequests(new ArrayList<UpdateSlateRequest>())
.build();
ApiFuture<BatchUpdateSlatesResponse> future =
slateServiceClient.batchUpdateSlatesCallable().futureCall(request);
// Do something.
BatchUpdateSlatesResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchUpdateSlatesRequest,BatchUpdateSlatesResponse> |
|
close()
public final void close()createSlate(@Nullable NetworkName parent, Slate slate)
public final Slate createSlate(@Nullable NetworkName parent, Slate slate)Creates a Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
Slate slate = Slate.newBuilder().build();
Slate response = slateServiceClient.createSlate(parent, slate);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. The parent resource where this |
slate |
SlateRequired. The |
| Returns | |
|---|---|
| Type | Description |
Slate |
|
createSlate(CreateSlateRequest request)
public final Slate createSlate(CreateSlateRequest request)Creates a Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
CreateSlateRequest request =
CreateSlateRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setSlate(Slate.newBuilder().build())
.build();
Slate response = slateServiceClient.createSlate(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateSlateRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Slate |
|
createSlate(String parent, Slate slate)
public final Slate createSlate(String parent, Slate slate)Creates a Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
Slate slate = Slate.newBuilder().build();
Slate response = slateServiceClient.createSlate(parent, slate);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where this |
slate |
SlateRequired. The |
| Returns | |
|---|---|
| Type | Description |
Slate |
|
createSlateCallable()
public final UnaryCallable<CreateSlateRequest,Slate> createSlateCallable()Creates a Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
CreateSlateRequest request =
CreateSlateRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setSlate(Slate.newBuilder().build())
.build();
ApiFuture<Slate> future = slateServiceClient.createSlateCallable().futureCall(request);
// Do something.
Slate response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateSlateRequest,Slate> |
|
getSettings()
public final @Nullable SlateServiceSettings getSettings()| Returns | |
|---|---|
| Type | Description |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.SlateServiceSettings |
|
getSlate(@Nullable SlateName name)
public final Slate getSlate(@Nullable SlateName name)Retrieves a Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
SlateName name = SlateName.of("[NETWORK_CODE]", "[SLATE]");
Slate response = slateServiceClient.getSlate(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.SlateNameRequired. The resource name of the Slate to retrieve. Format:
|
| Returns | |
|---|---|
| Type | Description |
Slate |
|
getSlate(GetSlateRequest request)
public final Slate getSlate(GetSlateRequest request)Retrieves a Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
GetSlateRequest request =
GetSlateRequest.newBuilder()
.setName(SlateName.of("[NETWORK_CODE]", "[SLATE]").toString())
.build();
Slate response = slateServiceClient.getSlate(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetSlateRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Slate |
|
getSlate(String name)
public final Slate getSlate(String name)Retrieves a Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
String name = SlateName.of("[NETWORK_CODE]", "[SLATE]").toString();
Slate response = slateServiceClient.getSlate(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The resource name of the Slate to retrieve. Format:
|
| Returns | |
|---|---|
| Type | Description |
Slate |
|
getSlateCallable()
public final UnaryCallable<GetSlateRequest,Slate> getSlateCallable()Retrieves a Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
GetSlateRequest request =
GetSlateRequest.newBuilder()
.setName(SlateName.of("[NETWORK_CODE]", "[SLATE]").toString())
.build();
ApiFuture<Slate> future = slateServiceClient.getSlateCallable().futureCall(request);
// Do something.
Slate response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetSlateRequest,Slate> |
|
getStub()
public SlateServiceStub getStub()| Returns | |
|---|---|
| Type | Description |
SlateServiceStub |
|
isShutdown()
public boolean isShutdown()| Returns | |
|---|---|
| Type | Description |
boolean |
|
isTerminated()
public boolean isTerminated()| Returns | |
|---|---|
| Type | Description |
boolean |
|
listSlates(@Nullable NetworkName parent)
public final SlateServiceClient.ListSlatesPagedResponse listSlates(@Nullable NetworkName parent)Lists Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
for (Slate element : slateServiceClient.listSlates(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. The parent resource containing the Slates. Format:
|
| Returns | |
|---|---|
| Type | Description |
SlateServiceClient.ListSlatesPagedResponse |
|
listSlates(ListSlatesRequest request)
public final SlateServiceClient.ListSlatesPagedResponse listSlates(ListSlatesRequest request)Lists Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
ListSlatesRequest request =
ListSlatesRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.setSkip(3532159)
.build();
for (Slate element : slateServiceClient.listSlates(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListSlatesRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
SlateServiceClient.ListSlatesPagedResponse |
|
listSlates(String parent)
public final SlateServiceClient.ListSlatesPagedResponse listSlates(String parent)Lists Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
for (Slate element : slateServiceClient.listSlates(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource containing the Slates. Format:
|
| Returns | |
|---|---|
| Type | Description |
SlateServiceClient.ListSlatesPagedResponse |
|
listSlatesCallable()
public final UnaryCallable<ListSlatesRequest,ListSlatesResponse> listSlatesCallable()Lists Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
ListSlatesRequest request =
ListSlatesRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.setSkip(3532159)
.build();
while (true) {
ListSlatesResponse response = slateServiceClient.listSlatesCallable().call(request);
for (Slate element : response.getSlatesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListSlatesRequest,ListSlatesResponse> |
|
listSlatesPagedCallable()
public final UnaryCallable<ListSlatesRequest,SlateServiceClient.ListSlatesPagedResponse> listSlatesPagedCallable()Lists Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
ListSlatesRequest request =
ListSlatesRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.setSkip(3532159)
.build();
ApiFuture<Slate> future = slateServiceClient.listSlatesPagedCallable().futureCall(request);
// Do something.
for (Slate element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListSlatesRequest,ListSlatesPagedResponse> |
|
shutdown()
public void shutdown()shutdownNow()
public void shutdownNow()updateSlate(Slate slate, FieldMask updateMask)
public final Slate updateSlate(Slate slate, FieldMask updateMask)Updates a Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
Slate slate = Slate.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Slate response = slateServiceClient.updateSlate(slate, updateMask);
}
| Parameters | |
|---|---|
| Name | Description |
slate |
SlateRequired. The The |
updateMask |
FieldMaskOptional. The list of fields to update. |
| Returns | |
|---|---|
| Type | Description |
Slate |
|
updateSlate(UpdateSlateRequest request)
public final Slate updateSlate(UpdateSlateRequest request)Updates a Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
UpdateSlateRequest request =
UpdateSlateRequest.newBuilder()
.setSlate(Slate.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Slate response = slateServiceClient.updateSlate(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateSlateRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Slate |
|
updateSlateCallable()
public final UnaryCallable<UpdateSlateRequest,Slate> updateSlateCallable()Updates a Slate 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 (SlateServiceClient slateServiceClient = SlateServiceClient.create()) {
UpdateSlateRequest request =
UpdateSlateRequest.newBuilder()
.setSlate(Slate.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Slate> future = slateServiceClient.updateSlateCallable().futureCall(request);
// Do something.
Slate response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateSlateRequest,Slate> |
|