| GitHub Repository | Product Reference | RPC Documentation |
Service Description: Service for querying reports.
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 (ReportingServiceClient reportingServiceClient = ReportingServiceClient.create()) {
String parent = "parent-995424086";
for (PartnerMatchReportEntry element :
reportingServiceClient.retrievePartnerMatchReport(parent).iterateAll()) {
// doThingsWith(element);
}
}
Note: close() needs to be called on the ReportingServiceClient 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 |
|---|---|---|
RetrievePartnerMatchReport |
Retrieves a partner match report. This feature is only available to data partners. |
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 ReportingServiceSettings 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
ReportingServiceSettings reportingServiceSettings =
ReportingServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
ReportingServiceClient reportingServiceClient =
ReportingServiceClient.create(reportingServiceSettings);
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
ReportingServiceSettings reportingServiceSettings =
ReportingServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
ReportingServiceClient reportingServiceClient =
ReportingServiceClient.create(reportingServiceSettings);
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
ReportingServiceSettings reportingServiceSettings =
ReportingServiceSettings.newHttpJsonBuilder().build();
ReportingServiceClient reportingServiceClient =
ReportingServiceClient.create(reportingServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final ReportingServiceClient create()Constructs an instance of ReportingServiceClient with default settings.
| Returns | |
|---|---|
| Type | Description |
ReportingServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(ReportingServiceSettings settings)
public static final ReportingServiceClient create(ReportingServiceSettings settings)Constructs an instance of ReportingServiceClient, 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 |
ReportingServiceSettings |
| Returns | |
|---|---|
| Type | Description |
ReportingServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(ReportingServiceStub stub)
public static final ReportingServiceClient create(ReportingServiceStub stub)Constructs an instance of ReportingServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(ReportingServiceSettings).
| Parameter | |
|---|---|
| Name | Description |
stub |
ReportingServiceStub |
| Returns | |
|---|---|
| Type | Description |
ReportingServiceClient |
|
Constructors
ReportingServiceClient(ReportingServiceSettings settings)
protected ReportingServiceClient(ReportingServiceSettings settings)Constructs an instance of ReportingServiceClient, 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 |
ReportingServiceSettings |
ReportingServiceClient(ReportingServiceStub stub)
protected ReportingServiceClient(ReportingServiceStub stub)| Parameter | |
|---|---|
| Name | Description |
stub |
ReportingServiceStub |
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 |
|
close()
public final void close()getSettings()
public final @Nullable ReportingServiceSettings getSettings()| Returns | |
|---|---|
| Type | Description |
@org.jspecify.annotations.Nullable com.google.ads.datamanager.v1.ReportingServiceSettings |
|
getStub()
public ReportingServiceStub getStub()| Returns | |
|---|---|
| Type | Description |
ReportingServiceStub |
|
isShutdown()
public boolean isShutdown()| Returns | |
|---|---|
| Type | Description |
boolean |
|
isTerminated()
public boolean isTerminated()| Returns | |
|---|---|
| Type | Description |
boolean |
|
retrievePartnerMatchReport(RetrievePartnerMatchReportRequest request)
public final ReportingServiceClient.RetrievePartnerMatchReportPagedResponse retrievePartnerMatchReport(RetrievePartnerMatchReportRequest request)Retrieves a partner match report.
This feature is only available to data partners.
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 (ReportingServiceClient reportingServiceClient = ReportingServiceClient.create()) {
RetrievePartnerMatchReportRequest request =
RetrievePartnerMatchReportRequest.newBuilder()
.setParent("parent-995424086")
.setCurrencyCode("currencyCode1004773790")
.setFilter("filter-1274492040")
.setStartDate(-1573629589)
.setEndDate(1725067410)
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (PartnerMatchReportEntry element :
reportingServiceClient.retrievePartnerMatchReport(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
RetrievePartnerMatchReportRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
ReportingServiceClient.RetrievePartnerMatchReportPagedResponse |
|
retrievePartnerMatchReport(String parent)
public final ReportingServiceClient.RetrievePartnerMatchReportPagedResponse retrievePartnerMatchReport(String parent)Retrieves a partner match report.
This feature is only available to data partners.
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 (ReportingServiceClient reportingServiceClient = ReportingServiceClient.create()) {
String parent = "parent-995424086";
for (PartnerMatchReportEntry element :
reportingServiceClient.retrievePartnerMatchReport(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent account that owns the user list. Format:
|
| Returns | |
|---|---|
| Type | Description |
ReportingServiceClient.RetrievePartnerMatchReportPagedResponse |
|
retrievePartnerMatchReportCallable()
public final UnaryCallable<RetrievePartnerMatchReportRequest,RetrievePartnerMatchReportResponse> retrievePartnerMatchReportCallable()Retrieves a partner match report.
This feature is only available to data partners.
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 (ReportingServiceClient reportingServiceClient = ReportingServiceClient.create()) {
RetrievePartnerMatchReportRequest request =
RetrievePartnerMatchReportRequest.newBuilder()
.setParent("parent-995424086")
.setCurrencyCode("currencyCode1004773790")
.setFilter("filter-1274492040")
.setStartDate(-1573629589)
.setEndDate(1725067410)
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
RetrievePartnerMatchReportResponse response =
reportingServiceClient.retrievePartnerMatchReportCallable().call(request);
for (PartnerMatchReportEntry element : response.getPartnerMatchReportEntriesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<RetrievePartnerMatchReportRequest,RetrievePartnerMatchReportResponse> |
|
retrievePartnerMatchReportPagedCallable()
public final UnaryCallable<RetrievePartnerMatchReportRequest,ReportingServiceClient.RetrievePartnerMatchReportPagedResponse> retrievePartnerMatchReportPagedCallable()Retrieves a partner match report.
This feature is only available to data partners.
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 (ReportingServiceClient reportingServiceClient = ReportingServiceClient.create()) {
RetrievePartnerMatchReportRequest request =
RetrievePartnerMatchReportRequest.newBuilder()
.setParent("parent-995424086")
.setCurrencyCode("currencyCode1004773790")
.setFilter("filter-1274492040")
.setStartDate(-1573629589)
.setEndDate(1725067410)
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<PartnerMatchReportEntry> future =
reportingServiceClient.retrievePartnerMatchReportPagedCallable().futureCall(request);
// Do something.
for (PartnerMatchReportEntry element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<RetrievePartnerMatchReportRequest,RetrievePartnerMatchReportPagedResponse> |
|
shutdown()
public void shutdown()shutdownNow()
public void shutdownNow()