2.11.0 (latest) 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.2.0 1.1.0 1.0.0-beta02

```javascript
public sealed class Scheduling.Types.NodeAffinity : IMessage<Scheduling.Types.NodeAffinity>, IEquatable<Scheduling.Types.NodeAffinity>, IDeepCloneable<Scheduling.Types.NodeAffinity>, IBufferMessage, IMessage
```
Reference documentation and code samples for the Backup and DR Service v1 API class Scheduling.Types.NodeAffinity.

Node Affinity: the configuration of desired nodes onto which this Instance
could be scheduled.

## Inheritance

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

## Implements

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

## Assembly

Google.Cloud.BackupDR.V1.dll

## Constructors

### NodeAffinity()

```javascript
public NodeAffinity()
```

### NodeAffinity(NodeAffinity)

```javascript
public NodeAffinity(Scheduling.Types.NodeAffinity other)
```

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `SchedulingTypesNodeAffinity` |

## Properties

### HasKey

```javascript
public bool HasKey { get; }
```
Gets whether the "key" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### HasOperator

```javascript
public bool HasOperator { get; }
```
Gets whether the "operator" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### Key

```javascript
public string Key { get; set; }
```
Optional. Corresponds to the label key of Node resource.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### Operator

```javascript
public Scheduling.Types.NodeAffinity.Types.Operator Operator { get; set; }
```
Optional. Defines the operation of node selection.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `SchedulingTypesNodeAffinityTypesOperator` |   |

### Values

```javascript
public RepeatedField<string> Values { get; }
```
Optional. Corresponds to the label values of Node resource.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `RepeatedFieldstring` |   |