| GitHub Repository | Product Reference |
Service Description: Provides methods for handling CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
CreativeWrapperName name = CreativeWrapperName.of("[NETWORK_CODE]", "[CREATIVE_WRAPPER]");
CreativeWrapper response = creativeWrapperServiceClient.getCreativeWrapper(name);
}
Note: close() needs to be called on the CreativeWrapperServiceClient 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 |
|---|---|---|
GetCreativeWrapper |
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.
|
ListCreativeWrappers |
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.
|
CreateCreativeWrapper |
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.
|
BatchCreateCreativeWrappers |
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.
|
UpdateCreativeWrapper |
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.
|
BatchUpdateCreativeWrappers |
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.
|
BatchActivateCreativeWrappers |
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.
|
BatchDeactivateCreativeWrappers |
Deactivates a list of |
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 CreativeWrapperServiceSettings 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
CreativeWrapperServiceSettings creativeWrapperServiceSettings =
CreativeWrapperServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create(creativeWrapperServiceSettings);
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
CreativeWrapperServiceSettings creativeWrapperServiceSettings =
CreativeWrapperServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create(creativeWrapperServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final CreativeWrapperServiceClient create()Constructs an instance of CreativeWrapperServiceClient with default settings.
| Returns | |
|---|---|
| Type | Description |
CreativeWrapperServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(CreativeWrapperServiceSettings settings)
public static final CreativeWrapperServiceClient create(CreativeWrapperServiceSettings settings)Constructs an instance of CreativeWrapperServiceClient, 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 |
CreativeWrapperServiceSettings |
| Returns | |
|---|---|
| Type | Description |
CreativeWrapperServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(CreativeWrapperServiceStub stub)
public static final CreativeWrapperServiceClient create(CreativeWrapperServiceStub stub)Constructs an instance of CreativeWrapperServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(CreativeWrapperServiceSettings).
| Parameter | |
|---|---|
| Name | Description |
stub |
CreativeWrapperServiceStub |
| Returns | |
|---|---|
| Type | Description |
CreativeWrapperServiceClient |
|
Constructors
CreativeWrapperServiceClient(CreativeWrapperServiceSettings settings)
protected CreativeWrapperServiceClient(CreativeWrapperServiceSettings settings)Constructs an instance of CreativeWrapperServiceClient, 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 |
CreativeWrapperServiceSettings |
CreativeWrapperServiceClient(CreativeWrapperServiceStub stub)
protected CreativeWrapperServiceClient(CreativeWrapperServiceStub stub)| Parameter | |
|---|---|
| Name | Description |
stub |
CreativeWrapperServiceStub |
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 |
|
batchActivateCreativeWrappers(@Nullable NetworkName parent, List<String> names)
public final BatchActivateCreativeWrappersResponse batchActivateCreativeWrappers(@Nullable NetworkName parent, List<String> names)Batch activates CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
List<String> names = new ArrayList<>();
BatchActivateCreativeWrappersResponse response =
creativeWrapperServiceClient.batchActivateCreativeWrappers(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 |
BatchActivateCreativeWrappersResponse |
|
batchActivateCreativeWrappers(BatchActivateCreativeWrappersRequest request)
public final BatchActivateCreativeWrappersResponse batchActivateCreativeWrappers(BatchActivateCreativeWrappersRequest request)Batch activates CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
BatchActivateCreativeWrappersRequest request =
BatchActivateCreativeWrappersRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllNames(new ArrayList<String>())
.build();
BatchActivateCreativeWrappersResponse response =
creativeWrapperServiceClient.batchActivateCreativeWrappers(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchActivateCreativeWrappersRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BatchActivateCreativeWrappersResponse |
|
batchActivateCreativeWrappers(String parent, List<String> names)
public final BatchActivateCreativeWrappersResponse batchActivateCreativeWrappers(String parent, List<String> names)Batch activates CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
List<String> names = new ArrayList<>();
BatchActivateCreativeWrappersResponse response =
creativeWrapperServiceClient.batchActivateCreativeWrappers(parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. Format: |
names |
List<String>Required. The resource names of the |
| Returns | |
|---|---|
| Type | Description |
BatchActivateCreativeWrappersResponse |
|
batchActivateCreativeWrappersCallable()
public final UnaryCallable<BatchActivateCreativeWrappersRequest,BatchActivateCreativeWrappersResponse> batchActivateCreativeWrappersCallable()Batch activates CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
BatchActivateCreativeWrappersRequest request =
BatchActivateCreativeWrappersRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllNames(new ArrayList<String>())
.build();
ApiFuture<BatchActivateCreativeWrappersResponse> future =
creativeWrapperServiceClient.batchActivateCreativeWrappersCallable().futureCall(request);
// Do something.
BatchActivateCreativeWrappersResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchActivateCreativeWrappersRequest,BatchActivateCreativeWrappersResponse> |
|
batchCreateCreativeWrappers(@Nullable NetworkName parent, List<CreateCreativeWrapperRequest> requests)
public final BatchCreateCreativeWrappersResponse batchCreateCreativeWrappers(@Nullable NetworkName parent, List<CreateCreativeWrapperRequest> requests)Creates CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
List<CreateCreativeWrapperRequest> requests = new ArrayList<>();
BatchCreateCreativeWrappersResponse response =
creativeWrapperServiceClient.batchCreateCreativeWrappers(parent, requests);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. The parent resource where |
requests |
List<CreateCreativeWrapperRequest>Required. The |
| Returns | |
|---|---|
| Type | Description |
BatchCreateCreativeWrappersResponse |
|
batchCreateCreativeWrappers(BatchCreateCreativeWrappersRequest request)
public final BatchCreateCreativeWrappersResponse batchCreateCreativeWrappers(BatchCreateCreativeWrappersRequest request)Creates CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
BatchCreateCreativeWrappersRequest request =
BatchCreateCreativeWrappersRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllRequests(new ArrayList<CreateCreativeWrapperRequest>())
.build();
BatchCreateCreativeWrappersResponse response =
creativeWrapperServiceClient.batchCreateCreativeWrappers(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchCreateCreativeWrappersRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BatchCreateCreativeWrappersResponse |
|
batchCreateCreativeWrappers(String parent, List<CreateCreativeWrapperRequest> requests)
public final BatchCreateCreativeWrappersResponse batchCreateCreativeWrappers(String parent, List<CreateCreativeWrapperRequest> requests)Creates CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
List<CreateCreativeWrapperRequest> requests = new ArrayList<>();
BatchCreateCreativeWrappersResponse response =
creativeWrapperServiceClient.batchCreateCreativeWrappers(parent, requests);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where |
requests |
List<CreateCreativeWrapperRequest>Required. The |
| Returns | |
|---|---|
| Type | Description |
BatchCreateCreativeWrappersResponse |
|
batchCreateCreativeWrappersCallable()
public final UnaryCallable<BatchCreateCreativeWrappersRequest,BatchCreateCreativeWrappersResponse> batchCreateCreativeWrappersCallable()Creates CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
BatchCreateCreativeWrappersRequest request =
BatchCreateCreativeWrappersRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllRequests(new ArrayList<CreateCreativeWrapperRequest>())
.build();
ApiFuture<BatchCreateCreativeWrappersResponse> future =
creativeWrapperServiceClient.batchCreateCreativeWrappersCallable().futureCall(request);
// Do something.
BatchCreateCreativeWrappersResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchCreateCreativeWrappersRequest,BatchCreateCreativeWrappersResponse> |
|
batchDeactivateCreativeWrappers(@Nullable NetworkName parent, List<String> names)
public final BatchDeactivateCreativeWrappersResponse batchDeactivateCreativeWrappers(@Nullable NetworkName parent, List<String> names)Deactivates a list of CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
List<String> names = new ArrayList<>();
BatchDeactivateCreativeWrappersResponse response =
creativeWrapperServiceClient.batchDeactivateCreativeWrappers(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 |
BatchDeactivateCreativeWrappersResponse |
|
batchDeactivateCreativeWrappers(BatchDeactivateCreativeWrappersRequest request)
public final BatchDeactivateCreativeWrappersResponse batchDeactivateCreativeWrappers(BatchDeactivateCreativeWrappersRequest request)Deactivates a list of CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
BatchDeactivateCreativeWrappersRequest request =
BatchDeactivateCreativeWrappersRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllNames(new ArrayList<String>())
.build();
BatchDeactivateCreativeWrappersResponse response =
creativeWrapperServiceClient.batchDeactivateCreativeWrappers(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchDeactivateCreativeWrappersRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BatchDeactivateCreativeWrappersResponse |
|
batchDeactivateCreativeWrappers(String parent, List<String> names)
public final BatchDeactivateCreativeWrappersResponse batchDeactivateCreativeWrappers(String parent, List<String> names)Deactivates a list of CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
List<String> names = new ArrayList<>();
BatchDeactivateCreativeWrappersResponse response =
creativeWrapperServiceClient.batchDeactivateCreativeWrappers(parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. Format: |
names |
List<String>Required. The resource names of the |
| Returns | |
|---|---|
| Type | Description |
BatchDeactivateCreativeWrappersResponse |
|
batchDeactivateCreativeWrappersCallable()
public final UnaryCallable<BatchDeactivateCreativeWrappersRequest,BatchDeactivateCreativeWrappersResponse> batchDeactivateCreativeWrappersCallable()Deactivates a list of CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
BatchDeactivateCreativeWrappersRequest request =
BatchDeactivateCreativeWrappersRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllNames(new ArrayList<String>())
.build();
ApiFuture<BatchDeactivateCreativeWrappersResponse> future =
creativeWrapperServiceClient
.batchDeactivateCreativeWrappersCallable()
.futureCall(request);
// Do something.
BatchDeactivateCreativeWrappersResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchDeactivateCreativeWrappersRequest,BatchDeactivateCreativeWrappersResponse> |
|
batchUpdateCreativeWrappers(@Nullable NetworkName parent, List<UpdateCreativeWrapperRequest> requests)
public final BatchUpdateCreativeWrappersResponse batchUpdateCreativeWrappers(@Nullable NetworkName parent, List<UpdateCreativeWrapperRequest> requests)Batch updates CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
List<UpdateCreativeWrapperRequest> requests = new ArrayList<>();
BatchUpdateCreativeWrappersResponse response =
creativeWrapperServiceClient.batchUpdateCreativeWrappers(parent, requests);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. The parent resource where |
requests |
List<UpdateCreativeWrapperRequest>Required. The |
| Returns | |
|---|---|
| Type | Description |
BatchUpdateCreativeWrappersResponse |
|
batchUpdateCreativeWrappers(BatchUpdateCreativeWrappersRequest request)
public final BatchUpdateCreativeWrappersResponse batchUpdateCreativeWrappers(BatchUpdateCreativeWrappersRequest request)Batch updates CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
BatchUpdateCreativeWrappersRequest request =
BatchUpdateCreativeWrappersRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllRequests(new ArrayList<UpdateCreativeWrapperRequest>())
.build();
BatchUpdateCreativeWrappersResponse response =
creativeWrapperServiceClient.batchUpdateCreativeWrappers(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchUpdateCreativeWrappersRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BatchUpdateCreativeWrappersResponse |
|
batchUpdateCreativeWrappers(String parent, List<UpdateCreativeWrapperRequest> requests)
public final BatchUpdateCreativeWrappersResponse batchUpdateCreativeWrappers(String parent, List<UpdateCreativeWrapperRequest> requests)Batch updates CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
List<UpdateCreativeWrapperRequest> requests = new ArrayList<>();
BatchUpdateCreativeWrappersResponse response =
creativeWrapperServiceClient.batchUpdateCreativeWrappers(parent, requests);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where |
requests |
List<UpdateCreativeWrapperRequest>Required. The |
| Returns | |
|---|---|
| Type | Description |
BatchUpdateCreativeWrappersResponse |
|
batchUpdateCreativeWrappersCallable()
public final UnaryCallable<BatchUpdateCreativeWrappersRequest,BatchUpdateCreativeWrappersResponse> batchUpdateCreativeWrappersCallable()Batch updates CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
BatchUpdateCreativeWrappersRequest request =
BatchUpdateCreativeWrappersRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllRequests(new ArrayList<UpdateCreativeWrapperRequest>())
.build();
ApiFuture<BatchUpdateCreativeWrappersResponse> future =
creativeWrapperServiceClient.batchUpdateCreativeWrappersCallable().futureCall(request);
// Do something.
BatchUpdateCreativeWrappersResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchUpdateCreativeWrappersRequest,BatchUpdateCreativeWrappersResponse> |
|
close()
public final void close()createCreativeWrapper(@Nullable NetworkName parent, CreativeWrapper creativeWrapper)
public final CreativeWrapper createCreativeWrapper(@Nullable NetworkName parent, CreativeWrapper creativeWrapper)Creates a CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
CreativeWrapper creativeWrapper = CreativeWrapper.newBuilder().build();
CreativeWrapper response =
creativeWrapperServiceClient.createCreativeWrapper(parent, creativeWrapper);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. The parent resource where this |
creativeWrapper |
CreativeWrapperRequired. The |
| Returns | |
|---|---|
| Type | Description |
CreativeWrapper |
|
createCreativeWrapper(CreateCreativeWrapperRequest request)
public final CreativeWrapper createCreativeWrapper(CreateCreativeWrapperRequest request)Creates a CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
CreateCreativeWrapperRequest request =
CreateCreativeWrapperRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setCreativeWrapper(CreativeWrapper.newBuilder().build())
.build();
CreativeWrapper response = creativeWrapperServiceClient.createCreativeWrapper(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateCreativeWrapperRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
CreativeWrapper |
|
createCreativeWrapper(String parent, CreativeWrapper creativeWrapper)
public final CreativeWrapper createCreativeWrapper(String parent, CreativeWrapper creativeWrapper)Creates a CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
CreativeWrapper creativeWrapper = CreativeWrapper.newBuilder().build();
CreativeWrapper response =
creativeWrapperServiceClient.createCreativeWrapper(parent, creativeWrapper);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where this |
creativeWrapper |
CreativeWrapperRequired. The |
| Returns | |
|---|---|
| Type | Description |
CreativeWrapper |
|
createCreativeWrapperCallable()
public final UnaryCallable<CreateCreativeWrapperRequest,CreativeWrapper> createCreativeWrapperCallable()Creates a CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
CreateCreativeWrapperRequest request =
CreateCreativeWrapperRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setCreativeWrapper(CreativeWrapper.newBuilder().build())
.build();
ApiFuture<CreativeWrapper> future =
creativeWrapperServiceClient.createCreativeWrapperCallable().futureCall(request);
// Do something.
CreativeWrapper response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateCreativeWrapperRequest,CreativeWrapper> |
|
getCreativeWrapper(@Nullable CreativeWrapperName name)
public final CreativeWrapper getCreativeWrapper(@Nullable CreativeWrapperName name)Retrieves a CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
CreativeWrapperName name = CreativeWrapperName.of("[NETWORK_CODE]", "[CREATIVE_WRAPPER]");
CreativeWrapper response = creativeWrapperServiceClient.getCreativeWrapper(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.CreativeWrapperNameRequired. The resource name of the CreativeWrapper. Format:
|
| Returns | |
|---|---|
| Type | Description |
CreativeWrapper |
|
getCreativeWrapper(GetCreativeWrapperRequest request)
public final CreativeWrapper getCreativeWrapper(GetCreativeWrapperRequest request)Retrieves a CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
GetCreativeWrapperRequest request =
GetCreativeWrapperRequest.newBuilder()
.setName(CreativeWrapperName.of("[NETWORK_CODE]", "[CREATIVE_WRAPPER]").toString())
.build();
CreativeWrapper response = creativeWrapperServiceClient.getCreativeWrapper(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetCreativeWrapperRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
CreativeWrapper |
|
getCreativeWrapper(String name)
public final CreativeWrapper getCreativeWrapper(String name)Retrieves a CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
String name = CreativeWrapperName.of("[NETWORK_CODE]", "[CREATIVE_WRAPPER]").toString();
CreativeWrapper response = creativeWrapperServiceClient.getCreativeWrapper(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The resource name of the CreativeWrapper. Format:
|
| Returns | |
|---|---|
| Type | Description |
CreativeWrapper |
|
getCreativeWrapperCallable()
public final UnaryCallable<GetCreativeWrapperRequest,CreativeWrapper> getCreativeWrapperCallable()Retrieves a CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
GetCreativeWrapperRequest request =
GetCreativeWrapperRequest.newBuilder()
.setName(CreativeWrapperName.of("[NETWORK_CODE]", "[CREATIVE_WRAPPER]").toString())
.build();
ApiFuture<CreativeWrapper> future =
creativeWrapperServiceClient.getCreativeWrapperCallable().futureCall(request);
// Do something.
CreativeWrapper response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetCreativeWrapperRequest,CreativeWrapper> |
|
getSettings()
public final @Nullable CreativeWrapperServiceSettings getSettings()| Returns | |
|---|---|
| Type | Description |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.CreativeWrapperServiceSettings |
|
getStub()
public CreativeWrapperServiceStub getStub()| Returns | |
|---|---|
| Type | Description |
CreativeWrapperServiceStub |
|
isShutdown()
public boolean isShutdown()| Returns | |
|---|---|
| Type | Description |
boolean |
|
isTerminated()
public boolean isTerminated()| Returns | |
|---|---|
| Type | Description |
boolean |
|
listCreativeWrappers(@Nullable NetworkName parent)
public final CreativeWrapperServiceClient.ListCreativeWrappersPagedResponse listCreativeWrappers(@Nullable NetworkName parent)Lists CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
for (CreativeWrapper element :
creativeWrapperServiceClient.listCreativeWrappers(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 CreativeWrappers. Format:
|
| Returns | |
|---|---|
| Type | Description |
CreativeWrapperServiceClient.ListCreativeWrappersPagedResponse |
|
listCreativeWrappers(ListCreativeWrappersRequest request)
public final CreativeWrapperServiceClient.ListCreativeWrappersPagedResponse listCreativeWrappers(ListCreativeWrappersRequest request)Lists CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
ListCreativeWrappersRequest request =
ListCreativeWrappersRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.setSkip(3532159)
.build();
for (CreativeWrapper element :
creativeWrapperServiceClient.listCreativeWrappers(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListCreativeWrappersRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
CreativeWrapperServiceClient.ListCreativeWrappersPagedResponse |
|
listCreativeWrappers(String parent)
public final CreativeWrapperServiceClient.ListCreativeWrappersPagedResponse listCreativeWrappers(String parent)Lists CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
for (CreativeWrapper element :
creativeWrapperServiceClient.listCreativeWrappers(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent, which owns this collection of CreativeWrappers. Format:
|
| Returns | |
|---|---|
| Type | Description |
CreativeWrapperServiceClient.ListCreativeWrappersPagedResponse |
|
listCreativeWrappersCallable()
public final UnaryCallable<ListCreativeWrappersRequest,ListCreativeWrappersResponse> listCreativeWrappersCallable()Lists CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
ListCreativeWrappersRequest request =
ListCreativeWrappersRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.setSkip(3532159)
.build();
while (true) {
ListCreativeWrappersResponse response =
creativeWrapperServiceClient.listCreativeWrappersCallable().call(request);
for (CreativeWrapper element : response.getCreativeWrappersList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListCreativeWrappersRequest,ListCreativeWrappersResponse> |
|
listCreativeWrappersPagedCallable()
public final UnaryCallable<ListCreativeWrappersRequest,CreativeWrapperServiceClient.ListCreativeWrappersPagedResponse> listCreativeWrappersPagedCallable()Lists CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
ListCreativeWrappersRequest request =
ListCreativeWrappersRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.setSkip(3532159)
.build();
ApiFuture<CreativeWrapper> future =
creativeWrapperServiceClient.listCreativeWrappersPagedCallable().futureCall(request);
// Do something.
for (CreativeWrapper element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListCreativeWrappersRequest,ListCreativeWrappersPagedResponse> |
|
shutdown()
public void shutdown()shutdownNow()
public void shutdownNow()updateCreativeWrapper(CreativeWrapper creativeWrapper, FieldMask updateMask)
public final CreativeWrapper updateCreativeWrapper(CreativeWrapper creativeWrapper, FieldMask updateMask)Updates a CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
CreativeWrapper creativeWrapper = CreativeWrapper.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
CreativeWrapper response =
creativeWrapperServiceClient.updateCreativeWrapper(creativeWrapper, updateMask);
}
| Parameters | |
|---|---|
| Name | Description |
creativeWrapper |
CreativeWrapperRequired. The The |
updateMask |
FieldMaskOptional. The list of fields to update. |
| Returns | |
|---|---|
| Type | Description |
CreativeWrapper |
|
updateCreativeWrapper(UpdateCreativeWrapperRequest request)
public final CreativeWrapper updateCreativeWrapper(UpdateCreativeWrapperRequest request)Updates a CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
UpdateCreativeWrapperRequest request =
UpdateCreativeWrapperRequest.newBuilder()
.setCreativeWrapper(CreativeWrapper.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
CreativeWrapper response = creativeWrapperServiceClient.updateCreativeWrapper(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateCreativeWrapperRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
CreativeWrapper |
|
updateCreativeWrapperCallable()
public final UnaryCallable<UpdateCreativeWrapperRequest,CreativeWrapper> updateCreativeWrapperCallable()Updates a CreativeWrapper 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 (CreativeWrapperServiceClient creativeWrapperServiceClient =
CreativeWrapperServiceClient.create()) {
UpdateCreativeWrapperRequest request =
UpdateCreativeWrapperRequest.newBuilder()
.setCreativeWrapper(CreativeWrapper.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<CreativeWrapper> future =
creativeWrapperServiceClient.updateCreativeWrapperCallable().futureCall(request);
// Do something.
CreativeWrapper response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateCreativeWrapperRequest,CreativeWrapper> |
|