| GitHub Repository | Product Reference |
Service Description: Provides methods for handling ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
ForecastAdjustmentName name =
ForecastAdjustmentName.of("[NETWORK_CODE]", "[FORECAST_ADJUSTMENT]");
ForecastAdjustment response = forecastAdjustmentServiceClient.getForecastAdjustment(name);
}
Note: close() needs to be called on the ForecastAdjustmentServiceClient 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 |
|---|---|---|
GetForecastAdjustment |
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.
|
ListForecastAdjustments |
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.
|
CreateForecastAdjustment |
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.
|
BatchCreateForecastAdjustments |
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.
|
BatchActivateForecastAdjustments |
Activates 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.
|
BatchDeactivateForecastAdjustments |
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.
|
UpdateForecastAdjustment |
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.
|
BatchUpdateForecastAdjustments |
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.
|
CalculateDailyAdOpportunityCounts |
Calculates daily ad opportunity counts for a prospective |
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 ForecastAdjustmentServiceSettings 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
ForecastAdjustmentServiceSettings forecastAdjustmentServiceSettings =
ForecastAdjustmentServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create(forecastAdjustmentServiceSettings);
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
ForecastAdjustmentServiceSettings forecastAdjustmentServiceSettings =
ForecastAdjustmentServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create(forecastAdjustmentServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final ForecastAdjustmentServiceClient create()Constructs an instance of ForecastAdjustmentServiceClient with default settings.
| Returns | |
|---|---|
| Type | Description |
ForecastAdjustmentServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(ForecastAdjustmentServiceSettings settings)
public static final ForecastAdjustmentServiceClient create(ForecastAdjustmentServiceSettings settings)Constructs an instance of ForecastAdjustmentServiceClient, 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 |
ForecastAdjustmentServiceSettings |
| Returns | |
|---|---|
| Type | Description |
ForecastAdjustmentServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(ForecastAdjustmentServiceStub stub)
public static final ForecastAdjustmentServiceClient create(ForecastAdjustmentServiceStub stub)Constructs an instance of ForecastAdjustmentServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(ForecastAdjustmentServiceSettings).
| Parameter | |
|---|---|
| Name | Description |
stub |
ForecastAdjustmentServiceStub |
| Returns | |
|---|---|
| Type | Description |
ForecastAdjustmentServiceClient |
|
Constructors
ForecastAdjustmentServiceClient(ForecastAdjustmentServiceSettings settings)
protected ForecastAdjustmentServiceClient(ForecastAdjustmentServiceSettings settings)Constructs an instance of ForecastAdjustmentServiceClient, 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 |
ForecastAdjustmentServiceSettings |
ForecastAdjustmentServiceClient(ForecastAdjustmentServiceStub stub)
protected ForecastAdjustmentServiceClient(ForecastAdjustmentServiceStub stub)| Parameter | |
|---|---|
| Name | Description |
stub |
ForecastAdjustmentServiceStub |
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 |
|
batchActivateForecastAdjustments(@Nullable NetworkName parent, List<String> names)
public final BatchActivateForecastAdjustmentsResponse batchActivateForecastAdjustments(@Nullable NetworkName parent, List<String> names)Activates a list of ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
List<String> names = new ArrayList<>();
BatchActivateForecastAdjustmentsResponse response =
forecastAdjustmentServiceClient.batchActivateForecastAdjustments(parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. Format: |
names |
List<String>Required. The resource names of the |
| Returns | |
|---|---|
| Type | Description |
BatchActivateForecastAdjustmentsResponse |
|
batchActivateForecastAdjustments(BatchActivateForecastAdjustmentsRequest request)
public final BatchActivateForecastAdjustmentsResponse batchActivateForecastAdjustments(BatchActivateForecastAdjustmentsRequest request)Activates a list of ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
BatchActivateForecastAdjustmentsRequest request =
BatchActivateForecastAdjustmentsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllNames(new ArrayList<String>())
.build();
BatchActivateForecastAdjustmentsResponse response =
forecastAdjustmentServiceClient.batchActivateForecastAdjustments(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchActivateForecastAdjustmentsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BatchActivateForecastAdjustmentsResponse |
|
batchActivateForecastAdjustments(String parent, List<String> names)
public final BatchActivateForecastAdjustmentsResponse batchActivateForecastAdjustments(String parent, List<String> names)Activates a list of ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
List<String> names = new ArrayList<>();
BatchActivateForecastAdjustmentsResponse response =
forecastAdjustmentServiceClient.batchActivateForecastAdjustments(parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. Format: |
names |
List<String>Required. The resource names of the |
| Returns | |
|---|---|
| Type | Description |
BatchActivateForecastAdjustmentsResponse |
|
batchActivateForecastAdjustmentsCallable()
public final UnaryCallable<BatchActivateForecastAdjustmentsRequest,BatchActivateForecastAdjustmentsResponse> batchActivateForecastAdjustmentsCallable()Activates a list of ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
BatchActivateForecastAdjustmentsRequest request =
BatchActivateForecastAdjustmentsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllNames(new ArrayList<String>())
.build();
ApiFuture<BatchActivateForecastAdjustmentsResponse> future =
forecastAdjustmentServiceClient
.batchActivateForecastAdjustmentsCallable()
.futureCall(request);
// Do something.
BatchActivateForecastAdjustmentsResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchActivateForecastAdjustmentsRequest,BatchActivateForecastAdjustmentsResponse> |
|
batchCreateForecastAdjustments(@Nullable NetworkName parent, List<CreateForecastAdjustmentRequest> requests)
public final BatchCreateForecastAdjustmentsResponse batchCreateForecastAdjustments(@Nullable NetworkName parent, List<CreateForecastAdjustmentRequest> requests)Creates ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
List<CreateForecastAdjustmentRequest> requests = new ArrayList<>();
BatchCreateForecastAdjustmentsResponse response =
forecastAdjustmentServiceClient.batchCreateForecastAdjustments(parent, requests);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. The parent resource where |
requests |
List<CreateForecastAdjustmentRequest>Required. The |
| Returns | |
|---|---|
| Type | Description |
BatchCreateForecastAdjustmentsResponse |
|
batchCreateForecastAdjustments(BatchCreateForecastAdjustmentsRequest request)
public final BatchCreateForecastAdjustmentsResponse batchCreateForecastAdjustments(BatchCreateForecastAdjustmentsRequest request)Creates ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
BatchCreateForecastAdjustmentsRequest request =
BatchCreateForecastAdjustmentsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllRequests(new ArrayList<CreateForecastAdjustmentRequest>())
.build();
BatchCreateForecastAdjustmentsResponse response =
forecastAdjustmentServiceClient.batchCreateForecastAdjustments(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchCreateForecastAdjustmentsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BatchCreateForecastAdjustmentsResponse |
|
batchCreateForecastAdjustments(String parent, List<CreateForecastAdjustmentRequest> requests)
public final BatchCreateForecastAdjustmentsResponse batchCreateForecastAdjustments(String parent, List<CreateForecastAdjustmentRequest> requests)Creates ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
List<CreateForecastAdjustmentRequest> requests = new ArrayList<>();
BatchCreateForecastAdjustmentsResponse response =
forecastAdjustmentServiceClient.batchCreateForecastAdjustments(parent, requests);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where |
requests |
List<CreateForecastAdjustmentRequest>Required. The |
| Returns | |
|---|---|
| Type | Description |
BatchCreateForecastAdjustmentsResponse |
|
batchCreateForecastAdjustmentsCallable()
public final UnaryCallable<BatchCreateForecastAdjustmentsRequest,BatchCreateForecastAdjustmentsResponse> batchCreateForecastAdjustmentsCallable()Creates ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
BatchCreateForecastAdjustmentsRequest request =
BatchCreateForecastAdjustmentsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllRequests(new ArrayList<CreateForecastAdjustmentRequest>())
.build();
ApiFuture<BatchCreateForecastAdjustmentsResponse> future =
forecastAdjustmentServiceClient
.batchCreateForecastAdjustmentsCallable()
.futureCall(request);
// Do something.
BatchCreateForecastAdjustmentsResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchCreateForecastAdjustmentsRequest,BatchCreateForecastAdjustmentsResponse> |
|
batchDeactivateForecastAdjustments(@Nullable NetworkName parent, List<String> names)
public final BatchDeactivateForecastAdjustmentsResponse batchDeactivateForecastAdjustments(@Nullable NetworkName parent, List<String> names)Deactivates a list of ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
List<String> names = new ArrayList<>();
BatchDeactivateForecastAdjustmentsResponse response =
forecastAdjustmentServiceClient.batchDeactivateForecastAdjustments(parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. Format: |
names |
List<String>Required. The resource names of the |
| Returns | |
|---|---|
| Type | Description |
BatchDeactivateForecastAdjustmentsResponse |
|
batchDeactivateForecastAdjustments(BatchDeactivateForecastAdjustmentsRequest request)
public final BatchDeactivateForecastAdjustmentsResponse batchDeactivateForecastAdjustments(BatchDeactivateForecastAdjustmentsRequest request)Deactivates a list of ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
BatchDeactivateForecastAdjustmentsRequest request =
BatchDeactivateForecastAdjustmentsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllNames(new ArrayList<String>())
.build();
BatchDeactivateForecastAdjustmentsResponse response =
forecastAdjustmentServiceClient.batchDeactivateForecastAdjustments(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchDeactivateForecastAdjustmentsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BatchDeactivateForecastAdjustmentsResponse |
|
batchDeactivateForecastAdjustments(String parent, List<String> names)
public final BatchDeactivateForecastAdjustmentsResponse batchDeactivateForecastAdjustments(String parent, List<String> names)Deactivates a list of ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
List<String> names = new ArrayList<>();
BatchDeactivateForecastAdjustmentsResponse response =
forecastAdjustmentServiceClient.batchDeactivateForecastAdjustments(parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. Format: |
names |
List<String>Required. The resource names of the |
| Returns | |
|---|---|
| Type | Description |
BatchDeactivateForecastAdjustmentsResponse |
|
batchDeactivateForecastAdjustmentsCallable()
public final UnaryCallable<BatchDeactivateForecastAdjustmentsRequest,BatchDeactivateForecastAdjustmentsResponse> batchDeactivateForecastAdjustmentsCallable()Deactivates a list of ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
BatchDeactivateForecastAdjustmentsRequest request =
BatchDeactivateForecastAdjustmentsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllNames(new ArrayList<String>())
.build();
ApiFuture<BatchDeactivateForecastAdjustmentsResponse> future =
forecastAdjustmentServiceClient
.batchDeactivateForecastAdjustmentsCallable()
.futureCall(request);
// Do something.
BatchDeactivateForecastAdjustmentsResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchDeactivateForecastAdjustmentsRequest,BatchDeactivateForecastAdjustmentsResponse> |
|
batchUpdateForecastAdjustments(@Nullable NetworkName parent, List<UpdateForecastAdjustmentRequest> requests)
public final BatchUpdateForecastAdjustmentsResponse batchUpdateForecastAdjustments(@Nullable NetworkName parent, List<UpdateForecastAdjustmentRequest> requests)Batch updates ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
List<UpdateForecastAdjustmentRequest> requests = new ArrayList<>();
BatchUpdateForecastAdjustmentsResponse response =
forecastAdjustmentServiceClient.batchUpdateForecastAdjustments(parent, requests);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. The parent resource where |
requests |
List<UpdateForecastAdjustmentRequest>Required. The |
| Returns | |
|---|---|
| Type | Description |
BatchUpdateForecastAdjustmentsResponse |
|
batchUpdateForecastAdjustments(BatchUpdateForecastAdjustmentsRequest request)
public final BatchUpdateForecastAdjustmentsResponse batchUpdateForecastAdjustments(BatchUpdateForecastAdjustmentsRequest request)Batch updates ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
BatchUpdateForecastAdjustmentsRequest request =
BatchUpdateForecastAdjustmentsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllRequests(new ArrayList<UpdateForecastAdjustmentRequest>())
.build();
BatchUpdateForecastAdjustmentsResponse response =
forecastAdjustmentServiceClient.batchUpdateForecastAdjustments(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchUpdateForecastAdjustmentsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BatchUpdateForecastAdjustmentsResponse |
|
batchUpdateForecastAdjustments(String parent, List<UpdateForecastAdjustmentRequest> requests)
public final BatchUpdateForecastAdjustmentsResponse batchUpdateForecastAdjustments(String parent, List<UpdateForecastAdjustmentRequest> requests)Batch updates ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
List<UpdateForecastAdjustmentRequest> requests = new ArrayList<>();
BatchUpdateForecastAdjustmentsResponse response =
forecastAdjustmentServiceClient.batchUpdateForecastAdjustments(parent, requests);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where |
requests |
List<UpdateForecastAdjustmentRequest>Required. The |
| Returns | |
|---|---|
| Type | Description |
BatchUpdateForecastAdjustmentsResponse |
|
batchUpdateForecastAdjustmentsCallable()
public final UnaryCallable<BatchUpdateForecastAdjustmentsRequest,BatchUpdateForecastAdjustmentsResponse> batchUpdateForecastAdjustmentsCallable()Batch updates ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
BatchUpdateForecastAdjustmentsRequest request =
BatchUpdateForecastAdjustmentsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllRequests(new ArrayList<UpdateForecastAdjustmentRequest>())
.build();
ApiFuture<BatchUpdateForecastAdjustmentsResponse> future =
forecastAdjustmentServiceClient
.batchUpdateForecastAdjustmentsCallable()
.futureCall(request);
// Do something.
BatchUpdateForecastAdjustmentsResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchUpdateForecastAdjustmentsRequest,BatchUpdateForecastAdjustmentsResponse> |
|
calculateDailyAdOpportunityCounts(@Nullable NetworkName parent, ForecastAdjustment forecastAdjustment)
public final CalculateDailyAdOpportunityCountsResponse calculateDailyAdOpportunityCounts(@Nullable NetworkName parent, ForecastAdjustment forecastAdjustment)Calculates daily ad opportunity counts for a prospective ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
ForecastAdjustment forecastAdjustment = ForecastAdjustment.newBuilder().build();
CalculateDailyAdOpportunityCountsResponse response =
forecastAdjustmentServiceClient.calculateDailyAdOpportunityCounts(
parent, forecastAdjustment);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. The parent resource where this |
forecastAdjustment |
ForecastAdjustmentRequired. The prospective |
| Returns | |
|---|---|
| Type | Description |
CalculateDailyAdOpportunityCountsResponse |
|
calculateDailyAdOpportunityCounts(CalculateDailyAdOpportunityCountsRequest request)
public final CalculateDailyAdOpportunityCountsResponse calculateDailyAdOpportunityCounts(CalculateDailyAdOpportunityCountsRequest request)Calculates daily ad opportunity counts for a prospective ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
CalculateDailyAdOpportunityCountsRequest request =
CalculateDailyAdOpportunityCountsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setForecastAdjustment(ForecastAdjustment.newBuilder().build())
.build();
CalculateDailyAdOpportunityCountsResponse response =
forecastAdjustmentServiceClient.calculateDailyAdOpportunityCounts(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
CalculateDailyAdOpportunityCountsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
CalculateDailyAdOpportunityCountsResponse |
|
calculateDailyAdOpportunityCounts(String parent, ForecastAdjustment forecastAdjustment)
public final CalculateDailyAdOpportunityCountsResponse calculateDailyAdOpportunityCounts(String parent, ForecastAdjustment forecastAdjustment)Calculates daily ad opportunity counts for a prospective ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
ForecastAdjustment forecastAdjustment = ForecastAdjustment.newBuilder().build();
CalculateDailyAdOpportunityCountsResponse response =
forecastAdjustmentServiceClient.calculateDailyAdOpportunityCounts(
parent, forecastAdjustment);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where this |
forecastAdjustment |
ForecastAdjustmentRequired. The prospective |
| Returns | |
|---|---|
| Type | Description |
CalculateDailyAdOpportunityCountsResponse |
|
calculateDailyAdOpportunityCountsCallable()
public final UnaryCallable<CalculateDailyAdOpportunityCountsRequest,CalculateDailyAdOpportunityCountsResponse> calculateDailyAdOpportunityCountsCallable()Calculates daily ad opportunity counts for a prospective ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
CalculateDailyAdOpportunityCountsRequest request =
CalculateDailyAdOpportunityCountsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setForecastAdjustment(ForecastAdjustment.newBuilder().build())
.build();
ApiFuture<CalculateDailyAdOpportunityCountsResponse> future =
forecastAdjustmentServiceClient
.calculateDailyAdOpportunityCountsCallable()
.futureCall(request);
// Do something.
CalculateDailyAdOpportunityCountsResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CalculateDailyAdOpportunityCountsRequest,CalculateDailyAdOpportunityCountsResponse> |
|
close()
public final void close()createForecastAdjustment(@Nullable NetworkName parent, ForecastAdjustment forecastAdjustment)
public final ForecastAdjustment createForecastAdjustment(@Nullable NetworkName parent, ForecastAdjustment forecastAdjustment)Creates a ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
ForecastAdjustment forecastAdjustment = ForecastAdjustment.newBuilder().build();
ForecastAdjustment response =
forecastAdjustmentServiceClient.createForecastAdjustment(parent, forecastAdjustment);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. The parent resource where this |
forecastAdjustment |
ForecastAdjustmentRequired. The |
| Returns | |
|---|---|
| Type | Description |
ForecastAdjustment |
|
createForecastAdjustment(CreateForecastAdjustmentRequest request)
public final ForecastAdjustment createForecastAdjustment(CreateForecastAdjustmentRequest request)Creates a ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
CreateForecastAdjustmentRequest request =
CreateForecastAdjustmentRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setForecastAdjustment(ForecastAdjustment.newBuilder().build())
.build();
ForecastAdjustment response =
forecastAdjustmentServiceClient.createForecastAdjustment(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateForecastAdjustmentRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
ForecastAdjustment |
|
createForecastAdjustment(String parent, ForecastAdjustment forecastAdjustment)
public final ForecastAdjustment createForecastAdjustment(String parent, ForecastAdjustment forecastAdjustment)Creates a ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
ForecastAdjustment forecastAdjustment = ForecastAdjustment.newBuilder().build();
ForecastAdjustment response =
forecastAdjustmentServiceClient.createForecastAdjustment(parent, forecastAdjustment);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where this |
forecastAdjustment |
ForecastAdjustmentRequired. The |
| Returns | |
|---|---|
| Type | Description |
ForecastAdjustment |
|
createForecastAdjustmentCallable()
public final UnaryCallable<CreateForecastAdjustmentRequest,ForecastAdjustment> createForecastAdjustmentCallable()Creates a ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
CreateForecastAdjustmentRequest request =
CreateForecastAdjustmentRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setForecastAdjustment(ForecastAdjustment.newBuilder().build())
.build();
ApiFuture<ForecastAdjustment> future =
forecastAdjustmentServiceClient.createForecastAdjustmentCallable().futureCall(request);
// Do something.
ForecastAdjustment response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateForecastAdjustmentRequest,ForecastAdjustment> |
|
getForecastAdjustment(@Nullable ForecastAdjustmentName name)
public final ForecastAdjustment getForecastAdjustment(@Nullable ForecastAdjustmentName name)Retrieves a ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
ForecastAdjustmentName name =
ForecastAdjustmentName.of("[NETWORK_CODE]", "[FORECAST_ADJUSTMENT]");
ForecastAdjustment response = forecastAdjustmentServiceClient.getForecastAdjustment(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.ForecastAdjustmentNameRequired. The resource name of the ForecastAdjustment. Format:
|
| Returns | |
|---|---|
| Type | Description |
ForecastAdjustment |
|
getForecastAdjustment(GetForecastAdjustmentRequest request)
public final ForecastAdjustment getForecastAdjustment(GetForecastAdjustmentRequest request)Retrieves a ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
GetForecastAdjustmentRequest request =
GetForecastAdjustmentRequest.newBuilder()
.setName(
ForecastAdjustmentName.of("[NETWORK_CODE]", "[FORECAST_ADJUSTMENT]").toString())
.build();
ForecastAdjustment response = forecastAdjustmentServiceClient.getForecastAdjustment(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetForecastAdjustmentRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
ForecastAdjustment |
|
getForecastAdjustment(String name)
public final ForecastAdjustment getForecastAdjustment(String name)Retrieves a ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
String name = ForecastAdjustmentName.of("[NETWORK_CODE]", "[FORECAST_ADJUSTMENT]").toString();
ForecastAdjustment response = forecastAdjustmentServiceClient.getForecastAdjustment(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The resource name of the ForecastAdjustment. Format:
|
| Returns | |
|---|---|
| Type | Description |
ForecastAdjustment |
|
getForecastAdjustmentCallable()
public final UnaryCallable<GetForecastAdjustmentRequest,ForecastAdjustment> getForecastAdjustmentCallable()Retrieves a ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
GetForecastAdjustmentRequest request =
GetForecastAdjustmentRequest.newBuilder()
.setName(
ForecastAdjustmentName.of("[NETWORK_CODE]", "[FORECAST_ADJUSTMENT]").toString())
.build();
ApiFuture<ForecastAdjustment> future =
forecastAdjustmentServiceClient.getForecastAdjustmentCallable().futureCall(request);
// Do something.
ForecastAdjustment response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetForecastAdjustmentRequest,ForecastAdjustment> |
|
getSettings()
public final @Nullable ForecastAdjustmentServiceSettings getSettings()| Returns | |
|---|---|
| Type | Description |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.ForecastAdjustmentServiceSettings |
|
getStub()
public ForecastAdjustmentServiceStub getStub()| Returns | |
|---|---|
| Type | Description |
ForecastAdjustmentServiceStub |
|
isShutdown()
public boolean isShutdown()| Returns | |
|---|---|
| Type | Description |
boolean |
|
isTerminated()
public boolean isTerminated()| Returns | |
|---|---|
| Type | Description |
boolean |
|
listForecastAdjustments(@Nullable NetworkName parent)
public final ForecastAdjustmentServiceClient.ListForecastAdjustmentsPagedResponse listForecastAdjustments(@Nullable NetworkName parent)Lists ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
for (ForecastAdjustment element :
forecastAdjustmentServiceClient.listForecastAdjustments(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. The parent, which owns this collection of ForecastAdjustments. Format:
|
| Returns | |
|---|---|
| Type | Description |
ForecastAdjustmentServiceClient.ListForecastAdjustmentsPagedResponse |
|
listForecastAdjustments(ListForecastAdjustmentsRequest request)
public final ForecastAdjustmentServiceClient.ListForecastAdjustmentsPagedResponse listForecastAdjustments(ListForecastAdjustmentsRequest request)Lists ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
ListForecastAdjustmentsRequest request =
ListForecastAdjustmentsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.setSkip(3532159)
.build();
for (ForecastAdjustment element :
forecastAdjustmentServiceClient.listForecastAdjustments(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListForecastAdjustmentsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
ForecastAdjustmentServiceClient.ListForecastAdjustmentsPagedResponse |
|
listForecastAdjustments(String parent)
public final ForecastAdjustmentServiceClient.ListForecastAdjustmentsPagedResponse listForecastAdjustments(String parent)Lists ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
for (ForecastAdjustment element :
forecastAdjustmentServiceClient.listForecastAdjustments(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent, which owns this collection of ForecastAdjustments. Format:
|
| Returns | |
|---|---|
| Type | Description |
ForecastAdjustmentServiceClient.ListForecastAdjustmentsPagedResponse |
|
listForecastAdjustmentsCallable()
public final UnaryCallable<ListForecastAdjustmentsRequest,ListForecastAdjustmentsResponse> listForecastAdjustmentsCallable()Lists ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
ListForecastAdjustmentsRequest request =
ListForecastAdjustmentsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.setSkip(3532159)
.build();
while (true) {
ListForecastAdjustmentsResponse response =
forecastAdjustmentServiceClient.listForecastAdjustmentsCallable().call(request);
for (ForecastAdjustment element : response.getForecastAdjustmentsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListForecastAdjustmentsRequest,ListForecastAdjustmentsResponse> |
|
listForecastAdjustmentsPagedCallable()
public final UnaryCallable<ListForecastAdjustmentsRequest,ForecastAdjustmentServiceClient.ListForecastAdjustmentsPagedResponse> listForecastAdjustmentsPagedCallable()Lists ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
ListForecastAdjustmentsRequest request =
ListForecastAdjustmentsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.setSkip(3532159)
.build();
ApiFuture<ForecastAdjustment> future =
forecastAdjustmentServiceClient
.listForecastAdjustmentsPagedCallable()
.futureCall(request);
// Do something.
for (ForecastAdjustment element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListForecastAdjustmentsRequest,ListForecastAdjustmentsPagedResponse> |
|
shutdown()
public void shutdown()shutdownNow()
public void shutdownNow()updateForecastAdjustment(ForecastAdjustment forecastAdjustment, FieldMask updateMask)
public final ForecastAdjustment updateForecastAdjustment(ForecastAdjustment forecastAdjustment, FieldMask updateMask)Updates a ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
ForecastAdjustment forecastAdjustment = ForecastAdjustment.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
ForecastAdjustment response =
forecastAdjustmentServiceClient.updateForecastAdjustment(forecastAdjustment, updateMask);
}
| Parameters | |
|---|---|
| Name | Description |
forecastAdjustment |
ForecastAdjustmentRequired. The The |
updateMask |
FieldMaskOptional. The list of fields to update. |
| Returns | |
|---|---|
| Type | Description |
ForecastAdjustment |
|
updateForecastAdjustment(UpdateForecastAdjustmentRequest request)
public final ForecastAdjustment updateForecastAdjustment(UpdateForecastAdjustmentRequest request)Updates a ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
UpdateForecastAdjustmentRequest request =
UpdateForecastAdjustmentRequest.newBuilder()
.setForecastAdjustment(ForecastAdjustment.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ForecastAdjustment response =
forecastAdjustmentServiceClient.updateForecastAdjustment(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateForecastAdjustmentRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
ForecastAdjustment |
|
updateForecastAdjustmentCallable()
public final UnaryCallable<UpdateForecastAdjustmentRequest,ForecastAdjustment> updateForecastAdjustmentCallable()Updates a ForecastAdjustment 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 (ForecastAdjustmentServiceClient forecastAdjustmentServiceClient =
ForecastAdjustmentServiceClient.create()) {
UpdateForecastAdjustmentRequest request =
UpdateForecastAdjustmentRequest.newBuilder()
.setForecastAdjustment(ForecastAdjustment.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<ForecastAdjustment> future =
forecastAdjustmentServiceClient.updateForecastAdjustmentCallable().futureCall(request);
// Do something.
ForecastAdjustment response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateForecastAdjustmentRequest,ForecastAdjustment> |
|