| GitHub Repository | Product Reference |
Service Description: Provides methods for handling AdReviewCenterAd 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 (AdReviewCenterAdServiceClient adReviewCenterAdServiceClient =
AdReviewCenterAdServiceClient.create()) {
WebPropertyName parent = WebPropertyName.of("[NETWORK_CODE]", "[WEB_PROPERTY]");
for (AdReviewCenterAd element :
adReviewCenterAdServiceClient.searchAdReviewCenterAds(parent).iterateAll()) {
// doThingsWith(element);
}
}
Note: close() needs to be called on the AdReviewCenterAdServiceClient 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 |
|---|---|---|
SearchAdReviewCenterAds |
API to search for AdReviewCenterAds. |
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.
|
BatchAllowAdReviewCenterAds |
API to batch allow AdReviewCenterAds. This method supports partial success. Some operations may succeed while others fail. Callers should check the failedRequests field in the response to determine which operations failed. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
BatchBlockAdReviewCenterAds |
API to batch block AdReviewCenterAds. This method supports partial success. Some operations may succeed while others fail. Callers should check the failedRequests field in the response to determine which operations failed. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
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 AdReviewCenterAdServiceSettings 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
AdReviewCenterAdServiceSettings adReviewCenterAdServiceSettings =
AdReviewCenterAdServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
AdReviewCenterAdServiceClient adReviewCenterAdServiceClient =
AdReviewCenterAdServiceClient.create(adReviewCenterAdServiceSettings);
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
AdReviewCenterAdServiceSettings adReviewCenterAdServiceSettings =
AdReviewCenterAdServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
AdReviewCenterAdServiceClient adReviewCenterAdServiceClient =
AdReviewCenterAdServiceClient.create(adReviewCenterAdServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final AdReviewCenterAdServiceClient create()Constructs an instance of AdReviewCenterAdServiceClient with default settings.
| Returns | |
|---|---|
| Type | Description |
AdReviewCenterAdServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(AdReviewCenterAdServiceSettings settings)
public static final AdReviewCenterAdServiceClient create(AdReviewCenterAdServiceSettings settings)Constructs an instance of AdReviewCenterAdServiceClient, 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 |
AdReviewCenterAdServiceSettings |
| Returns | |
|---|---|
| Type | Description |
AdReviewCenterAdServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(AdReviewCenterAdServiceStub stub)
public static final AdReviewCenterAdServiceClient create(AdReviewCenterAdServiceStub stub)Constructs an instance of AdReviewCenterAdServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(AdReviewCenterAdServiceSettings).
| Parameter | |
|---|---|
| Name | Description |
stub |
AdReviewCenterAdServiceStub |
| Returns | |
|---|---|
| Type | Description |
AdReviewCenterAdServiceClient |
|
Constructors
AdReviewCenterAdServiceClient(AdReviewCenterAdServiceSettings settings)
protected AdReviewCenterAdServiceClient(AdReviewCenterAdServiceSettings settings)Constructs an instance of AdReviewCenterAdServiceClient, 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 |
AdReviewCenterAdServiceSettings |
AdReviewCenterAdServiceClient(AdReviewCenterAdServiceStub stub)
protected AdReviewCenterAdServiceClient(AdReviewCenterAdServiceStub stub)| Parameter | |
|---|---|
| Name | Description |
stub |
AdReviewCenterAdServiceStub |
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 |
|
batchAllowAdReviewCenterAdsAsync(BatchAllowAdReviewCenterAdsRequest request)
public final OperationFuture<BatchAllowAdReviewCenterAdsResponse,BatchAdReviewCenterAdsOperationMetadata> batchAllowAdReviewCenterAdsAsync(BatchAllowAdReviewCenterAdsRequest request)API to batch allow AdReviewCenterAds. This method supports partial success. Some operations may succeed while others fail. Callers should check the failedRequests field in the response to determine which operations failed.
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 (AdReviewCenterAdServiceClient adReviewCenterAdServiceClient =
AdReviewCenterAdServiceClient.create()) {
BatchAllowAdReviewCenterAdsRequest request =
BatchAllowAdReviewCenterAdsRequest.newBuilder()
.setParent(WebPropertyName.of("[NETWORK_CODE]", "[WEB_PROPERTY]").toString())
.addAllNames(new ArrayList<String>())
.build();
BatchAllowAdReviewCenterAdsResponse response =
adReviewCenterAdServiceClient.batchAllowAdReviewCenterAdsAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchAllowAdReviewCenterAdsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<BatchAllowAdReviewCenterAdsResponse,BatchAdReviewCenterAdsOperationMetadata> |
|
batchAllowAdReviewCenterAdsAsync(WebPropertyName parent)
public final OperationFuture<BatchAllowAdReviewCenterAdsResponse,BatchAdReviewCenterAdsOperationMetadata> batchAllowAdReviewCenterAdsAsync(WebPropertyName parent)API to batch allow AdReviewCenterAds. This method supports partial success. Some operations may succeed while others fail. Callers should check the failedRequests field in the response to determine which operations failed.
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 (AdReviewCenterAdServiceClient adReviewCenterAdServiceClient =
AdReviewCenterAdServiceClient.create()) {
WebPropertyName parent = WebPropertyName.of("[NETWORK_CODE]", "[WEB_PROPERTY]");
BatchAllowAdReviewCenterAdsResponse response =
adReviewCenterAdServiceClient.batchAllowAdReviewCenterAdsAsync(parent).get();
}
| Parameter | |
|---|---|
| Name | Description |
parent |
WebPropertyNameRequired. The parent, which owns this collection of AdReviewCenterAds. Format: networks/{network_code}/webProperties/{web_property_code} Since a network can only have a single web property of each
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<BatchAllowAdReviewCenterAdsResponse,BatchAdReviewCenterAdsOperationMetadata> |
|
batchAllowAdReviewCenterAdsAsync(String parent)
public final OperationFuture<BatchAllowAdReviewCenterAdsResponse,BatchAdReviewCenterAdsOperationMetadata> batchAllowAdReviewCenterAdsAsync(String parent)API to batch allow AdReviewCenterAds. This method supports partial success. Some operations may succeed while others fail. Callers should check the failedRequests field in the response to determine which operations failed.
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 (AdReviewCenterAdServiceClient adReviewCenterAdServiceClient =
AdReviewCenterAdServiceClient.create()) {
String parent = WebPropertyName.of("[NETWORK_CODE]", "[WEB_PROPERTY]").toString();
BatchAllowAdReviewCenterAdsResponse response =
adReviewCenterAdServiceClient.batchAllowAdReviewCenterAdsAsync(parent).get();
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent, which owns this collection of AdReviewCenterAds. Format: networks/{network_code}/webProperties/{web_property_code} Since a network can only have a single web property of each
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<BatchAllowAdReviewCenterAdsResponse,BatchAdReviewCenterAdsOperationMetadata> |
|
batchAllowAdReviewCenterAdsCallable()
public final UnaryCallable<BatchAllowAdReviewCenterAdsRequest,Operation> batchAllowAdReviewCenterAdsCallable()API to batch allow AdReviewCenterAds. This method supports partial success. Some operations may succeed while others fail. Callers should check the failedRequests field in the response to determine which operations failed.
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 (AdReviewCenterAdServiceClient adReviewCenterAdServiceClient =
AdReviewCenterAdServiceClient.create()) {
BatchAllowAdReviewCenterAdsRequest request =
BatchAllowAdReviewCenterAdsRequest.newBuilder()
.setParent(WebPropertyName.of("[NETWORK_CODE]", "[WEB_PROPERTY]").toString())
.addAllNames(new ArrayList<String>())
.build();
ApiFuture<Operation> future =
adReviewCenterAdServiceClient.batchAllowAdReviewCenterAdsCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchAllowAdReviewCenterAdsRequest,Operation> |
|
batchAllowAdReviewCenterAdsOperationCallable()
public final OperationCallable<BatchAllowAdReviewCenterAdsRequest,BatchAllowAdReviewCenterAdsResponse,BatchAdReviewCenterAdsOperationMetadata> batchAllowAdReviewCenterAdsOperationCallable()API to batch allow AdReviewCenterAds. This method supports partial success. Some operations may succeed while others fail. Callers should check the failedRequests field in the response to determine which operations failed.
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 (AdReviewCenterAdServiceClient adReviewCenterAdServiceClient =
AdReviewCenterAdServiceClient.create()) {
BatchAllowAdReviewCenterAdsRequest request =
BatchAllowAdReviewCenterAdsRequest.newBuilder()
.setParent(WebPropertyName.of("[NETWORK_CODE]", "[WEB_PROPERTY]").toString())
.addAllNames(new ArrayList<String>())
.build();
OperationFuture<BatchAllowAdReviewCenterAdsResponse, BatchAdReviewCenterAdsOperationMetadata>
future =
adReviewCenterAdServiceClient
.batchAllowAdReviewCenterAdsOperationCallable()
.futureCall(request);
// Do something.
BatchAllowAdReviewCenterAdsResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<BatchAllowAdReviewCenterAdsRequest,BatchAllowAdReviewCenterAdsResponse,BatchAdReviewCenterAdsOperationMetadata> |
|
batchBlockAdReviewCenterAdsAsync(BatchBlockAdReviewCenterAdsRequest request)
public final OperationFuture<BatchBlockAdReviewCenterAdsResponse,BatchAdReviewCenterAdsOperationMetadata> batchBlockAdReviewCenterAdsAsync(BatchBlockAdReviewCenterAdsRequest request)API to batch block AdReviewCenterAds. This method supports partial success. Some operations may succeed while others fail. Callers should check the failedRequests field in the response to determine which operations failed.
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 (AdReviewCenterAdServiceClient adReviewCenterAdServiceClient =
AdReviewCenterAdServiceClient.create()) {
BatchBlockAdReviewCenterAdsRequest request =
BatchBlockAdReviewCenterAdsRequest.newBuilder()
.setParent(WebPropertyName.of("[NETWORK_CODE]", "[WEB_PROPERTY]").toString())
.addAllNames(new ArrayList<String>())
.build();
BatchBlockAdReviewCenterAdsResponse response =
adReviewCenterAdServiceClient.batchBlockAdReviewCenterAdsAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchBlockAdReviewCenterAdsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<BatchBlockAdReviewCenterAdsResponse,BatchAdReviewCenterAdsOperationMetadata> |
|
batchBlockAdReviewCenterAdsAsync(WebPropertyName parent)
public final OperationFuture<BatchBlockAdReviewCenterAdsResponse,BatchAdReviewCenterAdsOperationMetadata> batchBlockAdReviewCenterAdsAsync(WebPropertyName parent)API to batch block AdReviewCenterAds. This method supports partial success. Some operations may succeed while others fail. Callers should check the failedRequests field in the response to determine which operations failed.
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 (AdReviewCenterAdServiceClient adReviewCenterAdServiceClient =
AdReviewCenterAdServiceClient.create()) {
WebPropertyName parent = WebPropertyName.of("[NETWORK_CODE]", "[WEB_PROPERTY]");
BatchBlockAdReviewCenterAdsResponse response =
adReviewCenterAdServiceClient.batchBlockAdReviewCenterAdsAsync(parent).get();
}
| Parameter | |
|---|---|
| Name | Description |
parent |
WebPropertyNameRequired. The parent, which owns this collection of AdReviewCenterAds. Format: networks/{network_code}/webProperties/{web_property_code} Since a network can only have a single web property of each
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<BatchBlockAdReviewCenterAdsResponse,BatchAdReviewCenterAdsOperationMetadata> |
|
batchBlockAdReviewCenterAdsAsync(String parent)
public final OperationFuture<BatchBlockAdReviewCenterAdsResponse,BatchAdReviewCenterAdsOperationMetadata> batchBlockAdReviewCenterAdsAsync(String parent)API to batch block AdReviewCenterAds. This method supports partial success. Some operations may succeed while others fail. Callers should check the failedRequests field in the response to determine which operations failed.
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 (AdReviewCenterAdServiceClient adReviewCenterAdServiceClient =
AdReviewCenterAdServiceClient.create()) {
String parent = WebPropertyName.of("[NETWORK_CODE]", "[WEB_PROPERTY]").toString();
BatchBlockAdReviewCenterAdsResponse response =
adReviewCenterAdServiceClient.batchBlockAdReviewCenterAdsAsync(parent).get();
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent, which owns this collection of AdReviewCenterAds. Format: networks/{network_code}/webProperties/{web_property_code} Since a network can only have a single web property of each
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<BatchBlockAdReviewCenterAdsResponse,BatchAdReviewCenterAdsOperationMetadata> |
|
batchBlockAdReviewCenterAdsCallable()
public final UnaryCallable<BatchBlockAdReviewCenterAdsRequest,Operation> batchBlockAdReviewCenterAdsCallable()API to batch block AdReviewCenterAds. This method supports partial success. Some operations may succeed while others fail. Callers should check the failedRequests field in the response to determine which operations failed.
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 (AdReviewCenterAdServiceClient adReviewCenterAdServiceClient =
AdReviewCenterAdServiceClient.create()) {
BatchBlockAdReviewCenterAdsRequest request =
BatchBlockAdReviewCenterAdsRequest.newBuilder()
.setParent(WebPropertyName.of("[NETWORK_CODE]", "[WEB_PROPERTY]").toString())
.addAllNames(new ArrayList<String>())
.build();
ApiFuture<Operation> future =
adReviewCenterAdServiceClient.batchBlockAdReviewCenterAdsCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchBlockAdReviewCenterAdsRequest,Operation> |
|
batchBlockAdReviewCenterAdsOperationCallable()
public final OperationCallable<BatchBlockAdReviewCenterAdsRequest,BatchBlockAdReviewCenterAdsResponse,BatchAdReviewCenterAdsOperationMetadata> batchBlockAdReviewCenterAdsOperationCallable()API to batch block AdReviewCenterAds. This method supports partial success. Some operations may succeed while others fail. Callers should check the failedRequests field in the response to determine which operations failed.
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 (AdReviewCenterAdServiceClient adReviewCenterAdServiceClient =
AdReviewCenterAdServiceClient.create()) {
BatchBlockAdReviewCenterAdsRequest request =
BatchBlockAdReviewCenterAdsRequest.newBuilder()
.setParent(WebPropertyName.of("[NETWORK_CODE]", "[WEB_PROPERTY]").toString())
.addAllNames(new ArrayList<String>())
.build();
OperationFuture<BatchBlockAdReviewCenterAdsResponse, BatchAdReviewCenterAdsOperationMetadata>
future =
adReviewCenterAdServiceClient
.batchBlockAdReviewCenterAdsOperationCallable()
.futureCall(request);
// Do something.
BatchBlockAdReviewCenterAdsResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<BatchBlockAdReviewCenterAdsRequest,BatchBlockAdReviewCenterAdsResponse,BatchAdReviewCenterAdsOperationMetadata> |
|
close()
public final void close()getHttpJsonOperationsClient()
public final OperationsClient getHttpJsonOperationsClient()Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
| Returns | |
|---|---|
| Type | Description |
OperationsClient |
|
getSettings()
public final AdReviewCenterAdServiceSettings getSettings()| Returns | |
|---|---|
| Type | Description |
AdReviewCenterAdServiceSettings |
|
getStub()
public AdReviewCenterAdServiceStub getStub()| Returns | |
|---|---|
| Type | Description |
AdReviewCenterAdServiceStub |
|
isShutdown()
public boolean isShutdown()| Returns | |
|---|---|
| Type | Description |
boolean |
|
isTerminated()
public boolean isTerminated()| Returns | |
|---|---|
| Type | Description |
boolean |
|
searchAdReviewCenterAds(SearchAdReviewCenterAdsRequest request)
public final AdReviewCenterAdServiceClient.SearchAdReviewCenterAdsPagedResponse searchAdReviewCenterAds(SearchAdReviewCenterAdsRequest request)API to search for AdReviewCenterAds.
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 (AdReviewCenterAdServiceClient adReviewCenterAdServiceClient =
AdReviewCenterAdServiceClient.create()) {
SearchAdReviewCenterAdsRequest request =
SearchAdReviewCenterAdsRequest.newBuilder()
.setParent(WebPropertyName.of("[NETWORK_CODE]", "[WEB_PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.addAllAdReviewCenterAdId(new ArrayList<String>())
.setDateTimeRange(Interval.newBuilder().build())
.addAllSearchText(new ArrayList<String>())
.addAllBuyerAccountId(new ArrayList<Long>())
.build();
for (AdReviewCenterAd element :
adReviewCenterAdServiceClient.searchAdReviewCenterAds(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
SearchAdReviewCenterAdsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
AdReviewCenterAdServiceClient.SearchAdReviewCenterAdsPagedResponse |
|
searchAdReviewCenterAds(WebPropertyName parent)
public final AdReviewCenterAdServiceClient.SearchAdReviewCenterAdsPagedResponse searchAdReviewCenterAds(WebPropertyName parent)API to search for AdReviewCenterAds.
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 (AdReviewCenterAdServiceClient adReviewCenterAdServiceClient =
AdReviewCenterAdServiceClient.create()) {
WebPropertyName parent = WebPropertyName.of("[NETWORK_CODE]", "[WEB_PROPERTY]");
for (AdReviewCenterAd element :
adReviewCenterAdServiceClient.searchAdReviewCenterAds(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
WebPropertyNameRequired. The parent, which owns this collection of AdReviewCenterAds. Format: networks/{network_code}/webProperties/{web_property_code} Since a network can only have a single web property of each
|
| Returns | |
|---|---|
| Type | Description |
AdReviewCenterAdServiceClient.SearchAdReviewCenterAdsPagedResponse |
|
searchAdReviewCenterAds(String parent)
public final AdReviewCenterAdServiceClient.SearchAdReviewCenterAdsPagedResponse searchAdReviewCenterAds(String parent)API to search for AdReviewCenterAds.
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 (AdReviewCenterAdServiceClient adReviewCenterAdServiceClient =
AdReviewCenterAdServiceClient.create()) {
String parent = WebPropertyName.of("[NETWORK_CODE]", "[WEB_PROPERTY]").toString();
for (AdReviewCenterAd element :
adReviewCenterAdServiceClient.searchAdReviewCenterAds(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent, which owns this collection of AdReviewCenterAds. Format: networks/{network_code}/webProperties/{web_property_code} Since a network can only have a single web property of each
|
| Returns | |
|---|---|
| Type | Description |
AdReviewCenterAdServiceClient.SearchAdReviewCenterAdsPagedResponse |
|
searchAdReviewCenterAdsCallable()
public final UnaryCallable<SearchAdReviewCenterAdsRequest,SearchAdReviewCenterAdsResponse> searchAdReviewCenterAdsCallable()API to search for AdReviewCenterAds.
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 (AdReviewCenterAdServiceClient adReviewCenterAdServiceClient =
AdReviewCenterAdServiceClient.create()) {
SearchAdReviewCenterAdsRequest request =
SearchAdReviewCenterAdsRequest.newBuilder()
.setParent(WebPropertyName.of("[NETWORK_CODE]", "[WEB_PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.addAllAdReviewCenterAdId(new ArrayList<String>())
.setDateTimeRange(Interval.newBuilder().build())
.addAllSearchText(new ArrayList<String>())
.addAllBuyerAccountId(new ArrayList<Long>())
.build();
while (true) {
SearchAdReviewCenterAdsResponse response =
adReviewCenterAdServiceClient.searchAdReviewCenterAdsCallable().call(request);
for (AdReviewCenterAd element : response.getAdReviewCenterAdsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<SearchAdReviewCenterAdsRequest,SearchAdReviewCenterAdsResponse> |
|
searchAdReviewCenterAdsPagedCallable()
public final UnaryCallable<SearchAdReviewCenterAdsRequest,AdReviewCenterAdServiceClient.SearchAdReviewCenterAdsPagedResponse> searchAdReviewCenterAdsPagedCallable()API to search for AdReviewCenterAds.
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 (AdReviewCenterAdServiceClient adReviewCenterAdServiceClient =
AdReviewCenterAdServiceClient.create()) {
SearchAdReviewCenterAdsRequest request =
SearchAdReviewCenterAdsRequest.newBuilder()
.setParent(WebPropertyName.of("[NETWORK_CODE]", "[WEB_PROPERTY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.addAllAdReviewCenterAdId(new ArrayList<String>())
.setDateTimeRange(Interval.newBuilder().build())
.addAllSearchText(new ArrayList<String>())
.addAllBuyerAccountId(new ArrayList<Long>())
.build();
ApiFuture<AdReviewCenterAd> future =
adReviewCenterAdServiceClient.searchAdReviewCenterAdsPagedCallable().futureCall(request);
// Do something.
for (AdReviewCenterAd element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<SearchAdReviewCenterAdsRequest,SearchAdReviewCenterAdsPagedResponse> |
|
shutdown()
public void shutdown()shutdownNow()
public void shutdownNow()