# Capacity Planner v1beta API - Class UsageServiceClient (1.0.0-beta02)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [1.0.0-beta02 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.UsageServiceClient)
- [1.0.0-beta01](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/1.0.0-beta01/Google.Cloud.CapacityPlanner.V1Beta.UsageServiceClient)

    public abstract class UsageServiceClient

Reference documentation and code samples for the Capacity Planner v1beta API class UsageServiceClient.

UsageService client wrapper, for convenient use.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> UsageServiceClient

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Derived Types

[UsageServiceClientImpl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.UsageServiceClientImpl)

## Namespace

[Google.Cloud.CapacityPlanner.V1Beta](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta)

## Assembly

Google.Cloud.CapacityPlanner.V1Beta.dll

## Remarks

Provides access to historical and forecasted usage data.

## Properties

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

The default endpoint for the UsageService service, which is a host of "capacityplanner.googleapis.com" and a
port of 443.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### DefaultScopes

    public static IReadOnlyList<string> DefaultScopes { get; }

The default UsageService scopes.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1https://learn.microsoft.com/dotnet/api/system.string` |   |

**Remarks** The default UsageService scopes are:

- <https://www.googleapis.com/auth/cloud-platform>
- <https://www.googleapis.com/auth/devstorage.full_control>

<br />

### ExportForecastsOperationsClient

    public virtual OperationsClient ExportForecastsOperationsClient { get; }

The long-running operations client for `ExportForecasts`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

### ExportReservationsUsageOperationsClient

    public virtual OperationsClient ExportReservationsUsageOperationsClient { get; }

The long-running operations client for `ExportReservationsUsage`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

### ExportUsageHistoriesOperationsClient

    public virtual OperationsClient ExportUsageHistoriesOperationsClient { get; }

The long-running operations client for `ExportUsageHistories`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

### GrpcClient

    public virtual UsageService.UsageServiceClient GrpcClient { get; }

The underlying gRPC UsageService client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.UsageServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.UsageService.UsageServiceClient` |   |

### ServiceMetadata

    public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ServiceMetadata.html` |   |

## Methods

### Create()

    public static UsageServiceClient Create()

Synchronously creates a [UsageServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.UsageServiceClient) using the default credentials, endpoint and
settings. To specify custom credentials or other settings, use [UsageServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.UsageServiceClientBuilder).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.UsageServiceClient` | The created [UsageServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.UsageServiceClient). |

### CreateAsync(CancellationToken)

    public static Task<UsageServiceClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a [UsageServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.UsageServiceClient) using the default credentials, endpoint and
settings. To specify custom credentials or other settings, use [UsageServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.UsageServiceClientBuilder).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` The [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use while creating the client. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.UsageServiceClient` | The task representing the created [UsageServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.UsageServiceClient). |

### ExportForecasts(ExportForecastsRequest, CallSettings)

    public virtual Operation<ExportForecastsResponse, OperationMetadata> ExportForecasts(ExportForecastsRequest request, CallSettings callSettings = null)

Exports forecasted usage data requested by user into either an existing
Cloud Storage bucket or a BigQuery table.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.ExportForecastsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.ExportForecastsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.OperationMetadata` | The RPC response. |

**Example**

    // Create client
    UsageServiceClient usageServiceClient = UsageServiceClient.Create();
    // Initialize request argument(s)
    ExportForecastsRequest request = new ExportForecastsRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        MachineFamily = "",
        DiskType = "",
        ResourceType = "",
        PredictionInterval = Forecast.Types.PredictionInterval.Unspecified,
        AggregationMethod = UsageHistory.Types.AggregationMethod.Unspecified,
        StartDate = new Date(),
        EndDate = new Date(),
        OutputConfig = new OutputConfig(),
        GpuType = "",
        TpuType = "",
        MachineShape = new MachineShape(),
    };
    // Make the request
    Operation<ExportForecastsResponse, OperationMetadata> response = usageServiceClient.ExportForecasts(request);

    // Poll until the returned long-running operation is complete
    Operation<ExportForecastsResponse, OperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    ExportForecastsResponse 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<ExportForecastsResponse, OperationMetadata> retrievedResponse = usageServiceClient.PollOnceExportForecasts(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        ExportForecastsResponse retrievedResult = retrievedResponse.Result;
    }

### ExportForecastsAsync(ExportForecastsRequest, CallSettings)

    public virtual Task<Operation<ExportForecastsResponse, OperationMetadata>> ExportForecastsAsync(ExportForecastsRequest request, CallSettings callSettings = null)

Exports forecasted usage data requested by user into either an existing
Cloud Storage bucket or a BigQuery table.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.ExportForecastsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.ExportForecastsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    UsageServiceClient usageServiceClient = await UsageServiceClient.CreateAsync();
    // Initialize request argument(s)
    ExportForecastsRequest request = new ExportForecastsRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        MachineFamily = "",
        DiskType = "",
        ResourceType = "",
        PredictionInterval = Forecast.Types.PredictionInterval.Unspecified,
        AggregationMethod = UsageHistory.Types.AggregationMethod.Unspecified,
        StartDate = new Date(),
        EndDate = new Date(),
        OutputConfig = new OutputConfig(),
        GpuType = "",
        TpuType = "",
        MachineShape = new MachineShape(),
    };
    // Make the request
    Operation<ExportForecastsResponse, OperationMetadata> response = await usageServiceClient.ExportForecastsAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<ExportForecastsResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    ExportForecastsResponse 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<ExportForecastsResponse, OperationMetadata> retrievedResponse = await usageServiceClient.PollOnceExportForecastsAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        ExportForecastsResponse retrievedResult = retrievedResponse.Result;
    }

### ExportForecastsAsync(ExportForecastsRequest, CancellationToken)

    public virtual Task<Operation<ExportForecastsResponse, OperationMetadata>> ExportForecastsAsync(ExportForecastsRequest request, CancellationToken cancellationToken)

Exports forecasted usage data requested by user into either an existing
Cloud Storage bucket or a BigQuery table.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.ExportForecastsRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.ExportForecastsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    UsageServiceClient usageServiceClient = await UsageServiceClient.CreateAsync();
    // Initialize request argument(s)
    ExportForecastsRequest request = new ExportForecastsRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        MachineFamily = "",
        DiskType = "",
        ResourceType = "",
        PredictionInterval = Forecast.Types.PredictionInterval.Unspecified,
        AggregationMethod = UsageHistory.Types.AggregationMethod.Unspecified,
        StartDate = new Date(),
        EndDate = new Date(),
        OutputConfig = new OutputConfig(),
        GpuType = "",
        TpuType = "",
        MachineShape = new MachineShape(),
    };
    // Make the request
    Operation<ExportForecastsResponse, OperationMetadata> response = await usageServiceClient.ExportForecastsAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<ExportForecastsResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    ExportForecastsResponse 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<ExportForecastsResponse, OperationMetadata> retrievedResponse = await usageServiceClient.PollOnceExportForecastsAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        ExportForecastsResponse retrievedResult = retrievedResponse.Result;
    }

### ExportReservationsUsage(ExportReservationsUsageRequest, CallSettings)

    public virtual Operation<ExportReservationsUsageResponse, OperationMetadata> ExportReservationsUsage(ExportReservationsUsageRequest request, CallSettings callSettings = null)

Exports reservations usage data requested by user into either an existing
Cloud Storage bucket or a new/existing BigQuery table.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.ExportReservationsUsageRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.ExportReservationsUsageResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.OperationMetadata` | The RPC response. |

**Example**

    // Create client
    UsageServiceClient usageServiceClient = UsageServiceClient.Create();
    // Initialize request argument(s)
    ExportReservationsUsageRequest request = new ExportReservationsUsageRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        MachineFamily = "",
        CloudResourceType = "",
        UsageAggregationMethod = UsageHistory.Types.AggregationMethod.Unspecified,
        ShareType = ExportReservationsUsageRequest.Types.ShareType.Unspecified,
        StartDate = new Date(),
        EndDate = new Date(),
        OutputConfig = new OutputConfig(),
        LocationLevel = TimeSeries.Types.LocationType.Unspecified,
    };
    // Make the request
    Operation<ExportReservationsUsageResponse, OperationMetadata> response = usageServiceClient.ExportReservationsUsage(request);

    // Poll until the returned long-running operation is complete
    Operation<ExportReservationsUsageResponse, OperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    ExportReservationsUsageResponse 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<ExportReservationsUsageResponse, OperationMetadata> retrievedResponse = usageServiceClient.PollOnceExportReservationsUsage(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        ExportReservationsUsageResponse retrievedResult = retrievedResponse.Result;
    }

### ExportReservationsUsageAsync(ExportReservationsUsageRequest, CallSettings)

    public virtual Task<Operation<ExportReservationsUsageResponse, OperationMetadata>> ExportReservationsUsageAsync(ExportReservationsUsageRequest request, CallSettings callSettings = null)

Exports reservations usage data requested by user into either an existing
Cloud Storage bucket or a new/existing BigQuery table.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.ExportReservationsUsageRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.ExportReservationsUsageResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    UsageServiceClient usageServiceClient = await UsageServiceClient.CreateAsync();
    // Initialize request argument(s)
    ExportReservationsUsageRequest request = new ExportReservationsUsageRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        MachineFamily = "",
        CloudResourceType = "",
        UsageAggregationMethod = UsageHistory.Types.AggregationMethod.Unspecified,
        ShareType = ExportReservationsUsageRequest.Types.ShareType.Unspecified,
        StartDate = new Date(),
        EndDate = new Date(),
        OutputConfig = new OutputConfig(),
        LocationLevel = TimeSeries.Types.LocationType.Unspecified,
    };
    // Make the request
    Operation<ExportReservationsUsageResponse, OperationMetadata> response = await usageServiceClient.ExportReservationsUsageAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<ExportReservationsUsageResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    ExportReservationsUsageResponse 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<ExportReservationsUsageResponse, OperationMetadata> retrievedResponse = await usageServiceClient.PollOnceExportReservationsUsageAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        ExportReservationsUsageResponse retrievedResult = retrievedResponse.Result;
    }

### ExportReservationsUsageAsync(ExportReservationsUsageRequest, CancellationToken)

    public virtual Task<Operation<ExportReservationsUsageResponse, OperationMetadata>> ExportReservationsUsageAsync(ExportReservationsUsageRequest request, CancellationToken cancellationToken)

Exports reservations usage data requested by user into either an existing
Cloud Storage bucket or a new/existing BigQuery table.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.ExportReservationsUsageRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.ExportReservationsUsageResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    UsageServiceClient usageServiceClient = await UsageServiceClient.CreateAsync();
    // Initialize request argument(s)
    ExportReservationsUsageRequest request = new ExportReservationsUsageRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        MachineFamily = "",
        CloudResourceType = "",
        UsageAggregationMethod = UsageHistory.Types.AggregationMethod.Unspecified,
        ShareType = ExportReservationsUsageRequest.Types.ShareType.Unspecified,
        StartDate = new Date(),
        EndDate = new Date(),
        OutputConfig = new OutputConfig(),
        LocationLevel = TimeSeries.Types.LocationType.Unspecified,
    };
    // Make the request
    Operation<ExportReservationsUsageResponse, OperationMetadata> response = await usageServiceClient.ExportReservationsUsageAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<ExportReservationsUsageResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    ExportReservationsUsageResponse 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<ExportReservationsUsageResponse, OperationMetadata> retrievedResponse = await usageServiceClient.PollOnceExportReservationsUsageAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        ExportReservationsUsageResponse retrievedResult = retrievedResponse.Result;
    }

### ExportUsageHistories(ExportUsageHistoriesRequest, CallSettings)

    public virtual Operation<ExportUsageHistoriesResponse, OperationMetadata> ExportUsageHistories(ExportUsageHistoriesRequest request, CallSettings callSettings = null)

Exports historical usage data requested by user into either an existing
Cloud Storage bucket or a BigQuery table.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.ExportUsageHistoriesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.ExportUsageHistoriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.OperationMetadata` | The RPC response. |

**Example**

    // Create client
    UsageServiceClient usageServiceClient = UsageServiceClient.Create();
    // Initialize request argument(s)
    ExportUsageHistoriesRequest request = new ExportUsageHistoriesRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        MachineFamily = "",
        DiskType = "",
        ResourceType = "",
        UsageAggregationMethod = UsageHistory.Types.AggregationMethod.Unspecified,
        StartDate = new Date(),
        EndDate = new Date(),
        OutputConfig = new OutputConfig(),
        GpuType = "",
        TpuType = "",
        IsSpot = false,
        MachineShape = new MachineShape(),
    };
    // Make the request
    Operation<ExportUsageHistoriesResponse, OperationMetadata> response = usageServiceClient.ExportUsageHistories(request);

    // Poll until the returned long-running operation is complete
    Operation<ExportUsageHistoriesResponse, OperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    ExportUsageHistoriesResponse 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<ExportUsageHistoriesResponse, OperationMetadata> retrievedResponse = usageServiceClient.PollOnceExportUsageHistories(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        ExportUsageHistoriesResponse retrievedResult = retrievedResponse.Result;
    }

### ExportUsageHistoriesAsync(ExportUsageHistoriesRequest, CallSettings)

    public virtual Task<Operation<ExportUsageHistoriesResponse, OperationMetadata>> ExportUsageHistoriesAsync(ExportUsageHistoriesRequest request, CallSettings callSettings = null)

Exports historical usage data requested by user into either an existing
Cloud Storage bucket or a BigQuery table.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.ExportUsageHistoriesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.ExportUsageHistoriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    UsageServiceClient usageServiceClient = await UsageServiceClient.CreateAsync();
    // Initialize request argument(s)
    ExportUsageHistoriesRequest request = new ExportUsageHistoriesRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        MachineFamily = "",
        DiskType = "",
        ResourceType = "",
        UsageAggregationMethod = UsageHistory.Types.AggregationMethod.Unspecified,
        StartDate = new Date(),
        EndDate = new Date(),
        OutputConfig = new OutputConfig(),
        GpuType = "",
        TpuType = "",
        IsSpot = false,
        MachineShape = new MachineShape(),
    };
    // Make the request
    Operation<ExportUsageHistoriesResponse, OperationMetadata> response = await usageServiceClient.ExportUsageHistoriesAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<ExportUsageHistoriesResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    ExportUsageHistoriesResponse 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<ExportUsageHistoriesResponse, OperationMetadata> retrievedResponse = await usageServiceClient.PollOnceExportUsageHistoriesAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        ExportUsageHistoriesResponse retrievedResult = retrievedResponse.Result;
    }

### ExportUsageHistoriesAsync(ExportUsageHistoriesRequest, CancellationToken)

    public virtual Task<Operation<ExportUsageHistoriesResponse, OperationMetadata>> ExportUsageHistoriesAsync(ExportUsageHistoriesRequest request, CancellationToken cancellationToken)

Exports historical usage data requested by user into either an existing
Cloud Storage bucket or a BigQuery table.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.ExportUsageHistoriesRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.ExportUsageHistoriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    UsageServiceClient usageServiceClient = await UsageServiceClient.CreateAsync();
    // Initialize request argument(s)
    ExportUsageHistoriesRequest request = new ExportUsageHistoriesRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        MachineFamily = "",
        DiskType = "",
        ResourceType = "",
        UsageAggregationMethod = UsageHistory.Types.AggregationMethod.Unspecified,
        StartDate = new Date(),
        EndDate = new Date(),
        OutputConfig = new OutputConfig(),
        GpuType = "",
        TpuType = "",
        IsSpot = false,
        MachineShape = new MachineShape(),
    };
    // Make the request
    Operation<ExportUsageHistoriesResponse, OperationMetadata> response = await usageServiceClient.ExportUsageHistoriesAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<ExportUsageHistoriesResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    ExportUsageHistoriesResponse 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<ExportUsageHistoriesResponse, OperationMetadata> retrievedResponse = await usageServiceClient.PollOnceExportUsageHistoriesAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        ExportUsageHistoriesResponse retrievedResult = retrievedResponse.Result;
    }

### PollOnceExportForecasts(string, CallSettings)

    public virtual Operation<ExportForecastsResponse, OperationMetadata> PollOnceExportForecasts(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `ExportForecasts`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.ExportForecastsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.OperationMetadata` | The result of polling the operation. |

### PollOnceExportForecastsAsync(string, CallSettings)

    public virtual Task<Operation<ExportForecastsResponse, OperationMetadata>> PollOnceExportForecastsAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`ExportForecasts`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.ExportForecastsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.OperationMetadata` | A task representing the result of polling the operation. |

### PollOnceExportReservationsUsage(string, CallSettings)

    public virtual Operation<ExportReservationsUsageResponse, OperationMetadata> PollOnceExportReservationsUsage(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of
`ExportReservationsUsage`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.ExportReservationsUsageResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.OperationMetadata` | The result of polling the operation. |

### PollOnceExportReservationsUsageAsync(string, CallSettings)

    public virtual Task<Operation<ExportReservationsUsageResponse, OperationMetadata>> PollOnceExportReservationsUsageAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`ExportReservationsUsage`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.ExportReservationsUsageResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.OperationMetadata` | A task representing the result of polling the operation. |

### PollOnceExportUsageHistories(string, CallSettings)

    public virtual Operation<ExportUsageHistoriesResponse, OperationMetadata> PollOnceExportUsageHistories(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `ExportUsageHistories`
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.ExportUsageHistoriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.OperationMetadata` | The result of polling the operation. |

### PollOnceExportUsageHistoriesAsync(string, CallSettings)

    public virtual Task<Operation<ExportUsageHistoriesResponse, OperationMetadata>> PollOnceExportUsageHistoriesAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`ExportUsageHistories`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.ExportUsageHistoriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.OperationMetadata` | A task representing the result of polling the operation. |

### QueryForecasts(QueryForecastsRequest, CallSettings)

    public virtual QueryForecastsResponse QueryForecasts(QueryForecastsRequest request, CallSettings callSettings = null)

Returns a list of the forecasts that are in the parent parameter
and match your specified filters.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryForecastsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryForecastsResponse` | The RPC response. |

**Example**

    // Create client
    UsageServiceClient usageServiceClient = UsageServiceClient.Create();
    // Initialize request argument(s)
    QueryForecastsRequest request = new QueryForecastsRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        MachineFamily = "",
        CloudResourceType = "",
        ForecastType = Forecast.Types.ForecastType.Unspecified,
        PredictionInterval = Forecast.Types.PredictionInterval.Unspecified,
        AggregationMethod = UsageHistory.Types.AggregationMethod.Unspecified,
        DiskType = "",
        GpuType = "",
        TpuType = "",
        MachineShape = new MachineShape(),
        ConfidentialMode = false,
    };
    // Make the request
    QueryForecastsResponse response = usageServiceClient.QueryForecasts(request);

### QueryForecastsAsync(QueryForecastsRequest, CallSettings)

    public virtual Task<QueryForecastsResponse> QueryForecastsAsync(QueryForecastsRequest request, CallSettings callSettings = null)

Returns a list of the forecasts that are in the parent parameter
and match your specified filters.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryForecastsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryForecastsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    UsageServiceClient usageServiceClient = await UsageServiceClient.CreateAsync();
    // Initialize request argument(s)
    QueryForecastsRequest request = new QueryForecastsRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        MachineFamily = "",
        CloudResourceType = "",
        ForecastType = Forecast.Types.ForecastType.Unspecified,
        PredictionInterval = Forecast.Types.PredictionInterval.Unspecified,
        AggregationMethod = UsageHistory.Types.AggregationMethod.Unspecified,
        DiskType = "",
        GpuType = "",
        TpuType = "",
        MachineShape = new MachineShape(),
        ConfidentialMode = false,
    };
    // Make the request
    QueryForecastsResponse response = await usageServiceClient.QueryForecastsAsync(request);

### QueryForecastsAsync(QueryForecastsRequest, CancellationToken)

    public virtual Task<QueryForecastsResponse> QueryForecastsAsync(QueryForecastsRequest request, CancellationToken cancellationToken)

Returns a list of the forecasts that are in the parent parameter
and match your specified filters.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryForecastsRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryForecastsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    UsageServiceClient usageServiceClient = await UsageServiceClient.CreateAsync();
    // Initialize request argument(s)
    QueryForecastsRequest request = new QueryForecastsRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        MachineFamily = "",
        CloudResourceType = "",
        ForecastType = Forecast.Types.ForecastType.Unspecified,
        PredictionInterval = Forecast.Types.PredictionInterval.Unspecified,
        AggregationMethod = UsageHistory.Types.AggregationMethod.Unspecified,
        DiskType = "",
        GpuType = "",
        TpuType = "",
        MachineShape = new MachineShape(),
        ConfidentialMode = false,
    };
    // Make the request
    QueryForecastsResponse response = await usageServiceClient.QueryForecastsAsync(request);

### QueryReservations(LocationName, CallSettings)

    public virtual QueryReservationsResponse QueryReservations(LocationName parent, CallSettings callSettings = null)

Returns a list of the reservations that are in the parent parameter
and match your specified filters.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The compute engine resource and location for the time series values to return. The format is: projects/{project}/locations/{location} or organizations/{organization}/locations/{location} or folders/{folder}/locations/{location} |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryReservationsResponse` | The RPC response. |

**Example**

    // Create client
    UsageServiceClient usageServiceClient = UsageServiceClient.Create();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    // Make the request
    QueryReservationsResponse response = usageServiceClient.QueryReservations(parent);

### QueryReservations(QueryReservationsRequest, CallSettings)

    public virtual QueryReservationsResponse QueryReservations(QueryReservationsRequest request, CallSettings callSettings = null)

Returns a list of the reservations that are in the parent parameter
and match your specified filters.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryReservationsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryReservationsResponse` | The RPC response. |

**Example**

    // Create client
    UsageServiceClient usageServiceClient = UsageServiceClient.Create();
    // Initialize request argument(s)
    QueryReservationsRequest request = new QueryReservationsRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        MachineFamily = "",
        GpuType = "",
        CloudResourceType = "",
        ReservationType = QueryReservationsRequest.Types.ReservationType.Unspecified,
        ShareType = QueryReservationsRequest.Types.ShareType.Unspecified,
        OwnershipType = QueryReservationsRequest.Types.OwnershipType.Unspecified,
        ReservationDataLevel = QueryReservationsRequest.Types.ReservationDataLevel.Unspecified,
        MachineShape = new MachineShape(),
        IncludeUnapprovedReservations = false,
        AggregationMethod = UsageHistory.Types.AggregationMethod.Unspecified,
        StartDate = new Date(),
        EndDate = new Date(),
        LocationLevel = TimeSeries.Types.LocationType.Unspecified,
    };
    // Make the request
    QueryReservationsResponse response = usageServiceClient.QueryReservations(request);

### QueryReservations(string, CallSettings)

    public virtual QueryReservationsResponse QueryReservations(string parent, CallSettings callSettings = null)

Returns a list of the reservations that are in the parent parameter
and match your specified filters.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The compute engine resource and location for the time series values to return. The format is: projects/{project}/locations/{location} or organizations/{organization}/locations/{location} or folders/{folder}/locations/{location} |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryReservationsResponse` | The RPC response. |

**Example**

    // Create client
    UsageServiceClient usageServiceClient = UsageServiceClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    // Make the request
    QueryReservationsResponse response = usageServiceClient.QueryReservations(parent);

### QueryReservationsAsync(LocationName, CallSettings)

    public virtual Task<QueryReservationsResponse> QueryReservationsAsync(LocationName parent, CallSettings callSettings = null)

Returns a list of the reservations that are in the parent parameter
and match your specified filters.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The compute engine resource and location for the time series values to return. The format is: projects/{project}/locations/{location} or organizations/{organization}/locations/{location} or folders/{folder}/locations/{location} |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryReservationsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    UsageServiceClient usageServiceClient = await UsageServiceClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    // Make the request
    QueryReservationsResponse response = await usageServiceClient.QueryReservationsAsync(parent);

### QueryReservationsAsync(LocationName, CancellationToken)

    public virtual Task<QueryReservationsResponse> QueryReservationsAsync(LocationName parent, CancellationToken cancellationToken)

Returns a list of the reservations that are in the parent parameter
and match your specified filters.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The compute engine resource and location for the time series values to return. The format is: projects/{project}/locations/{location} or organizations/{organization}/locations/{location} or folders/{folder}/locations/{location} |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryReservationsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    UsageServiceClient usageServiceClient = await UsageServiceClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    // Make the request
    QueryReservationsResponse response = await usageServiceClient.QueryReservationsAsync(parent);

### QueryReservationsAsync(QueryReservationsRequest, CallSettings)

    public virtual Task<QueryReservationsResponse> QueryReservationsAsync(QueryReservationsRequest request, CallSettings callSettings = null)

Returns a list of the reservations that are in the parent parameter
and match your specified filters.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryReservationsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryReservationsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    UsageServiceClient usageServiceClient = await UsageServiceClient.CreateAsync();
    // Initialize request argument(s)
    QueryReservationsRequest request = new QueryReservationsRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        MachineFamily = "",
        GpuType = "",
        CloudResourceType = "",
        ReservationType = QueryReservationsRequest.Types.ReservationType.Unspecified,
        ShareType = QueryReservationsRequest.Types.ShareType.Unspecified,
        OwnershipType = QueryReservationsRequest.Types.OwnershipType.Unspecified,
        ReservationDataLevel = QueryReservationsRequest.Types.ReservationDataLevel.Unspecified,
        MachineShape = new MachineShape(),
        IncludeUnapprovedReservations = false,
        AggregationMethod = UsageHistory.Types.AggregationMethod.Unspecified,
        StartDate = new Date(),
        EndDate = new Date(),
        LocationLevel = TimeSeries.Types.LocationType.Unspecified,
    };
    // Make the request
    QueryReservationsResponse response = await usageServiceClient.QueryReservationsAsync(request);

### QueryReservationsAsync(QueryReservationsRequest, CancellationToken)

    public virtual Task<QueryReservationsResponse> QueryReservationsAsync(QueryReservationsRequest request, CancellationToken cancellationToken)

Returns a list of the reservations that are in the parent parameter
and match your specified filters.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryReservationsRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryReservationsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    UsageServiceClient usageServiceClient = await UsageServiceClient.CreateAsync();
    // Initialize request argument(s)
    QueryReservationsRequest request = new QueryReservationsRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        MachineFamily = "",
        GpuType = "",
        CloudResourceType = "",
        ReservationType = QueryReservationsRequest.Types.ReservationType.Unspecified,
        ShareType = QueryReservationsRequest.Types.ShareType.Unspecified,
        OwnershipType = QueryReservationsRequest.Types.OwnershipType.Unspecified,
        ReservationDataLevel = QueryReservationsRequest.Types.ReservationDataLevel.Unspecified,
        MachineShape = new MachineShape(),
        IncludeUnapprovedReservations = false,
        AggregationMethod = UsageHistory.Types.AggregationMethod.Unspecified,
        StartDate = new Date(),
        EndDate = new Date(),
        LocationLevel = TimeSeries.Types.LocationType.Unspecified,
    };
    // Make the request
    QueryReservationsResponse response = await usageServiceClient.QueryReservationsAsync(request);

### QueryReservationsAsync(string, CallSettings)

    public virtual Task<QueryReservationsResponse> QueryReservationsAsync(string parent, CallSettings callSettings = null)

Returns a list of the reservations that are in the parent parameter
and match your specified filters.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The compute engine resource and location for the time series values to return. The format is: projects/{project}/locations/{location} or organizations/{organization}/locations/{location} or folders/{folder}/locations/{location} |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryReservationsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    UsageServiceClient usageServiceClient = await UsageServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    // Make the request
    QueryReservationsResponse response = await usageServiceClient.QueryReservationsAsync(parent);

### QueryReservationsAsync(string, CancellationToken)

    public virtual Task<QueryReservationsResponse> QueryReservationsAsync(string parent, CancellationToken cancellationToken)

Returns a list of the reservations that are in the parent parameter
and match your specified filters.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The compute engine resource and location for the time series values to return. The format is: projects/{project}/locations/{location} or organizations/{organization}/locations/{location} or folders/{folder}/locations/{location} |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryReservationsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    UsageServiceClient usageServiceClient = await UsageServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    // Make the request
    QueryReservationsResponse response = await usageServiceClient.QueryReservationsAsync(parent);

### QueryUsageHistories(QueryUsageHistoriesRequest, CallSettings)

    public virtual QueryUsageHistoriesResponse QueryUsageHistories(QueryUsageHistoriesRequest request, CallSettings callSettings = null)

Returns a list of the usage histories that are in the parent parameter
and match your specified filters.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryUsageHistoriesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryUsageHistoriesResponse` | The RPC response. |

**Example**

    // Create client
    UsageServiceClient usageServiceClient = UsageServiceClient.Create();
    // Initialize request argument(s)
    QueryUsageHistoriesRequest request = new QueryUsageHistoriesRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        MachineFamily = "",
        CloudResourceType = "",
        UsageAggregationMethod = UsageHistory.Types.AggregationMethod.Unspecified,
        DiskType = "",
        GpuType = "",
        StartDate = new Date(),
        EndDate = new Date(),
        LocationLevel = TimeSeries.Types.LocationType.Unspecified,
        TpuType = "",
        MachineShape = new MachineShape(),
        IsSpot = false,
        ConfidentialMode = false,
    };
    // Make the request
    QueryUsageHistoriesResponse response = usageServiceClient.QueryUsageHistories(request);

### QueryUsageHistoriesAsync(QueryUsageHistoriesRequest, CallSettings)

    public virtual Task<QueryUsageHistoriesResponse> QueryUsageHistoriesAsync(QueryUsageHistoriesRequest request, CallSettings callSettings = null)

Returns a list of the usage histories that are in the parent parameter
and match your specified filters.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryUsageHistoriesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryUsageHistoriesResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    UsageServiceClient usageServiceClient = await UsageServiceClient.CreateAsync();
    // Initialize request argument(s)
    QueryUsageHistoriesRequest request = new QueryUsageHistoriesRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        MachineFamily = "",
        CloudResourceType = "",
        UsageAggregationMethod = UsageHistory.Types.AggregationMethod.Unspecified,
        DiskType = "",
        GpuType = "",
        StartDate = new Date(),
        EndDate = new Date(),
        LocationLevel = TimeSeries.Types.LocationType.Unspecified,
        TpuType = "",
        MachineShape = new MachineShape(),
        IsSpot = false,
        ConfidentialMode = false,
    };
    // Make the request
    QueryUsageHistoriesResponse response = await usageServiceClient.QueryUsageHistoriesAsync(request);

### QueryUsageHistoriesAsync(QueryUsageHistoriesRequest, CancellationToken)

    public virtual Task<QueryUsageHistoriesResponse> QueryUsageHistoriesAsync(QueryUsageHistoriesRequest request, CancellationToken cancellationToken)

Returns a list of the usage histories that are in the parent parameter
and match your specified filters.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryUsageHistoriesRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryUsageHistoriesResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    UsageServiceClient usageServiceClient = await UsageServiceClient.CreateAsync();
    // Initialize request argument(s)
    QueryUsageHistoriesRequest request = new QueryUsageHistoriesRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        MachineFamily = "",
        CloudResourceType = "",
        UsageAggregationMethod = UsageHistory.Types.AggregationMethod.Unspecified,
        DiskType = "",
        GpuType = "",
        StartDate = new Date(),
        EndDate = new Date(),
        LocationLevel = TimeSeries.Types.LocationType.Unspecified,
        TpuType = "",
        MachineShape = new MachineShape(),
        IsSpot = false,
        ConfidentialMode = false,
    };
    // Make the request
    QueryUsageHistoriesResponse response = await usageServiceClient.QueryUsageHistoriesAsync(request);

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.UsageServiceClient#Google_Cloud_CapacityPlanner_V1Beta_UsageServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.UsageServiceClient#Google_Cloud_CapacityPlanner_V1Beta_UsageServiceClient_CreateAsync_System_Threading_CancellationToken_). Channels which weren't automatically created are not
affected.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A task representing the asynchronous shutdown operation. |

**Remarks** After calling this method, further calls to [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.UsageServiceClient#Google_Cloud_CapacityPlanner_V1Beta_UsageServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.UsageServiceClient#Google_Cloud_CapacityPlanner_V1Beta_UsageServiceClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.