# BigQuery Reservation v1 API - Class CapacityCommitment (2.12.0)

2.12.0 (latest) 2.11.0 2.10.0 2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.6.0 1.5.0 1.4.0 1.3.0 1.2.0

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

Reference documentation and code samples for the BigQuery Reservation v1 API class CapacityCommitment.

Capacity commitment is a way to purchase compute capacity for BigQuery jobs
(in the form of slots) with some committed period of usage. Annual
commitments renew by default. Commitments can be removed after their
commitment end time passes.

In order to remove annual commitment, its plan needs to be changed
to monthly or flex first.

A capacity commitment resource exists as a child resource of the admin
project.

## Inheritance

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

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[CapacityCommitment](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.CapacityCommitment), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[CapacityCommitment](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.CapacityCommitment), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[CapacityCommitment](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.CapacityCommitment), [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.BigQuery.Reservation.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1)

## Assembly

Google.Cloud.BigQuery.Reservation.V1.dll

## Constructors

### CapacityCommitment()

    public CapacityCommitment()

### CapacityCommitment(CapacityCommitment)

    public CapacityCommitment(CapacityCommitment other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.CapacityCommitment` |

## Properties

### CapacityCommitmentName

    public CapacityCommitmentName CapacityCommitmentName { get; set; }

[CapacityCommitmentName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.CapacityCommitmentName)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.CapacityCommitment#Google_Cloud_BigQuery_Reservation_V1_CapacityCommitment_Name) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.CapacityCommitmentName` |   |

### CommitmentEndTime

    public Timestamp CommitmentEndTime { get; set; }

Output only. The end of the current commitment period. It is applicable
only for ACTIVE capacity commitments. Note after renewal,
commitment_end_time is the time the renewed commitment expires. So itwould
be at a time after commitment_start_time + committed period, because we
don't change commitment_start_time ,

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

### CommitmentStartTime

    public Timestamp CommitmentStartTime { get; set; }

Output only. The start of the current commitment period. It is applicable
only for ACTIVE capacity commitments. Note after the commitment is renewed,
commitment_start_time won't be changed. It refers to the start time of the
original commitment.

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

### Edition

    public Edition Edition { get; set; }

Optional. Edition of the capacity commitment.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.Edition` |   |

### FailureStatus

    public Status FailureStatus { get; set; }

Output only. For FAILED commitment plan, provides the reason of failure.

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

### IsFlatRate

    public bool IsFlatRate { get; set; }

Output only. If true, the commitment is a flat-rate commitment, otherwise,
it's an edition commitment.

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

### MultiRegionAuxiliary

    [Obsolete]
    public bool MultiRegionAuxiliary { get; set; }

Applicable only for commitments located within one of the BigQuery
multi-regions (US or EU).

If set to true, this commitment is placed in the organization's
secondary region which is designated for disaster recovery purposes.
If false, this commitment is placed in the organization's default region.

NOTE: this is a preview feature. Project must be allow-listed in order to
set this field.

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

### Name

    public string Name { get; set; }

Output only. The resource name of the capacity commitment, e.g.,
`projects/myproject/locations/US/capacityCommitments/123`
The commitment_id must only contain lower case alphanumeric characters or
dashes. It must start with a letter and must not end
with a dash. Its maximum length is 64 characters.

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

### Plan

    public CapacityCommitment.Types.CommitmentPlan Plan { get; set; }

Optional. Capacity commitment commitment plan.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.CapacityCommitmenthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.CapacityCommitment.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.CapacityCommitment.Types.CommitmentPlan` |   |

### RenewalPlan

    public CapacityCommitment.Types.CommitmentPlan RenewalPlan { get; set; }

Optional. The plan this capacity commitment is converted to after
commitment_end_time passes. Once the plan is changed, committed period is
extended according to commitment plan. Only applicable for ANNUAL and TRIAL
commitments.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.CapacityCommitmenthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.CapacityCommitment.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.CapacityCommitment.Types.CommitmentPlan` |   |

### SlotCount

    public long SlotCount { get; set; }

Optional. Number of slots in this commitment.

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

### State

    public CapacityCommitment.Types.State State { get; set; }

Output only. State of the commitment.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.CapacityCommitmenthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.CapacityCommitment.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.CapacityCommitment.Types.State` |   |