| GitHub Repository | Product Reference |
Service Description: Provides methods for handling LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
LineItemCreativeAssociationName name =
LineItemCreativeAssociationName.of("[NETWORK_CODE]", "[LINE_ITEM]", "[CREATIVE]");
LineItemCreativeAssociation response =
lineItemCreativeAssociationServiceClient.getLineItemCreativeAssociation(name);
}
Note: close() needs to be called on the LineItemCreativeAssociationServiceClient 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 |
|---|---|---|
GetLineItemCreativeAssociation |
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.
|
ListLineItemCreativeAssociations |
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.
|
CreateLineItemCreativeAssociation |
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.
|
BatchCreateLineItemCreativeAssociations |
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.
|
UpdateLineItemCreativeAssociation |
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.
|
BatchUpdateLineItemCreativeAssociations |
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.
|
BatchActivateLineItemCreativeAssociations |
Activate 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.
|
BatchDeactivateLineItemCreativeAssociations |
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.
|
BatchDeleteLineItemCreativeAssociations |
Deletes 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.
|
PreviewLineItemCreativeAssociation |
Fetch previews for the LineItemCreativeAssociation. |
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 LineItemCreativeAssociationServiceSettings 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
LineItemCreativeAssociationServiceSettings lineItemCreativeAssociationServiceSettings =
LineItemCreativeAssociationServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create(lineItemCreativeAssociationServiceSettings);
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
LineItemCreativeAssociationServiceSettings lineItemCreativeAssociationServiceSettings =
LineItemCreativeAssociationServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create(lineItemCreativeAssociationServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final LineItemCreativeAssociationServiceClient create()Constructs an instance of LineItemCreativeAssociationServiceClient with default settings.
| Returns | |
|---|---|
| Type | Description |
LineItemCreativeAssociationServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(LineItemCreativeAssociationServiceSettings settings)
public static final LineItemCreativeAssociationServiceClient create(LineItemCreativeAssociationServiceSettings settings)Constructs an instance of LineItemCreativeAssociationServiceClient, 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 |
LineItemCreativeAssociationServiceSettings |
| Returns | |
|---|---|
| Type | Description |
LineItemCreativeAssociationServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(LineItemCreativeAssociationServiceStub stub)
public static final LineItemCreativeAssociationServiceClient create(LineItemCreativeAssociationServiceStub stub)Constructs an instance of LineItemCreativeAssociationServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(LineItemCreativeAssociationServiceSettings).
| Parameter | |
|---|---|
| Name | Description |
stub |
LineItemCreativeAssociationServiceStub |
| Returns | |
|---|---|
| Type | Description |
LineItemCreativeAssociationServiceClient |
|
Constructors
LineItemCreativeAssociationServiceClient(LineItemCreativeAssociationServiceSettings settings)
protected LineItemCreativeAssociationServiceClient(LineItemCreativeAssociationServiceSettings settings)Constructs an instance of LineItemCreativeAssociationServiceClient, 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 |
LineItemCreativeAssociationServiceSettings |
LineItemCreativeAssociationServiceClient(LineItemCreativeAssociationServiceStub stub)
protected LineItemCreativeAssociationServiceClient(LineItemCreativeAssociationServiceStub stub)| Parameter | |
|---|---|
| Name | Description |
stub |
LineItemCreativeAssociationServiceStub |
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 |
|
batchActivateLineItemCreativeAssociations(@Nullable LineItemName parent, List<String> names)
public final BatchActivateLineItemCreativeAssociationsResponse batchActivateLineItemCreativeAssociations(@Nullable LineItemName parent, List<String> names)Activate a list of LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
LineItemName parent = LineItemName.of("[NETWORK_CODE]", "[LINE_ITEM]");
List<String> names = new ArrayList<>();
BatchActivateLineItemCreativeAssociationsResponse response =
lineItemCreativeAssociationServiceClient.batchActivateLineItemCreativeAssociations(
parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.LineItemNameRequired. The parent resource where |
names |
List<String>Required. The names of the |
| Returns | |
|---|---|
| Type | Description |
BatchActivateLineItemCreativeAssociationsResponse |
|
batchActivateLineItemCreativeAssociations(BatchActivateLineItemCreativeAssociationsRequest request)
public final BatchActivateLineItemCreativeAssociationsResponse batchActivateLineItemCreativeAssociations(BatchActivateLineItemCreativeAssociationsRequest request)Activate a list of LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
BatchActivateLineItemCreativeAssociationsRequest request =
BatchActivateLineItemCreativeAssociationsRequest.newBuilder()
.setParent(LineItemName.of("[NETWORK_CODE]", "[LINE_ITEM]").toString())
.addAllNames(new ArrayList<String>())
.build();
BatchActivateLineItemCreativeAssociationsResponse response =
lineItemCreativeAssociationServiceClient.batchActivateLineItemCreativeAssociations(
request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchActivateLineItemCreativeAssociationsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BatchActivateLineItemCreativeAssociationsResponse |
|
batchActivateLineItemCreativeAssociations(String parent, List<String> names)
public final BatchActivateLineItemCreativeAssociationsResponse batchActivateLineItemCreativeAssociations(String parent, List<String> names)Activate a list of LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
String parent = LineItemName.of("[NETWORK_CODE]", "[LINE_ITEM]").toString();
List<String> names = new ArrayList<>();
BatchActivateLineItemCreativeAssociationsResponse response =
lineItemCreativeAssociationServiceClient.batchActivateLineItemCreativeAssociations(
parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where |
names |
List<String>Required. The names of the |
| Returns | |
|---|---|
| Type | Description |
BatchActivateLineItemCreativeAssociationsResponse |
|
batchActivateLineItemCreativeAssociationsCallable()
public final UnaryCallable<BatchActivateLineItemCreativeAssociationsRequest,BatchActivateLineItemCreativeAssociationsResponse> batchActivateLineItemCreativeAssociationsCallable()Activate a list of LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
BatchActivateLineItemCreativeAssociationsRequest request =
BatchActivateLineItemCreativeAssociationsRequest.newBuilder()
.setParent(LineItemName.of("[NETWORK_CODE]", "[LINE_ITEM]").toString())
.addAllNames(new ArrayList<String>())
.build();
ApiFuture<BatchActivateLineItemCreativeAssociationsResponse> future =
lineItemCreativeAssociationServiceClient
.batchActivateLineItemCreativeAssociationsCallable()
.futureCall(request);
// Do something.
BatchActivateLineItemCreativeAssociationsResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchActivateLineItemCreativeAssociationsRequest,BatchActivateLineItemCreativeAssociationsResponse> |
|
batchCreateLineItemCreativeAssociations(@Nullable LineItemName parent, List<CreateLineItemCreativeAssociationRequest> requests)
public final BatchCreateLineItemCreativeAssociationsResponse batchCreateLineItemCreativeAssociations(@Nullable LineItemName parent, List<CreateLineItemCreativeAssociationRequest> requests)Creates LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
LineItemName parent = LineItemName.of("[NETWORK_CODE]", "[LINE_ITEM]");
List<CreateLineItemCreativeAssociationRequest> requests = new ArrayList<>();
BatchCreateLineItemCreativeAssociationsResponse response =
lineItemCreativeAssociationServiceClient.batchCreateLineItemCreativeAssociations(
parent, requests);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.LineItemNameRequired. The parent resource where |
requests |
List<CreateLineItemCreativeAssociationRequest>Required. The |
| Returns | |
|---|---|
| Type | Description |
BatchCreateLineItemCreativeAssociationsResponse |
|
batchCreateLineItemCreativeAssociations(BatchCreateLineItemCreativeAssociationsRequest request)
public final BatchCreateLineItemCreativeAssociationsResponse batchCreateLineItemCreativeAssociations(BatchCreateLineItemCreativeAssociationsRequest request)Creates LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
BatchCreateLineItemCreativeAssociationsRequest request =
BatchCreateLineItemCreativeAssociationsRequest.newBuilder()
.setParent(LineItemName.of("[NETWORK_CODE]", "[LINE_ITEM]").toString())
.addAllRequests(new ArrayList<CreateLineItemCreativeAssociationRequest>())
.build();
BatchCreateLineItemCreativeAssociationsResponse response =
lineItemCreativeAssociationServiceClient.batchCreateLineItemCreativeAssociations(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchCreateLineItemCreativeAssociationsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BatchCreateLineItemCreativeAssociationsResponse |
|
batchCreateLineItemCreativeAssociations(String parent, List<CreateLineItemCreativeAssociationRequest> requests)
public final BatchCreateLineItemCreativeAssociationsResponse batchCreateLineItemCreativeAssociations(String parent, List<CreateLineItemCreativeAssociationRequest> requests)Creates LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
String parent = LineItemName.of("[NETWORK_CODE]", "[LINE_ITEM]").toString();
List<CreateLineItemCreativeAssociationRequest> requests = new ArrayList<>();
BatchCreateLineItemCreativeAssociationsResponse response =
lineItemCreativeAssociationServiceClient.batchCreateLineItemCreativeAssociations(
parent, requests);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where |
requests |
List<CreateLineItemCreativeAssociationRequest>Required. The |
| Returns | |
|---|---|
| Type | Description |
BatchCreateLineItemCreativeAssociationsResponse |
|
batchCreateLineItemCreativeAssociationsCallable()
public final UnaryCallable<BatchCreateLineItemCreativeAssociationsRequest,BatchCreateLineItemCreativeAssociationsResponse> batchCreateLineItemCreativeAssociationsCallable()Creates LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
BatchCreateLineItemCreativeAssociationsRequest request =
BatchCreateLineItemCreativeAssociationsRequest.newBuilder()
.setParent(LineItemName.of("[NETWORK_CODE]", "[LINE_ITEM]").toString())
.addAllRequests(new ArrayList<CreateLineItemCreativeAssociationRequest>())
.build();
ApiFuture<BatchCreateLineItemCreativeAssociationsResponse> future =
lineItemCreativeAssociationServiceClient
.batchCreateLineItemCreativeAssociationsCallable()
.futureCall(request);
// Do something.
BatchCreateLineItemCreativeAssociationsResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchCreateLineItemCreativeAssociationsRequest,BatchCreateLineItemCreativeAssociationsResponse> |
|
batchDeactivateLineItemCreativeAssociations(@Nullable LineItemName parent, List<String> names)
public final BatchDeactivateLineItemCreativeAssociationsResponse batchDeactivateLineItemCreativeAssociations(@Nullable LineItemName parent, List<String> names)Deactivates a list of LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
LineItemName parent = LineItemName.of("[NETWORK_CODE]", "[LINE_ITEM]");
List<String> names = new ArrayList<>();
BatchDeactivateLineItemCreativeAssociationsResponse response =
lineItemCreativeAssociationServiceClient.batchDeactivateLineItemCreativeAssociations(
parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.LineItemNameRequired. The parent resource where |
names |
List<String>Required. The names of the |
| Returns | |
|---|---|
| Type | Description |
BatchDeactivateLineItemCreativeAssociationsResponse |
|
batchDeactivateLineItemCreativeAssociations(BatchDeactivateLineItemCreativeAssociationsRequest request)
public final BatchDeactivateLineItemCreativeAssociationsResponse batchDeactivateLineItemCreativeAssociations(BatchDeactivateLineItemCreativeAssociationsRequest request)Deactivates a list of LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
BatchDeactivateLineItemCreativeAssociationsRequest request =
BatchDeactivateLineItemCreativeAssociationsRequest.newBuilder()
.setParent(LineItemName.of("[NETWORK_CODE]", "[LINE_ITEM]").toString())
.addAllNames(new ArrayList<String>())
.build();
BatchDeactivateLineItemCreativeAssociationsResponse response =
lineItemCreativeAssociationServiceClient.batchDeactivateLineItemCreativeAssociations(
request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchDeactivateLineItemCreativeAssociationsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BatchDeactivateLineItemCreativeAssociationsResponse |
|
batchDeactivateLineItemCreativeAssociations(String parent, List<String> names)
public final BatchDeactivateLineItemCreativeAssociationsResponse batchDeactivateLineItemCreativeAssociations(String parent, List<String> names)Deactivates a list of LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
String parent = LineItemName.of("[NETWORK_CODE]", "[LINE_ITEM]").toString();
List<String> names = new ArrayList<>();
BatchDeactivateLineItemCreativeAssociationsResponse response =
lineItemCreativeAssociationServiceClient.batchDeactivateLineItemCreativeAssociations(
parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where |
names |
List<String>Required. The names of the |
| Returns | |
|---|---|
| Type | Description |
BatchDeactivateLineItemCreativeAssociationsResponse |
|
batchDeactivateLineItemCreativeAssociationsCallable()
public final UnaryCallable<BatchDeactivateLineItemCreativeAssociationsRequest,BatchDeactivateLineItemCreativeAssociationsResponse> batchDeactivateLineItemCreativeAssociationsCallable()Deactivates a list of LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
BatchDeactivateLineItemCreativeAssociationsRequest request =
BatchDeactivateLineItemCreativeAssociationsRequest.newBuilder()
.setParent(LineItemName.of("[NETWORK_CODE]", "[LINE_ITEM]").toString())
.addAllNames(new ArrayList<String>())
.build();
ApiFuture<BatchDeactivateLineItemCreativeAssociationsResponse> future =
lineItemCreativeAssociationServiceClient
.batchDeactivateLineItemCreativeAssociationsCallable()
.futureCall(request);
// Do something.
BatchDeactivateLineItemCreativeAssociationsResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchDeactivateLineItemCreativeAssociationsRequest,BatchDeactivateLineItemCreativeAssociationsResponse> |
|
batchDeleteLineItemCreativeAssociations(@Nullable LineItemName parent, List<String> names)
public final void batchDeleteLineItemCreativeAssociations(@Nullable LineItemName parent, List<String> names)Deletes a list of LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
LineItemName parent = LineItemName.of("[NETWORK_CODE]", "[LINE_ITEM]");
List<String> names = new ArrayList<>();
lineItemCreativeAssociationServiceClient.batchDeleteLineItemCreativeAssociations(
parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.LineItemNameRequired. The parent resource where |
names |
List<String>Required. The names of the |
batchDeleteLineItemCreativeAssociations(BatchDeleteLineItemCreativeAssociationsRequest request)
public final void batchDeleteLineItemCreativeAssociations(BatchDeleteLineItemCreativeAssociationsRequest request)Deletes a list of LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
BatchDeleteLineItemCreativeAssociationsRequest request =
BatchDeleteLineItemCreativeAssociationsRequest.newBuilder()
.setParent(LineItemName.of("[NETWORK_CODE]", "[LINE_ITEM]").toString())
.addAllNames(new ArrayList<String>())
.build();
lineItemCreativeAssociationServiceClient.batchDeleteLineItemCreativeAssociations(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchDeleteLineItemCreativeAssociationsRequestThe request object containing all of the parameters for the API call. |
batchDeleteLineItemCreativeAssociations(String parent, List<String> names)
public final void batchDeleteLineItemCreativeAssociations(String parent, List<String> names)Deletes a list of LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
String parent = LineItemName.of("[NETWORK_CODE]", "[LINE_ITEM]").toString();
List<String> names = new ArrayList<>();
lineItemCreativeAssociationServiceClient.batchDeleteLineItemCreativeAssociations(
parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where |
names |
List<String>Required. The names of the |
batchDeleteLineItemCreativeAssociationsCallable()
public final UnaryCallable<BatchDeleteLineItemCreativeAssociationsRequest,Empty> batchDeleteLineItemCreativeAssociationsCallable()Deletes a list of LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
BatchDeleteLineItemCreativeAssociationsRequest request =
BatchDeleteLineItemCreativeAssociationsRequest.newBuilder()
.setParent(LineItemName.of("[NETWORK_CODE]", "[LINE_ITEM]").toString())
.addAllNames(new ArrayList<String>())
.build();
ApiFuture<Empty> future =
lineItemCreativeAssociationServiceClient
.batchDeleteLineItemCreativeAssociationsCallable()
.futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchDeleteLineItemCreativeAssociationsRequest,Empty> |
|
batchUpdateLineItemCreativeAssociations(@Nullable LineItemName parent, List<UpdateLineItemCreativeAssociationRequest> requests)
public final BatchUpdateLineItemCreativeAssociationsResponse batchUpdateLineItemCreativeAssociations(@Nullable LineItemName parent, List<UpdateLineItemCreativeAssociationRequest> requests)Batch updates LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
LineItemName parent = LineItemName.of("[NETWORK_CODE]", "[LINE_ITEM]");
List<UpdateLineItemCreativeAssociationRequest> requests = new ArrayList<>();
BatchUpdateLineItemCreativeAssociationsResponse response =
lineItemCreativeAssociationServiceClient.batchUpdateLineItemCreativeAssociations(
parent, requests);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.LineItemNameRequired. The parent resource where |
requests |
List<UpdateLineItemCreativeAssociationRequest>Required. The |
| Returns | |
|---|---|
| Type | Description |
BatchUpdateLineItemCreativeAssociationsResponse |
|
batchUpdateLineItemCreativeAssociations(BatchUpdateLineItemCreativeAssociationsRequest request)
public final BatchUpdateLineItemCreativeAssociationsResponse batchUpdateLineItemCreativeAssociations(BatchUpdateLineItemCreativeAssociationsRequest request)Batch updates LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
BatchUpdateLineItemCreativeAssociationsRequest request =
BatchUpdateLineItemCreativeAssociationsRequest.newBuilder()
.setParent(LineItemName.of("[NETWORK_CODE]", "[LINE_ITEM]").toString())
.addAllRequests(new ArrayList<UpdateLineItemCreativeAssociationRequest>())
.build();
BatchUpdateLineItemCreativeAssociationsResponse response =
lineItemCreativeAssociationServiceClient.batchUpdateLineItemCreativeAssociations(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchUpdateLineItemCreativeAssociationsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BatchUpdateLineItemCreativeAssociationsResponse |
|
batchUpdateLineItemCreativeAssociations(String parent, List<UpdateLineItemCreativeAssociationRequest> requests)
public final BatchUpdateLineItemCreativeAssociationsResponse batchUpdateLineItemCreativeAssociations(String parent, List<UpdateLineItemCreativeAssociationRequest> requests)Batch updates LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
String parent = LineItemName.of("[NETWORK_CODE]", "[LINE_ITEM]").toString();
List<UpdateLineItemCreativeAssociationRequest> requests = new ArrayList<>();
BatchUpdateLineItemCreativeAssociationsResponse response =
lineItemCreativeAssociationServiceClient.batchUpdateLineItemCreativeAssociations(
parent, requests);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where |
requests |
List<UpdateLineItemCreativeAssociationRequest>Required. The |
| Returns | |
|---|---|
| Type | Description |
BatchUpdateLineItemCreativeAssociationsResponse |
|
batchUpdateLineItemCreativeAssociationsCallable()
public final UnaryCallable<BatchUpdateLineItemCreativeAssociationsRequest,BatchUpdateLineItemCreativeAssociationsResponse> batchUpdateLineItemCreativeAssociationsCallable()Batch updates LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
BatchUpdateLineItemCreativeAssociationsRequest request =
BatchUpdateLineItemCreativeAssociationsRequest.newBuilder()
.setParent(LineItemName.of("[NETWORK_CODE]", "[LINE_ITEM]").toString())
.addAllRequests(new ArrayList<UpdateLineItemCreativeAssociationRequest>())
.build();
ApiFuture<BatchUpdateLineItemCreativeAssociationsResponse> future =
lineItemCreativeAssociationServiceClient
.batchUpdateLineItemCreativeAssociationsCallable()
.futureCall(request);
// Do something.
BatchUpdateLineItemCreativeAssociationsResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchUpdateLineItemCreativeAssociationsRequest,BatchUpdateLineItemCreativeAssociationsResponse> |
|
close()
public final void close()createLineItemCreativeAssociation(@Nullable LineItemName parent, LineItemCreativeAssociation lineItemCreativeAssociation)
public final LineItemCreativeAssociation createLineItemCreativeAssociation(@Nullable LineItemName parent, LineItemCreativeAssociation lineItemCreativeAssociation)Creates a LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
LineItemName parent = LineItemName.of("[NETWORK_CODE]", "[LINE_ITEM]");
LineItemCreativeAssociation lineItemCreativeAssociation =
LineItemCreativeAssociation.newBuilder().build();
LineItemCreativeAssociation response =
lineItemCreativeAssociationServiceClient.createLineItemCreativeAssociation(
parent, lineItemCreativeAssociation);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.LineItemNameRequired. The parent resource where this |
lineItemCreativeAssociation |
LineItemCreativeAssociationRequired. The |
| Returns | |
|---|---|
| Type | Description |
LineItemCreativeAssociation |
|
createLineItemCreativeAssociation(CreateLineItemCreativeAssociationRequest request)
public final LineItemCreativeAssociation createLineItemCreativeAssociation(CreateLineItemCreativeAssociationRequest request)Creates a LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
CreateLineItemCreativeAssociationRequest request =
CreateLineItemCreativeAssociationRequest.newBuilder()
.setParent(LineItemName.of("[NETWORK_CODE]", "[LINE_ITEM]").toString())
.setLineItemCreativeAssociation(LineItemCreativeAssociation.newBuilder().build())
.build();
LineItemCreativeAssociation response =
lineItemCreativeAssociationServiceClient.createLineItemCreativeAssociation(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateLineItemCreativeAssociationRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
LineItemCreativeAssociation |
|
createLineItemCreativeAssociation(String parent, LineItemCreativeAssociation lineItemCreativeAssociation)
public final LineItemCreativeAssociation createLineItemCreativeAssociation(String parent, LineItemCreativeAssociation lineItemCreativeAssociation)Creates a LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
String parent = LineItemName.of("[NETWORK_CODE]", "[LINE_ITEM]").toString();
LineItemCreativeAssociation lineItemCreativeAssociation =
LineItemCreativeAssociation.newBuilder().build();
LineItemCreativeAssociation response =
lineItemCreativeAssociationServiceClient.createLineItemCreativeAssociation(
parent, lineItemCreativeAssociation);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where this |
lineItemCreativeAssociation |
LineItemCreativeAssociationRequired. The |
| Returns | |
|---|---|
| Type | Description |
LineItemCreativeAssociation |
|
createLineItemCreativeAssociationCallable()
public final UnaryCallable<CreateLineItemCreativeAssociationRequest,LineItemCreativeAssociation> createLineItemCreativeAssociationCallable()Creates a LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
CreateLineItemCreativeAssociationRequest request =
CreateLineItemCreativeAssociationRequest.newBuilder()
.setParent(LineItemName.of("[NETWORK_CODE]", "[LINE_ITEM]").toString())
.setLineItemCreativeAssociation(LineItemCreativeAssociation.newBuilder().build())
.build();
ApiFuture<LineItemCreativeAssociation> future =
lineItemCreativeAssociationServiceClient
.createLineItemCreativeAssociationCallable()
.futureCall(request);
// Do something.
LineItemCreativeAssociation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateLineItemCreativeAssociationRequest,LineItemCreativeAssociation> |
|
getLineItemCreativeAssociation(@Nullable LineItemCreativeAssociationName name)
public final LineItemCreativeAssociation getLineItemCreativeAssociation(@Nullable LineItemCreativeAssociationName name)Retrieves a LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
LineItemCreativeAssociationName name =
LineItemCreativeAssociationName.of("[NETWORK_CODE]", "[LINE_ITEM]", "[CREATIVE]");
LineItemCreativeAssociation response =
lineItemCreativeAssociationServiceClient.getLineItemCreativeAssociation(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.LineItemCreativeAssociationNameRequired. The resource name of the LineItemCreativeAssociation. Format:
|
| Returns | |
|---|---|
| Type | Description |
LineItemCreativeAssociation |
|
getLineItemCreativeAssociation(GetLineItemCreativeAssociationRequest request)
public final LineItemCreativeAssociation getLineItemCreativeAssociation(GetLineItemCreativeAssociationRequest request)Retrieves a LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
GetLineItemCreativeAssociationRequest request =
GetLineItemCreativeAssociationRequest.newBuilder()
.setName(
LineItemCreativeAssociationName.of("[NETWORK_CODE]", "[LINE_ITEM]", "[CREATIVE]")
.toString())
.build();
LineItemCreativeAssociation response =
lineItemCreativeAssociationServiceClient.getLineItemCreativeAssociation(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetLineItemCreativeAssociationRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
LineItemCreativeAssociation |
|
getLineItemCreativeAssociation(String name)
public final LineItemCreativeAssociation getLineItemCreativeAssociation(String name)Retrieves a LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
String name =
LineItemCreativeAssociationName.of("[NETWORK_CODE]", "[LINE_ITEM]", "[CREATIVE]")
.toString();
LineItemCreativeAssociation response =
lineItemCreativeAssociationServiceClient.getLineItemCreativeAssociation(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The resource name of the LineItemCreativeAssociation. Format:
|
| Returns | |
|---|---|
| Type | Description |
LineItemCreativeAssociation |
|
getLineItemCreativeAssociationCallable()
public final UnaryCallable<GetLineItemCreativeAssociationRequest,LineItemCreativeAssociation> getLineItemCreativeAssociationCallable()Retrieves a LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
GetLineItemCreativeAssociationRequest request =
GetLineItemCreativeAssociationRequest.newBuilder()
.setName(
LineItemCreativeAssociationName.of("[NETWORK_CODE]", "[LINE_ITEM]", "[CREATIVE]")
.toString())
.build();
ApiFuture<LineItemCreativeAssociation> future =
lineItemCreativeAssociationServiceClient
.getLineItemCreativeAssociationCallable()
.futureCall(request);
// Do something.
LineItemCreativeAssociation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetLineItemCreativeAssociationRequest,LineItemCreativeAssociation> |
|
getSettings()
public final @Nullable LineItemCreativeAssociationServiceSettings getSettings()| Returns | |
|---|---|
| Type | Description |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.LineItemCreativeAssociationServiceSettings |
|
getStub()
public LineItemCreativeAssociationServiceStub getStub()| Returns | |
|---|---|
| Type | Description |
LineItemCreativeAssociationServiceStub |
|
isShutdown()
public boolean isShutdown()| Returns | |
|---|---|
| Type | Description |
boolean |
|
isTerminated()
public boolean isTerminated()| Returns | |
|---|---|
| Type | Description |
boolean |
|
listLineItemCreativeAssociations(@Nullable LineItemName parent)
public final LineItemCreativeAssociationServiceClient.ListLineItemCreativeAssociationsPagedResponse listLineItemCreativeAssociations(@Nullable LineItemName parent)Lists LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
LineItemName parent = LineItemName.of("[NETWORK_CODE]", "[LINE_ITEM]");
for (LineItemCreativeAssociation element :
lineItemCreativeAssociationServiceClient
.listLineItemCreativeAssociations(parent)
.iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.LineItemNameRequired. The parent, which owns this collection of LineItemCreativeAssociations.
This request supports using the "-" character as a wildcard for resources that span across
multiple LineItem parents. Format: |
| Returns | |
|---|---|
| Type | Description |
LineItemCreativeAssociationServiceClient.ListLineItemCreativeAssociationsPagedResponse |
|
listLineItemCreativeAssociations(ListLineItemCreativeAssociationsRequest request)
public final LineItemCreativeAssociationServiceClient.ListLineItemCreativeAssociationsPagedResponse listLineItemCreativeAssociations(ListLineItemCreativeAssociationsRequest request)Lists LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
ListLineItemCreativeAssociationsRequest request =
ListLineItemCreativeAssociationsRequest.newBuilder()
.setParent(LineItemName.of("[NETWORK_CODE]", "[LINE_ITEM]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.setSkip(3532159)
.build();
for (LineItemCreativeAssociation element :
lineItemCreativeAssociationServiceClient
.listLineItemCreativeAssociations(request)
.iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListLineItemCreativeAssociationsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
LineItemCreativeAssociationServiceClient.ListLineItemCreativeAssociationsPagedResponse |
|
listLineItemCreativeAssociations(String parent)
public final LineItemCreativeAssociationServiceClient.ListLineItemCreativeAssociationsPagedResponse listLineItemCreativeAssociations(String parent)Lists LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
String parent = LineItemName.of("[NETWORK_CODE]", "[LINE_ITEM]").toString();
for (LineItemCreativeAssociation element :
lineItemCreativeAssociationServiceClient
.listLineItemCreativeAssociations(parent)
.iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent, which owns this collection of LineItemCreativeAssociations.
This request supports using the "-" character as a wildcard for resources that span across
multiple LineItem parents. Format: |
| Returns | |
|---|---|
| Type | Description |
LineItemCreativeAssociationServiceClient.ListLineItemCreativeAssociationsPagedResponse |
|
listLineItemCreativeAssociationsCallable()
public final UnaryCallable<ListLineItemCreativeAssociationsRequest,ListLineItemCreativeAssociationsResponse> listLineItemCreativeAssociationsCallable()Lists LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
ListLineItemCreativeAssociationsRequest request =
ListLineItemCreativeAssociationsRequest.newBuilder()
.setParent(LineItemName.of("[NETWORK_CODE]", "[LINE_ITEM]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.setSkip(3532159)
.build();
while (true) {
ListLineItemCreativeAssociationsResponse response =
lineItemCreativeAssociationServiceClient
.listLineItemCreativeAssociationsCallable()
.call(request);
for (LineItemCreativeAssociation element : response.getLineItemCreativeAssociationsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListLineItemCreativeAssociationsRequest,ListLineItemCreativeAssociationsResponse> |
|
listLineItemCreativeAssociationsPagedCallable()
public final UnaryCallable<ListLineItemCreativeAssociationsRequest,LineItemCreativeAssociationServiceClient.ListLineItemCreativeAssociationsPagedResponse> listLineItemCreativeAssociationsPagedCallable()Lists LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
ListLineItemCreativeAssociationsRequest request =
ListLineItemCreativeAssociationsRequest.newBuilder()
.setParent(LineItemName.of("[NETWORK_CODE]", "[LINE_ITEM]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.setSkip(3532159)
.build();
ApiFuture<LineItemCreativeAssociation> future =
lineItemCreativeAssociationServiceClient
.listLineItemCreativeAssociationsPagedCallable()
.futureCall(request);
// Do something.
for (LineItemCreativeAssociation element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListLineItemCreativeAssociationsRequest,ListLineItemCreativeAssociationsPagedResponse> |
|
previewLineItemCreativeAssociation(@Nullable LineItemCreativeAssociationName name, String siteUrl)
public final PreviewLineItemCreativeAssociationResponse previewLineItemCreativeAssociation(@Nullable LineItemCreativeAssociationName name, String siteUrl)Fetch previews for the LineItemCreativeAssociation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
LineItemCreativeAssociationName name =
LineItemCreativeAssociationName.of("[NETWORK_CODE]", "[LINE_ITEM]", "[CREATIVE]");
String siteUrl = "siteUrl2099991720";
PreviewLineItemCreativeAssociationResponse response =
lineItemCreativeAssociationServiceClient.previewLineItemCreativeAssociation(
name, siteUrl);
}
| Parameters | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.LineItemCreativeAssociationNameRequired. The name of the |
siteUrl |
StringRequired. The URL of the site that the creative should be previewed in |
| Returns | |
|---|---|
| Type | Description |
PreviewLineItemCreativeAssociationResponse |
|
previewLineItemCreativeAssociation(PreviewLineItemCreativeAssociationRequest request)
public final PreviewLineItemCreativeAssociationResponse previewLineItemCreativeAssociation(PreviewLineItemCreativeAssociationRequest request)Fetch previews for the LineItemCreativeAssociation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
PreviewLineItemCreativeAssociationRequest request =
PreviewLineItemCreativeAssociationRequest.newBuilder()
.setName(
LineItemCreativeAssociationName.of("[NETWORK_CODE]", "[LINE_ITEM]", "[CREATIVE]")
.toString())
.setSiteUrl("siteUrl2099991720")
.build();
PreviewLineItemCreativeAssociationResponse response =
lineItemCreativeAssociationServiceClient.previewLineItemCreativeAssociation(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
PreviewLineItemCreativeAssociationRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
PreviewLineItemCreativeAssociationResponse |
|
previewLineItemCreativeAssociation(String name, String siteUrl)
public final PreviewLineItemCreativeAssociationResponse previewLineItemCreativeAssociation(String name, String siteUrl)Fetch previews for the LineItemCreativeAssociation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
String name =
LineItemCreativeAssociationName.of("[NETWORK_CODE]", "[LINE_ITEM]", "[CREATIVE]")
.toString();
String siteUrl = "siteUrl2099991720";
PreviewLineItemCreativeAssociationResponse response =
lineItemCreativeAssociationServiceClient.previewLineItemCreativeAssociation(
name, siteUrl);
}
| Parameters | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the |
siteUrl |
StringRequired. The URL of the site that the creative should be previewed in |
| Returns | |
|---|---|
| Type | Description |
PreviewLineItemCreativeAssociationResponse |
|
previewLineItemCreativeAssociationCallable()
public final UnaryCallable<PreviewLineItemCreativeAssociationRequest,PreviewLineItemCreativeAssociationResponse> previewLineItemCreativeAssociationCallable()Fetch previews for the LineItemCreativeAssociation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
PreviewLineItemCreativeAssociationRequest request =
PreviewLineItemCreativeAssociationRequest.newBuilder()
.setName(
LineItemCreativeAssociationName.of("[NETWORK_CODE]", "[LINE_ITEM]", "[CREATIVE]")
.toString())
.setSiteUrl("siteUrl2099991720")
.build();
ApiFuture<PreviewLineItemCreativeAssociationResponse> future =
lineItemCreativeAssociationServiceClient
.previewLineItemCreativeAssociationCallable()
.futureCall(request);
// Do something.
PreviewLineItemCreativeAssociationResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<PreviewLineItemCreativeAssociationRequest,PreviewLineItemCreativeAssociationResponse> |
|
shutdown()
public void shutdown()shutdownNow()
public void shutdownNow()updateLineItemCreativeAssociation(LineItemCreativeAssociation lineItemCreativeAssociation, FieldMask updateMask)
public final LineItemCreativeAssociation updateLineItemCreativeAssociation(LineItemCreativeAssociation lineItemCreativeAssociation, FieldMask updateMask)Updates a LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
LineItemCreativeAssociation lineItemCreativeAssociation =
LineItemCreativeAssociation.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
LineItemCreativeAssociation response =
lineItemCreativeAssociationServiceClient.updateLineItemCreativeAssociation(
lineItemCreativeAssociation, updateMask);
}
| Parameters | |
|---|---|
| Name | Description |
lineItemCreativeAssociation |
LineItemCreativeAssociationRequired. The |
updateMask |
FieldMaskOptional. The list of fields to update. |
| Returns | |
|---|---|
| Type | Description |
LineItemCreativeAssociation |
|
updateLineItemCreativeAssociation(UpdateLineItemCreativeAssociationRequest request)
public final LineItemCreativeAssociation updateLineItemCreativeAssociation(UpdateLineItemCreativeAssociationRequest request)Updates a LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
UpdateLineItemCreativeAssociationRequest request =
UpdateLineItemCreativeAssociationRequest.newBuilder()
.setLineItemCreativeAssociation(LineItemCreativeAssociation.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
LineItemCreativeAssociation response =
lineItemCreativeAssociationServiceClient.updateLineItemCreativeAssociation(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateLineItemCreativeAssociationRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
LineItemCreativeAssociation |
|
updateLineItemCreativeAssociationCallable()
public final UnaryCallable<UpdateLineItemCreativeAssociationRequest,LineItemCreativeAssociation> updateLineItemCreativeAssociationCallable()Updates a LineItemCreativeAssociation 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 (LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient =
LineItemCreativeAssociationServiceClient.create()) {
UpdateLineItemCreativeAssociationRequest request =
UpdateLineItemCreativeAssociationRequest.newBuilder()
.setLineItemCreativeAssociation(LineItemCreativeAssociation.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<LineItemCreativeAssociation> future =
lineItemCreativeAssociationServiceClient
.updateLineItemCreativeAssociationCallable()
.futureCall(request);
// Do something.
LineItemCreativeAssociation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateLineItemCreativeAssociationRequest,LineItemCreativeAssociation> |
|