@Deprecated @Generated(value="by gapic-generator-java") public class CloudChannelReportsServiceClient extends Object implements com.google.api.gax.core.BackgroundResource
Deprecated: This service is being deprecated. Please use [Export Channel Services data to BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) instead.
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 (CloudChannelReportsServiceClient cloudChannelReportsServiceClient =
CloudChannelReportsServiceClient.create()) {
RunReportJobRequest request =
RunReportJobRequest.newBuilder()
.setName(ReportName.of("[ACCOUNT]", "[REPORT]").toString())
.setDateRange(DateRange.newBuilder().build())
.setFilter("filter-1274492040")
.setLanguageCode("languageCode-2092349083")
.build();
RunReportJobResponse response =
cloudChannelReportsServiceClient.runReportJobAsync(request).get();
}
Note: close() needs to be called on the CloudChannelReportsServiceClient 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 |
|---|---|---|
RunReportJob |
Begins generation of data for a given report. The report identifier is a UID (for example, `613bf59q`). Possible error codes:
Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata contains an instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. To get the results of report generation, call [CloudChannelReportsService.FetchReportResults][google.cloud.channel.v1.CloudChannelReportsService.FetchReportResults] with the [RunReportJobResponse.report_job][google.cloud.channel.v1.RunReportJobResponse.report_job]. Deprecated: Please use [Export Channel Services data to BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) instead. |
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.
|
FetchReportResults |
Retrieves data generated by [CloudChannelReportsService.RunReportJob][google.cloud.channel.v1.CloudChannelReportsService.RunReportJob]. Deprecated: Please use [Export Channel Services data to BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) instead. |
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.
|
ListReports |
Lists the reports that RunReportJob can run. These reports include an ID, a description, and the list of columns that will be in the result. Deprecated: Please use [Export Channel Services data to BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) instead. |
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 CloudChannelReportsServiceSettings 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
CloudChannelReportsServiceSettings cloudChannelReportsServiceSettings =
CloudChannelReportsServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
CloudChannelReportsServiceClient cloudChannelReportsServiceClient =
CloudChannelReportsServiceClient.create(cloudChannelReportsServiceSettings);
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
CloudChannelReportsServiceSettings cloudChannelReportsServiceSettings =
CloudChannelReportsServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
CloudChannelReportsServiceClient cloudChannelReportsServiceClient =
CloudChannelReportsServiceClient.create(cloudChannelReportsServiceSettings);
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:
// 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
CloudChannelReportsServiceSettings cloudChannelReportsServiceSettings =
CloudChannelReportsServiceSettings.newHttpJsonBuilder().build();
CloudChannelReportsServiceClient cloudChannelReportsServiceClient =
CloudChannelReportsServiceClient.create(cloudChannelReportsServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
| Modifier and Type | Class and Description |
|---|---|
static class |
CloudChannelReportsServiceClient.FetchReportResultsFixedSizeCollection
Deprecated.
|
static class |
CloudChannelReportsServiceClient.FetchReportResultsPage
Deprecated.
|
static class |
CloudChannelReportsServiceClient.FetchReportResultsPagedResponse
Deprecated.
|
static class |
CloudChannelReportsServiceClient.ListReportsFixedSizeCollection
Deprecated.
|
static class |
CloudChannelReportsServiceClient.ListReportsPage
Deprecated.
|
static class |
CloudChannelReportsServiceClient.ListReportsPagedResponse
Deprecated.
|
| Modifier | Constructor and Description |
|---|---|
protected |
CloudChannelReportsServiceClient(CloudChannelReportsServiceSettings settings)
Deprecated.
Constructs an instance of CloudChannelReportsServiceClient, using the given settings.
|
protected |
CloudChannelReportsServiceClient(CloudChannelReportsServiceStub stub)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long duration,
TimeUnit unit)
Deprecated.
|
void |
close()
Deprecated.
|
static CloudChannelReportsServiceClient |
create()
Deprecated.
Constructs an instance of CloudChannelReportsServiceClient with default settings.
|
static CloudChannelReportsServiceClient |
create(CloudChannelReportsServiceSettings settings)
Deprecated.
Constructs an instance of CloudChannelReportsServiceClient, using the given settings.
|
static CloudChannelReportsServiceClient |
create(CloudChannelReportsServiceStub stub)
Deprecated.
Constructs an instance of CloudChannelReportsServiceClient, using the given stub for making
calls.
|
CloudChannelReportsServiceClient.FetchReportResultsPagedResponse |
fetchReportResults(FetchReportResultsRequest request)
Deprecated.
This method is deprecated and will be removed in the next major version update.
|
CloudChannelReportsServiceClient.FetchReportResultsPagedResponse |
fetchReportResults(ReportJobName reportJob)
Deprecated.
This method is deprecated and will be removed in the next major version update.
|
CloudChannelReportsServiceClient.FetchReportResultsPagedResponse |
fetchReportResults(String reportJob)
Deprecated.
This method is deprecated and will be removed in the next major version update.
|
com.google.api.gax.rpc.UnaryCallable<FetchReportResultsRequest,FetchReportResultsResponse> |
fetchReportResultsCallable()
Deprecated.
This method is deprecated and will be removed in the next major version update.
|
com.google.api.gax.rpc.UnaryCallable<FetchReportResultsRequest,CloudChannelReportsServiceClient.FetchReportResultsPagedResponse> |
fetchReportResultsPagedCallable()
Deprecated.
This method is deprecated and will be removed in the next major version update.
|
com.google.api.gax.httpjson.longrunning.OperationsClient |
getHttpJsonOperationsClient()
Deprecated.
Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.
|
com.google.longrunning.OperationsClient |
getOperationsClient()
Deprecated.
Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.
|
CloudChannelReportsServiceSettings |
getSettings()
Deprecated.
|
CloudChannelReportsServiceStub |
getStub()
Deprecated.
|
boolean |
isShutdown()
Deprecated.
|
boolean |
isTerminated()
Deprecated.
|
CloudChannelReportsServiceClient.ListReportsPagedResponse |
listReports(ListReportsRequest request)
Deprecated.
This method is deprecated and will be removed in the next major version update.
|
CloudChannelReportsServiceClient.ListReportsPagedResponse |
listReports(String parent)
Deprecated.
This method is deprecated and will be removed in the next major version update.
|
com.google.api.gax.rpc.UnaryCallable<ListReportsRequest,ListReportsResponse> |
listReportsCallable()
Deprecated.
This method is deprecated and will be removed in the next major version update.
|
com.google.api.gax.rpc.UnaryCallable<ListReportsRequest,CloudChannelReportsServiceClient.ListReportsPagedResponse> |
listReportsPagedCallable()
Deprecated.
This method is deprecated and will be removed in the next major version update.
|
com.google.api.gax.longrunning.OperationFuture<RunReportJobResponse,OperationMetadata> |
runReportJobAsync(RunReportJobRequest request)
Deprecated.
This method is deprecated and will be removed in the next major version update.
|
com.google.api.gax.rpc.UnaryCallable<RunReportJobRequest,com.google.longrunning.Operation> |
runReportJobCallable()
Deprecated.
This method is deprecated and will be removed in the next major version update.
|
com.google.api.gax.rpc.OperationCallable<RunReportJobRequest,RunReportJobResponse,OperationMetadata> |
runReportJobOperationCallable()
Deprecated.
This method is deprecated and will be removed in the next major version update.
|
void |
shutdown()
Deprecated.
|
void |
shutdownNow()
Deprecated.
|
protected CloudChannelReportsServiceClient(CloudChannelReportsServiceSettings settings) throws IOException
IOExceptionprotected CloudChannelReportsServiceClient(CloudChannelReportsServiceStub stub)
public static final CloudChannelReportsServiceClient create() throws IOException
IOExceptionpublic static final CloudChannelReportsServiceClient create(CloudChannelReportsServiceSettings settings) throws IOException
IOExceptionpublic static final CloudChannelReportsServiceClient create(CloudChannelReportsServiceStub stub)
public final CloudChannelReportsServiceSettings getSettings()
public CloudChannelReportsServiceStub getStub()
public final com.google.longrunning.OperationsClient getOperationsClient()
@BetaApi public final com.google.api.gax.httpjson.longrunning.OperationsClient getHttpJsonOperationsClient()
@Deprecated public final com.google.api.gax.longrunning.OperationFuture<RunReportJobResponse,OperationMetadata> runReportJobAsync(RunReportJobRequest request)
Possible error codes:
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata contains an instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
To get the results of report generation, call [CloudChannelReportsService.FetchReportResults][google.cloud.channel.v1.CloudChannelReportsService.FetchReportResults] with the [RunReportJobResponse.report_job][google.cloud.channel.v1.RunReportJobResponse.report_job].
Deprecated: Please use [Export Channel Services data to BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) instead.
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 (CloudChannelReportsServiceClient cloudChannelReportsServiceClient =
CloudChannelReportsServiceClient.create()) {
RunReportJobRequest request =
RunReportJobRequest.newBuilder()
.setName(ReportName.of("[ACCOUNT]", "[REPORT]").toString())
.setDateRange(DateRange.newBuilder().build())
.setFilter("filter-1274492040")
.setLanguageCode("languageCode-2092349083")
.build();
RunReportJobResponse response =
cloudChannelReportsServiceClient.runReportJobAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call fails@Deprecated public final com.google.api.gax.rpc.OperationCallable<RunReportJobRequest,RunReportJobResponse,OperationMetadata> runReportJobOperationCallable()
Possible error codes:
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata contains an instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
To get the results of report generation, call [CloudChannelReportsService.FetchReportResults][google.cloud.channel.v1.CloudChannelReportsService.FetchReportResults] with the [RunReportJobResponse.report_job][google.cloud.channel.v1.RunReportJobResponse.report_job].
Deprecated: Please use [Export Channel Services data to BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) instead.
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 (CloudChannelReportsServiceClient cloudChannelReportsServiceClient =
CloudChannelReportsServiceClient.create()) {
RunReportJobRequest request =
RunReportJobRequest.newBuilder()
.setName(ReportName.of("[ACCOUNT]", "[REPORT]").toString())
.setDateRange(DateRange.newBuilder().build())
.setFilter("filter-1274492040")
.setLanguageCode("languageCode-2092349083")
.build();
OperationFuture<RunReportJobResponse, OperationMetadata> future =
cloudChannelReportsServiceClient.runReportJobOperationCallable().futureCall(request);
// Do something.
RunReportJobResponse response = future.get();
}
@Deprecated public final com.google.api.gax.rpc.UnaryCallable<RunReportJobRequest,com.google.longrunning.Operation> runReportJobCallable()
Possible error codes:
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata contains an instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
To get the results of report generation, call [CloudChannelReportsService.FetchReportResults][google.cloud.channel.v1.CloudChannelReportsService.FetchReportResults] with the [RunReportJobResponse.report_job][google.cloud.channel.v1.RunReportJobResponse.report_job].
Deprecated: Please use [Export Channel Services data to BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) instead.
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 (CloudChannelReportsServiceClient cloudChannelReportsServiceClient =
CloudChannelReportsServiceClient.create()) {
RunReportJobRequest request =
RunReportJobRequest.newBuilder()
.setName(ReportName.of("[ACCOUNT]", "[REPORT]").toString())
.setDateRange(DateRange.newBuilder().build())
.setFilter("filter-1274492040")
.setLanguageCode("languageCode-2092349083")
.build();
ApiFuture<Operation> future =
cloudChannelReportsServiceClient.runReportJobCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
@Deprecated public final CloudChannelReportsServiceClient.FetchReportResultsPagedResponse fetchReportResults(ReportJobName reportJob)
Deprecated: Please use [Export Channel Services data to BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) instead.
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 (CloudChannelReportsServiceClient cloudChannelReportsServiceClient =
CloudChannelReportsServiceClient.create()) {
ReportJobName reportJob = ReportJobName.of("[ACCOUNT]", "[REPORT_JOB]");
for (Row element :
cloudChannelReportsServiceClient.fetchReportResults(reportJob).iterateAll()) {
// doThingsWith(element);
}
}
reportJob - Required. The report job created by
[CloudChannelReportsService.RunReportJob][google.cloud.channel.v1.CloudChannelReportsService.RunReportJob].
Report_job uses the format: accounts/{account_id}/reportJobs/{report_job_id}com.google.api.gax.rpc.ApiException - if the remote call fails@Deprecated public final CloudChannelReportsServiceClient.FetchReportResultsPagedResponse fetchReportResults(String reportJob)
Deprecated: Please use [Export Channel Services data to BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) instead.
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 (CloudChannelReportsServiceClient cloudChannelReportsServiceClient =
CloudChannelReportsServiceClient.create()) {
String reportJob = ReportJobName.of("[ACCOUNT]", "[REPORT_JOB]").toString();
for (Row element :
cloudChannelReportsServiceClient.fetchReportResults(reportJob).iterateAll()) {
// doThingsWith(element);
}
}
reportJob - Required. The report job created by
[CloudChannelReportsService.RunReportJob][google.cloud.channel.v1.CloudChannelReportsService.RunReportJob].
Report_job uses the format: accounts/{account_id}/reportJobs/{report_job_id}com.google.api.gax.rpc.ApiException - if the remote call fails@Deprecated public final CloudChannelReportsServiceClient.FetchReportResultsPagedResponse fetchReportResults(FetchReportResultsRequest request)
Deprecated: Please use [Export Channel Services data to BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) instead.
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 (CloudChannelReportsServiceClient cloudChannelReportsServiceClient =
CloudChannelReportsServiceClient.create()) {
FetchReportResultsRequest request =
FetchReportResultsRequest.newBuilder()
.setReportJob(ReportJobName.of("[ACCOUNT]", "[REPORT_JOB]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.addAllPartitionKeys(new ArrayList<String>())
.build();
for (Row element :
cloudChannelReportsServiceClient.fetchReportResults(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call fails@Deprecated public final com.google.api.gax.rpc.UnaryCallable<FetchReportResultsRequest,CloudChannelReportsServiceClient.FetchReportResultsPagedResponse> fetchReportResultsPagedCallable()
Deprecated: Please use [Export Channel Services data to BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) instead.
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 (CloudChannelReportsServiceClient cloudChannelReportsServiceClient =
CloudChannelReportsServiceClient.create()) {
FetchReportResultsRequest request =
FetchReportResultsRequest.newBuilder()
.setReportJob(ReportJobName.of("[ACCOUNT]", "[REPORT_JOB]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.addAllPartitionKeys(new ArrayList<String>())
.build();
ApiFuture<Row> future =
cloudChannelReportsServiceClient.fetchReportResultsPagedCallable().futureCall(request);
// Do something.
for (Row element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
@Deprecated public final com.google.api.gax.rpc.UnaryCallable<FetchReportResultsRequest,FetchReportResultsResponse> fetchReportResultsCallable()
Deprecated: Please use [Export Channel Services data to BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) instead.
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 (CloudChannelReportsServiceClient cloudChannelReportsServiceClient =
CloudChannelReportsServiceClient.create()) {
FetchReportResultsRequest request =
FetchReportResultsRequest.newBuilder()
.setReportJob(ReportJobName.of("[ACCOUNT]", "[REPORT_JOB]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.addAllPartitionKeys(new ArrayList<String>())
.build();
while (true) {
FetchReportResultsResponse response =
cloudChannelReportsServiceClient.fetchReportResultsCallable().call(request);
for (Row element : response.getRowsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
@Deprecated public final CloudChannelReportsServiceClient.ListReportsPagedResponse listReports(String parent)
Deprecated: Please use [Export Channel Services data to BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) instead.
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 (CloudChannelReportsServiceClient cloudChannelReportsServiceClient =
CloudChannelReportsServiceClient.create()) {
String parent = "parent-995424086";
for (Report element : cloudChannelReportsServiceClient.listReports(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the partner account to list available reports for.
Parent uses the format: accounts/{account_id}com.google.api.gax.rpc.ApiException - if the remote call fails@Deprecated public final CloudChannelReportsServiceClient.ListReportsPagedResponse listReports(ListReportsRequest request)
Deprecated: Please use [Export Channel Services data to BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) instead.
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 (CloudChannelReportsServiceClient cloudChannelReportsServiceClient =
CloudChannelReportsServiceClient.create()) {
ListReportsRequest request =
ListReportsRequest.newBuilder()
.setParent("parent-995424086")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setLanguageCode("languageCode-2092349083")
.build();
for (Report element : cloudChannelReportsServiceClient.listReports(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call fails@Deprecated public final com.google.api.gax.rpc.UnaryCallable<ListReportsRequest,CloudChannelReportsServiceClient.ListReportsPagedResponse> listReportsPagedCallable()
Deprecated: Please use [Export Channel Services data to BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) instead.
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 (CloudChannelReportsServiceClient cloudChannelReportsServiceClient =
CloudChannelReportsServiceClient.create()) {
ListReportsRequest request =
ListReportsRequest.newBuilder()
.setParent("parent-995424086")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setLanguageCode("languageCode-2092349083")
.build();
ApiFuture<Report> future =
cloudChannelReportsServiceClient.listReportsPagedCallable().futureCall(request);
// Do something.
for (Report element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
@Deprecated public final com.google.api.gax.rpc.UnaryCallable<ListReportsRequest,ListReportsResponse> listReportsCallable()
Deprecated: Please use [Export Channel Services data to BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) instead.
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 (CloudChannelReportsServiceClient cloudChannelReportsServiceClient =
CloudChannelReportsServiceClient.create()) {
ListReportsRequest request =
ListReportsRequest.newBuilder()
.setParent("parent-995424086")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setLanguageCode("languageCode-2092349083")
.build();
while (true) {
ListReportsResponse response =
cloudChannelReportsServiceClient.listReportsCallable().call(request);
for (Report element : response.getReportsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final void close()
close in interface AutoCloseablepublic void shutdown()
shutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isShutdown()
isShutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isTerminated()
isTerminated in interface com.google.api.gax.core.BackgroundResourcepublic void shutdownNow()
shutdownNow in interface com.google.api.gax.core.BackgroundResourcepublic boolean awaitTermination(long duration,
TimeUnit unit)
throws InterruptedException
awaitTermination in interface com.google.api.gax.core.BackgroundResourceInterruptedExceptionCopyright © 2024 Google LLC. All rights reserved.