# Capacity Planner v1beta API - Class QueryReservationsRequest (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.QueryReservationsRequest)
- [1.0.0-beta01](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/1.0.0-beta01/Google.Cloud.CapacityPlanner.V1Beta.QueryReservationsRequest)

    public sealed class QueryReservationsRequest : IMessage<QueryReservationsRequest>, IEquatable<QueryReservationsRequest>, IDeepCloneable<QueryReservationsRequest>, IBufferMessage, IMessage

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

The `QueryReservations` request.

## Inheritance

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

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[QueryReservationsRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryReservationsRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[QueryReservationsRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryReservationsRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[QueryReservationsRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryReservationsRequest), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## 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.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## 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

## Constructors

### QueryReservationsRequest()

    public QueryReservationsRequest()

### QueryReservationsRequest(QueryReservationsRequest)

    public QueryReservationsRequest(QueryReservationsRequest other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryReservationsRequest` |

## Properties

### AggregationMethod

    public UsageHistory.Types.AggregationMethod AggregationMethod { get; set; }

Optional. Aggregation Method of the historical reservation usage

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.UsageHistoryhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.UsageHistory.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.UsageHistory.Types.AggregationMethod` |   |

### CloudResourceType

    public string CloudResourceType { get; set; }

Required. The resource for the reserved values to return. Possible values
include "gce-vcpus", "gce-ram", "gce-local-ssd", "gce-gpu" and "gce-vm".

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

### EndDate

    public Date EndDate { get; set; }

Optional. The end date of reservations usage.

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

### GpuType

    public string GpuType { get; set; }

Optional. The GPU type for the reserved values to return. Sample values
are "nvidia-tesla-t4", and "nvidia-tesla-a100". See
<https://cloud.google.com/compute/docs/gpus> for a list. Empty gpu_type
will return results matching all GPUs.

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

### IncludeUnapprovedReservations

    public bool IncludeUnapprovedReservations { get; set; }

Optional. Whether to include pending for approval reservations in the
response. This field is only applicable for future reservations.

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

### LocationLevel

    public TimeSeries.Types.LocationType LocationLevel { get; set; }

Optional. The location level of the reservations usage timeseries.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.TimeSerieshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.TimeSeries.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.TimeSeries.Types.LocationType` |   |

### MachineFamily

    public string MachineFamily { get; set; }

Optional. The machine family to use to select the aggregate reserved values
to return. Possible values include "n1", and "n2d" etc. Empty
machine_family will return results matching all machine families.

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

### MachineShape

    public MachineShape MachineShape { get; set; }

Optional. The machine_shape as a filter to select matching reservations.

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

### OwnershipType

    public QueryReservationsRequest.Types.OwnershipType OwnershipType { get; set; }

Optional. Types of ownerships to filter reservations based on.
In case of OWNED, it filters reservations which are owned by selected
parent project/folder/organization. If unspecified, all types are
included.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryReservationsRequesthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryReservationsRequest.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryReservationsRequest.Types.OwnershipType` |   |

### Parent

    public string Parent { get; set; }

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}

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

### ParentAsLocationName

    public LocationName ParentAsLocationName { get; set; }

[LocationName](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html)-typed view over the [Parent](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryReservationsRequest#Google_Cloud_CapacityPlanner_V1Beta_QueryReservationsRequest_Parent) resource name property.

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

### ReservationDataLevel

    public QueryReservationsRequest.Types.ReservationDataLevel ReservationDataLevel { get; set; }

Required. Reservations output data format.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryReservationsRequesthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryReservationsRequest.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryReservationsRequest.Types.ReservationDataLevel` |   |

### ReservationType

    public QueryReservationsRequest.Types.ReservationType ReservationType { get; set; }

Required. The Reservation type for example, future reservation request and
allocation. If unspecified, all types are
included.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryReservationsRequesthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryReservationsRequest.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryReservationsRequest.Types.ReservationType` |   |

### ShareType

    public QueryReservationsRequest.Types.ShareType ShareType { get; set; }

Optional. Types of share settings to filter reservations in response. If
unspecified, all types are included.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryReservationsRequesthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryReservationsRequest.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CapacityPlanner.V1Beta/latest/Google.Cloud.CapacityPlanner.V1Beta.QueryReservationsRequest.Types.ShareType` |   |

### StartDate

    public Date StartDate { get; set; }

Optional. The start date of reservations usage.

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