public abstract class CloudChannelReportsServiceClient
Reference documentation and code samples for the Cloud Channel v1 API class CloudChannelReportsServiceClient.
CloudChannelReportsService client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Channel.V1Assembly
Google.Cloud.Channel.V1.dll
Remarks
CloudChannelReportsService lets Google Cloud resellers and distributors retrieve and combine a variety of data in Cloud Channel for multiple products (Google Cloud Platform (GCP), Google Voice, and Google Workspace.)
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the CloudChannelReportsService service, which is a host of "cloudchannel.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
String |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default CloudChannelReportsService scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyList<String> |
The default CloudChannelReportsService scopes are:
GrpcClient
public virtual CloudChannelReportsService.CloudChannelReportsServiceClient GrpcClient { get; }
The underlying gRPC CloudChannelReportsService client
Property Value | |
---|---|
Type | Description |
CloudChannelReportsService.CloudChannelReportsServiceClient |
RunReportJobOperationsClient
public virtual OperationsClient RunReportJobOperationsClient { get; }
The long-running operations client for RunReportJob
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
Methods
Create()
public static CloudChannelReportsServiceClient Create()
Synchronously creates a CloudChannelReportsServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use CloudChannelReportsServiceClientBuilder.
Returns | |
---|---|
Type | Description |
CloudChannelReportsServiceClient | The created CloudChannelReportsServiceClient. |
CreateAsync(CancellationToken)
public static Task<CloudChannelReportsServiceClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a CloudChannelReportsServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use CloudChannelReportsServiceClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
Task<CloudChannelReportsServiceClient> | The task representing the created CloudChannelReportsServiceClient. |
FetchReportResults(FetchReportResultsRequest, CallSettings)
public virtual PagedEnumerable<FetchReportResultsResponse, Row> FetchReportResults(FetchReportResultsRequest request, CallSettings callSettings = null)
Retrieves data generated by [CloudChannelReportsService.RunReportJob][google.cloud.channel.v1.CloudChannelReportsService.RunReportJob].
Parameters | |
---|---|
Name | Description |
request | FetchReportResultsRequest 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<FetchReportResultsResponse, Row> | A pageable sequence of Row resources. |
// Create client
CloudChannelReportsServiceClient cloudChannelReportsServiceClient = CloudChannelReportsServiceClient.Create();
// Initialize request argument(s)
FetchReportResultsRequest request = new FetchReportResultsRequest
{
ReportJobAsReportJobName = ReportJobName.FromAccountReportJob("[ACCOUNT]", "[REPORT_JOB]"),
};
// Make the request
PagedEnumerable<FetchReportResultsResponse, Row> response = cloudChannelReportsServiceClient.FetchReportResults(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Row 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 (FetchReportResultsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Row 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<Row> 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 (Row 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;
FetchReportResults(ReportJobName, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<FetchReportResultsResponse, Row> FetchReportResults(ReportJobName reportJob, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Retrieves data generated by [CloudChannelReportsService.RunReportJob][google.cloud.channel.v1.CloudChannelReportsService.RunReportJob].
Parameters | |
---|---|
Name | Description |
reportJob | ReportJobName 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} |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> 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<FetchReportResultsResponse, Row> | A pageable sequence of Row resources. |
// Create client
CloudChannelReportsServiceClient cloudChannelReportsServiceClient = CloudChannelReportsServiceClient.Create();
// Initialize request argument(s)
ReportJobName reportJob = ReportJobName.FromAccountReportJob("[ACCOUNT]", "[REPORT_JOB]");
// Make the request
PagedEnumerable<FetchReportResultsResponse, Row> response = cloudChannelReportsServiceClient.FetchReportResults(reportJob);
// Iterate over all response items, lazily performing RPCs as required
foreach (Row 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 (FetchReportResultsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Row 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<Row> 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 (Row 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;
FetchReportResults(String, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<FetchReportResultsResponse, Row> FetchReportResults(string reportJob, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Retrieves data generated by [CloudChannelReportsService.RunReportJob][google.cloud.channel.v1.CloudChannelReportsService.RunReportJob].
Parameters | |
---|---|
Name | Description |
reportJob | String 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} |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> 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<FetchReportResultsResponse, Row> | A pageable sequence of Row resources. |
// Create client
CloudChannelReportsServiceClient cloudChannelReportsServiceClient = CloudChannelReportsServiceClient.Create();
// Initialize request argument(s)
string reportJob = "accounts/[ACCOUNT]/reportJobs/[REPORT_JOB]";
// Make the request
PagedEnumerable<FetchReportResultsResponse, Row> response = cloudChannelReportsServiceClient.FetchReportResults(reportJob);
// Iterate over all response items, lazily performing RPCs as required
foreach (Row 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 (FetchReportResultsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Row 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<Row> 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 (Row 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;
FetchReportResultsAsync(FetchReportResultsRequest, CallSettings)
public virtual PagedAsyncEnumerable<FetchReportResultsResponse, Row> FetchReportResultsAsync(FetchReportResultsRequest request, CallSettings callSettings = null)
Retrieves data generated by [CloudChannelReportsService.RunReportJob][google.cloud.channel.v1.CloudChannelReportsService.RunReportJob].
Parameters | |
---|---|
Name | Description |
request | FetchReportResultsRequest 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<FetchReportResultsResponse, Row> | A pageable asynchronous sequence of Row resources. |
// Create client
CloudChannelReportsServiceClient cloudChannelReportsServiceClient = await CloudChannelReportsServiceClient.CreateAsync();
// Initialize request argument(s)
FetchReportResultsRequest request = new FetchReportResultsRequest
{
ReportJobAsReportJobName = ReportJobName.FromAccountReportJob("[ACCOUNT]", "[REPORT_JOB]"),
};
// Make the request
PagedAsyncEnumerable<FetchReportResultsResponse, Row> response = cloudChannelReportsServiceClient.FetchReportResultsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Row item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((FetchReportResultsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Row 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<Row> 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 (Row 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;
FetchReportResultsAsync(ReportJobName, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<FetchReportResultsResponse, Row> FetchReportResultsAsync(ReportJobName reportJob, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Retrieves data generated by [CloudChannelReportsService.RunReportJob][google.cloud.channel.v1.CloudChannelReportsService.RunReportJob].
Parameters | |
---|---|
Name | Description |
reportJob | ReportJobName 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} |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> 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<FetchReportResultsResponse, Row> | A pageable asynchronous sequence of Row resources. |
// Create client
CloudChannelReportsServiceClient cloudChannelReportsServiceClient = await CloudChannelReportsServiceClient.CreateAsync();
// Initialize request argument(s)
ReportJobName reportJob = ReportJobName.FromAccountReportJob("[ACCOUNT]", "[REPORT_JOB]");
// Make the request
PagedAsyncEnumerable<FetchReportResultsResponse, Row> response = cloudChannelReportsServiceClient.FetchReportResultsAsync(reportJob);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Row item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((FetchReportResultsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Row 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<Row> 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 (Row 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;
FetchReportResultsAsync(String, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<FetchReportResultsResponse, Row> FetchReportResultsAsync(string reportJob, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Retrieves data generated by [CloudChannelReportsService.RunReportJob][google.cloud.channel.v1.CloudChannelReportsService.RunReportJob].
Parameters | |
---|---|
Name | Description |
reportJob | String 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} |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> 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<FetchReportResultsResponse, Row> | A pageable asynchronous sequence of Row resources. |
// Create client
CloudChannelReportsServiceClient cloudChannelReportsServiceClient = await CloudChannelReportsServiceClient.CreateAsync();
// Initialize request argument(s)
string reportJob = "accounts/[ACCOUNT]/reportJobs/[REPORT_JOB]";
// Make the request
PagedAsyncEnumerable<FetchReportResultsResponse, Row> response = cloudChannelReportsServiceClient.FetchReportResultsAsync(reportJob);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Row item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((FetchReportResultsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Row 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<Row> 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 (Row 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;
ListReports(ListReportsRequest, CallSettings)
public virtual PagedEnumerable<ListReportsResponse, Report> ListReports(ListReportsRequest request, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
request | ListReportsRequest 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<ListReportsResponse, Report> | A pageable sequence of Report resources. |
// Create client
CloudChannelReportsServiceClient cloudChannelReportsServiceClient = CloudChannelReportsServiceClient.Create();
// Initialize request argument(s)
ListReportsRequest request = new ListReportsRequest
{
Parent = "",
LanguageCode = "",
};
// Make the request
PagedEnumerable<ListReportsResponse, Report> response = cloudChannelReportsServiceClient.ListReports(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Report 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 (ListReportsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Report 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<Report> 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 (Report 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;
ListReports(String, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListReportsResponse, Report> ListReports(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
parent | String Required. The resource name of the partner account to list available reports for. Parent uses the format: accounts/{account_id} |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> 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<ListReportsResponse, Report> | A pageable sequence of Report resources. |
// Create client
CloudChannelReportsServiceClient cloudChannelReportsServiceClient = CloudChannelReportsServiceClient.Create();
// Initialize request argument(s)
string parent = "";
// Make the request
PagedEnumerable<ListReportsResponse, Report> response = cloudChannelReportsServiceClient.ListReports(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Report 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 (ListReportsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Report 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<Report> 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 (Report 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;
ListReportsAsync(ListReportsRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListReportsResponse, Report> ListReportsAsync(ListReportsRequest request, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
request | ListReportsRequest 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<ListReportsResponse, Report> | A pageable asynchronous sequence of Report resources. |
// Create client
CloudChannelReportsServiceClient cloudChannelReportsServiceClient = await CloudChannelReportsServiceClient.CreateAsync();
// Initialize request argument(s)
ListReportsRequest request = new ListReportsRequest
{
Parent = "",
LanguageCode = "",
};
// Make the request
PagedAsyncEnumerable<ListReportsResponse, Report> response = cloudChannelReportsServiceClient.ListReportsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Report item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListReportsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Report 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<Report> 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 (Report 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;
ListReportsAsync(String, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListReportsResponse, Report> ListReportsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
parent | String Required. The resource name of the partner account to list available reports for. Parent uses the format: accounts/{account_id} |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> 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<ListReportsResponse, Report> | A pageable asynchronous sequence of Report resources. |
// Create client
CloudChannelReportsServiceClient cloudChannelReportsServiceClient = await CloudChannelReportsServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "";
// Make the request
PagedAsyncEnumerable<ListReportsResponse, Report> response = cloudChannelReportsServiceClient.ListReportsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Report item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListReportsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Report 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<Report> 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 (Report 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;
PollOnceRunReportJob(String, CallSettings)
public virtual Operation<RunReportJobResponse, OperationMetadata> PollOnceRunReportJob(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of RunReportJob
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<RunReportJobResponse, OperationMetadata> | The result of polling the operation. |
PollOnceRunReportJobAsync(String, CallSettings)
public virtual Task<Operation<RunReportJobResponse, OperationMetadata>> PollOnceRunReportJobAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
RunReportJob
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<RunReportJobResponse, OperationMetadata>> | A task representing the result of polling the operation. |
RunReportJob(RunReportJobRequest, CallSettings)
public virtual Operation<RunReportJobResponse, OperationMetadata> RunReportJob(RunReportJobRequest request, CallSettings callSettings = null)
Begins generation of data for a given report. The report
identifier is a UID (for example, 613bf59q
).
Possible error codes:
- PERMISSION_DENIED: The user doesn't have access to this report.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: The report identifier was not found.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
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].
Parameters | |
---|---|
Name | Description |
request | RunReportJobRequest 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 |
Operation<RunReportJobResponse, OperationMetadata> | The RPC response. |
// Create client
CloudChannelReportsServiceClient cloudChannelReportsServiceClient = CloudChannelReportsServiceClient.Create();
// Initialize request argument(s)
RunReportJobRequest request = new RunReportJobRequest
{
ReportName = ReportName.FromAccountReport("[ACCOUNT]", "[REPORT]"),
DateRange = new DateRange(),
Filter = "",
LanguageCode = "",
};
// Make the request
Operation<RunReportJobResponse, OperationMetadata> response = cloudChannelReportsServiceClient.RunReportJob(request);
// Poll until the returned long-running operation is complete
Operation<RunReportJobResponse, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
RunReportJobResponse result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<RunReportJobResponse, OperationMetadata> retrievedResponse = cloudChannelReportsServiceClient.PollOnceRunReportJob(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
RunReportJobResponse retrievedResult = retrievedResponse.Result;
}
RunReportJobAsync(RunReportJobRequest, CallSettings)
public virtual Task<Operation<RunReportJobResponse, OperationMetadata>> RunReportJobAsync(RunReportJobRequest request, CallSettings callSettings = null)
Begins generation of data for a given report. The report
identifier is a UID (for example, 613bf59q
).
Possible error codes:
- PERMISSION_DENIED: The user doesn't have access to this report.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: The report identifier was not found.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
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].
Parameters | |
---|---|
Name | Description |
request | RunReportJobRequest 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 |
Task<Operation<RunReportJobResponse, OperationMetadata>> | A Task containing the RPC response. |
// Create client
CloudChannelReportsServiceClient cloudChannelReportsServiceClient = await CloudChannelReportsServiceClient.CreateAsync();
// Initialize request argument(s)
RunReportJobRequest request = new RunReportJobRequest
{
ReportName = ReportName.FromAccountReport("[ACCOUNT]", "[REPORT]"),
DateRange = new DateRange(),
Filter = "",
LanguageCode = "",
};
// Make the request
Operation<RunReportJobResponse, OperationMetadata> response = await cloudChannelReportsServiceClient.RunReportJobAsync(request);
// Poll until the returned long-running operation is complete
Operation<RunReportJobResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
RunReportJobResponse result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<RunReportJobResponse, OperationMetadata> retrievedResponse = await cloudChannelReportsServiceClient.PollOnceRunReportJobAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
RunReportJobResponse retrievedResult = retrievedResponse.Result;
}
RunReportJobAsync(RunReportJobRequest, CancellationToken)
public virtual Task<Operation<RunReportJobResponse, OperationMetadata>> RunReportJobAsync(RunReportJobRequest request, CancellationToken cancellationToken)
Begins generation of data for a given report. The report
identifier is a UID (for example, 613bf59q
).
Possible error codes:
- PERMISSION_DENIED: The user doesn't have access to this report.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: The report identifier was not found.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
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].
Parameters | |
---|---|
Name | Description |
request | RunReportJobRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<RunReportJobResponse, OperationMetadata>> | A Task containing the RPC response. |
// Create client
CloudChannelReportsServiceClient cloudChannelReportsServiceClient = await CloudChannelReportsServiceClient.CreateAsync();
// Initialize request argument(s)
RunReportJobRequest request = new RunReportJobRequest
{
ReportName = ReportName.FromAccountReport("[ACCOUNT]", "[REPORT]"),
DateRange = new DateRange(),
Filter = "",
LanguageCode = "",
};
// Make the request
Operation<RunReportJobResponse, OperationMetadata> response = await cloudChannelReportsServiceClient.RunReportJobAsync(request);
// Poll until the returned long-running operation is complete
Operation<RunReportJobResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
RunReportJobResponse result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<RunReportJobResponse, OperationMetadata> retrievedResponse = await cloudChannelReportsServiceClient.PollOnceRunReportJobAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
RunReportJobResponse retrievedResult = retrievedResponse.Result;
}
ShutdownDefaultChannelsAsync()
public static Task ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Returns | |
---|---|
Type | Description |
Task | A task representing the asynchronous shutdown operation. |
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.