Cloud Channel v1 API - Class CloudChannelReportsServiceClient (2.1.0)

public abstract class CloudChannelReportsServiceClient

Reference documentation and code samples for the Cloud Channel v1 API class CloudChannelReportsServiceClient.

CloudChannelReportsService client wrapper, for convenient use.

Inheritance

Object > CloudChannelReportsServiceClient

Namespace

Google.Cloud.Channel.V1

Assembly

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
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default CloudChannelReportsService scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

The default CloudChannelReportsService scopes are:

GrpcClient

public virtual CloudChannelReportsService.CloudChannelReportsServiceClient GrpcClient { get; }

The underlying gRPC CloudChannelReportsService client

Property Value
TypeDescription
CloudChannelReportsService.CloudChannelReportsServiceClient

RunReportJobOperationsClient

public virtual OperationsClient RunReportJobOperationsClient { get; }

The long-running operations client for RunReportJob.

Property Value
TypeDescription
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
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
TypeDescription
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
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
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
NameDescription
requestFetchReportResultsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<FetchReportResultsResponse, Row>

A pageable sequence of Row resources.

Example
// 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
NameDescription
reportJobReportJobName

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}

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<FetchReportResultsResponse, Row>

A pageable sequence of Row resources.

Example
// 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
NameDescription
reportJobString

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}

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<FetchReportResultsResponse, Row>

A pageable sequence of Row resources.

Example
// 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
NameDescription
requestFetchReportResultsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<FetchReportResultsResponse, Row>

A pageable asynchronous sequence of Row resources.

Example
// 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
NameDescription
reportJobReportJobName

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}

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<FetchReportResultsResponse, Row>

A pageable asynchronous sequence of Row resources.

Example
// 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
NameDescription
reportJobString

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}

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<FetchReportResultsResponse, Row>

A pageable asynchronous sequence of Row resources.

Example
// 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
NameDescription
requestListReportsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListReportsResponse, Report>

A pageable sequence of Report resources.

Example
// 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
NameDescription
parentString

Required. The resource name of the partner account to list available reports for. Parent uses the format: accounts/{account_id}

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListReportsResponse, Report>

A pageable sequence of Report resources.

Example
// 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
NameDescription
requestListReportsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListReportsResponse, Report>

A pageable asynchronous sequence of Report resources.

Example
// 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
NameDescription
parentString

Required. The resource name of the partner account to list available reports for. Parent uses the format: accounts/{account_id}

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListReportsResponse, Report>

A pageable asynchronous sequence of Report resources.

Example
// 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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestRunReportJobRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<RunReportJobResponse, OperationMetadata>

The RPC response.

Example
// 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
NameDescription
requestRunReportJobRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<RunReportJobResponse, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestRunReportJobRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<RunReportJobResponse, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
TypeDescription
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.