# Vertex AI Notebooks v1beta1 API - Class ReservationAffinity (2.0.0-beta06)

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

- [2.0.0-beta06 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Notebooks.V1Beta1/latest/Google.Cloud.Notebooks.V1Beta1.ReservationAffinity)
- [2.0.0-beta05](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Notebooks.V1Beta1/2.0.0-beta05/Google.Cloud.Notebooks.V1Beta1.ReservationAffinity)
- [1.0.0-beta04](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Notebooks.V1Beta1/1.0.0-beta04/Google.Cloud.Notebooks.V1Beta1.ReservationAffinity)

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

Reference documentation and code samples for the Vertex AI Notebooks v1beta1 API class ReservationAffinity.

Reservation Affinity for consuming Zonal reservation.

## Inheritance

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

## Implements

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

## Assembly

Google.Cloud.Notebooks.V1Beta1.dll

## Constructors

### ReservationAffinity()

    public ReservationAffinity()

### ReservationAffinity(ReservationAffinity)

    public ReservationAffinity(ReservationAffinity other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Notebooks.V1Beta1/latest/Google.Cloud.Notebooks.V1Beta1.ReservationAffinity` |

## Properties

### ConsumeReservationType

    public ReservationAffinity.Types.Type ConsumeReservationType { get; set; }

Optional. Type of reservation to consume

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Notebooks.V1Beta1/latest/Google.Cloud.Notebooks.V1Beta1.ReservationAffinityhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Notebooks.V1Beta1/latest/Google.Cloud.Notebooks.V1Beta1.ReservationAffinity.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Notebooks.V1Beta1/latest/Google.Cloud.Notebooks.V1Beta1.ReservationAffinity.Types.Type` |   |

### Key

    public string Key { get; set; }

Optional. Corresponds to the label key of reservation resource.

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

### Values

    public RepeatedField<string> Values { get; }

Optional. Corresponds to the label values of reservation resource.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://learn.microsoft.com/dotnet/api/system.string` |   |