Class ReportingServiceClient
ReportingService client wrapper, for convenient use.
Namespace: Google.Ads.DataManager.V1
Assembly: Google.Ads.DataManager.V1.dll
Syntax
public abstract class ReportingServiceClient
Remarks
Service for querying reports.
Properties
DefaultEndpoint
The default endpoint for the ReportingService service, which is a host of "datamanager.googleapis.com" and a port of 443.
Declaration
public static string DefaultEndpoint { get; }
Property Value
| Type | Description |
|---|---|
| string |
DefaultScopes
The default ReportingService scopes.
Declaration
public static IReadOnlyList<string> DefaultScopes { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<string> |
Remarks
The default ReportingService scopes are:
- https://www.googleapis.com/auth/datamanager
GrpcClient
The underlying gRPC ReportingService client
Declaration
public virtual ReportingService.ReportingServiceClient GrpcClient { get; }
Property Value
| Type | Description |
|---|---|
| ReportingService.ReportingServiceClient |
ServiceMetadata
The service metadata associated with this client type.
Declaration
public static ServiceMetadata ServiceMetadata { get; }
Property Value
| Type | Description |
|---|---|
| ServiceMetadata |
Methods
Create()
Synchronously creates a ReportingServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ReportingServiceClientBuilder.
Declaration
public static ReportingServiceClient Create()
Returns
| Type | Description |
|---|---|
| ReportingServiceClient | The created ReportingServiceClient. |
CreateAsync(CancellationToken)
Asynchronously creates a ReportingServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ReportingServiceClientBuilder.
Declaration
public static Task<ReportingServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | The CancellationToken to use while creating the client. |
Returns
| Type | Description |
|---|---|
| Task<ReportingServiceClient> | The task representing the created ReportingServiceClient. |
RetrievePartnerMatchReport(RetrievePartnerMatchReportRequest, CallSettings)
Retrieves a partner match report.
This feature is only available to data partners.
Declaration
public virtual PagedEnumerable<RetrievePartnerMatchReportResponse, PartnerMatchReportEntry> RetrievePartnerMatchReport(RetrievePartnerMatchReportRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| RetrievePartnerMatchReportRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedEnumerable<RetrievePartnerMatchReportResponse, PartnerMatchReportEntry> | A pageable sequence of PartnerMatchReportEntry resources. |
Sample code
// Create client
ReportingServiceClient reportingServiceClient = ReportingServiceClient.Create();
// Initialize request argument(s)
RetrievePartnerMatchReportRequest request = new RetrievePartnerMatchReportRequest
{
Parent = "",
CurrencyCode = "",
Filter = "",
StartDate = 0L,
EndDate = 0L,
};
// Make the request
PagedEnumerable<RetrievePartnerMatchReportResponse, PartnerMatchReportEntry> response = reportingServiceClient.RetrievePartnerMatchReport(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (PartnerMatchReportEntry item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (RetrievePartnerMatchReportResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (PartnerMatchReportEntry item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<PartnerMatchReportEntry> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (PartnerMatchReportEntry item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
RetrievePartnerMatchReport(string, string, int?, CallSettings)
Retrieves a partner match report.
This feature is only available to data partners.
Declaration
public virtual PagedEnumerable<RetrievePartnerMatchReportResponse, PartnerMatchReportEntry> RetrievePartnerMatchReport(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent account that owns the user list.
Format: |
| string | pageToken | The token returned from the previous request. A value of |
| int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedEnumerable<RetrievePartnerMatchReportResponse, PartnerMatchReportEntry> | A pageable sequence of PartnerMatchReportEntry resources. |
Sample code
// Create client
ReportingServiceClient reportingServiceClient = ReportingServiceClient.Create();
// Initialize request argument(s)
string parent = "";
// Make the request
PagedEnumerable<RetrievePartnerMatchReportResponse, PartnerMatchReportEntry> response = reportingServiceClient.RetrievePartnerMatchReport(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (PartnerMatchReportEntry item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (RetrievePartnerMatchReportResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (PartnerMatchReportEntry item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<PartnerMatchReportEntry> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (PartnerMatchReportEntry item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
RetrievePartnerMatchReportAsync(RetrievePartnerMatchReportRequest, CallSettings)
Retrieves a partner match report.
This feature is only available to data partners.
Declaration
public virtual PagedAsyncEnumerable<RetrievePartnerMatchReportResponse, PartnerMatchReportEntry> RetrievePartnerMatchReportAsync(RetrievePartnerMatchReportRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| RetrievePartnerMatchReportRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedAsyncEnumerable<RetrievePartnerMatchReportResponse, PartnerMatchReportEntry> | A pageable asynchronous sequence of PartnerMatchReportEntry resources. |
Sample code
// Create client
ReportingServiceClient reportingServiceClient = await ReportingServiceClient.CreateAsync();
// Initialize request argument(s)
RetrievePartnerMatchReportRequest request = new RetrievePartnerMatchReportRequest
{
Parent = "",
CurrencyCode = "",
Filter = "",
StartDate = 0L,
EndDate = 0L,
};
// Make the request
PagedAsyncEnumerable<RetrievePartnerMatchReportResponse, PartnerMatchReportEntry> response = reportingServiceClient.RetrievePartnerMatchReportAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await foreach (PartnerMatchReportEntry item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (RetrievePartnerMatchReportResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (PartnerMatchReportEntry item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<PartnerMatchReportEntry> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (PartnerMatchReportEntry item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
RetrievePartnerMatchReportAsync(string, string, int?, CallSettings)
Retrieves a partner match report.
This feature is only available to data partners.
Declaration
public virtual PagedAsyncEnumerable<RetrievePartnerMatchReportResponse, PartnerMatchReportEntry> RetrievePartnerMatchReportAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent account that owns the user list.
Format: |
| string | pageToken | The token returned from the previous request. A value of |
| int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedAsyncEnumerable<RetrievePartnerMatchReportResponse, PartnerMatchReportEntry> | A pageable asynchronous sequence of PartnerMatchReportEntry resources. |
Sample code
// Create client
ReportingServiceClient reportingServiceClient = await ReportingServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "";
// Make the request
PagedAsyncEnumerable<RetrievePartnerMatchReportResponse, PartnerMatchReportEntry> response = reportingServiceClient.RetrievePartnerMatchReportAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await foreach (PartnerMatchReportEntry item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (RetrievePartnerMatchReportResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (PartnerMatchReportEntry item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<PartnerMatchReportEntry> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (PartnerMatchReportEntry item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Declaration
public static Task ShutdownDefaultChannelsAsync()
Returns
| Type | Description |
|---|---|
| Task | A task representing the asynchronous shutdown operation. |
Remarks
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.