1.0.0-alpha36 (latest) 1.0.0-alpha35

    public sealed class AllocationPolicy.Types.PlacementPolicy : IMessage<AllocationPolicy.Types.PlacementPolicy>, IEquatable<AllocationPolicy.Types.PlacementPolicy>, IDeepCloneable<AllocationPolicy.Types.PlacementPolicy>, IBufferMessage, IMessage

Reference documentation and code samples for the Batch v1alpha API class AllocationPolicy.Types.PlacementPolicy.

PlacementPolicy describes a group placement policy for the VMs controlled
by this AllocationPolicy.

## Inheritance

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

## Implements

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

## Assembly

Google.Cloud.Batch.V1Alpha.dll

## Constructors

### PlacementPolicy()

    public PlacementPolicy()

### PlacementPolicy(PlacementPolicy)

    public PlacementPolicy(AllocationPolicy.Types.PlacementPolicy other)

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

## Properties

### Collocation

    public string Collocation { get; set; }

UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you
want VMs to be located close to each other for low network latency
between the VMs. No placement policy will be generated when collocation
is UNSPECIFIED.

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

### MaxDistance

    public long MaxDistance { get; set; }

When specified, causes the job to fail if more than max_distance logical
switches are required between VMs. Batch uses the most compact possible
placement of VMs even when max_distance is not specified. An explicit
max_distance makes that level of compactness a strict requirement.
Not yet implemented

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