# Cloud Datastore v1 API - Class Index (2.5.0)

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

- [2.5.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastore.Admin.V1/latest/Google.Cloud.Datastore.Admin.V1.Index)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastore.Admin.V1/2.4.0/Google.Cloud.Datastore.Admin.V1.Index)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastore.Admin.V1/2.3.0/Google.Cloud.Datastore.Admin.V1.Index)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastore.Admin.V1/2.2.0/Google.Cloud.Datastore.Admin.V1.Index)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastore.Admin.V1/2.1.0/Google.Cloud.Datastore.Admin.V1.Index)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastore.Admin.V1/2.0.0/Google.Cloud.Datastore.Admin.V1.Index)
- [1.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastore.Admin.V1/1.4.0/Google.Cloud.Datastore.Admin.V1.Index)
- [1.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastore.Admin.V1/1.3.0/Google.Cloud.Datastore.Admin.V1.Index)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastore.Admin.V1/1.2.0/Google.Cloud.Datastore.Admin.V1.Index)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastore.Admin.V1/1.1.0/Google.Cloud.Datastore.Admin.V1.Index)

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

Reference documentation and code samples for the Cloud Datastore v1 API class Index.

Datastore composite index definition.

## Inheritance

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

## Implements

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

## Assembly

Google.Cloud.Datastore.Admin.V1.dll

## Constructors

### Index()

    public Index()

### Index(Index)

    public Index(Index other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastore.Admin.V1/latest/Google.Cloud.Datastore.Admin.V1.Index` |

## Properties

### Ancestor

    public Index.Types.AncestorMode Ancestor { get; set; }

Required. The index's ancestor mode. Must not be
ANCESTOR_MODE_UNSPECIFIED.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastore.Admin.V1/latest/Google.Cloud.Datastore.Admin.V1.Indexhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastore.Admin.V1/latest/Google.Cloud.Datastore.Admin.V1.Index.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastore.Admin.V1/latest/Google.Cloud.Datastore.Admin.V1.Index.Types.AncestorMode` |   |

### IndexId

    public string IndexId { get; set; }

Output only. The resource ID of the index.

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

### Kind

    public string Kind { get; set; }

Required. The entity kind to which this index applies.

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

### ProjectId

    public string ProjectId { get; set; }

Output only. Project ID.

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

### Properties

    public RepeatedField<Index.Types.IndexedProperty> Properties { get; }

Required. An ordered sequence of property names and their index attributes.

Requires:

- A maximum of 100 properties.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastore.Admin.V1/latest/Google.Cloud.Datastore.Admin.V1.Indexhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastore.Admin.V1/latest/Google.Cloud.Datastore.Admin.V1.Index.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastore.Admin.V1/latest/Google.Cloud.Datastore.Admin.V1.Index.Types.IndexedProperty` |   |

### State

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

Output only. The state of the index.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastore.Admin.V1/latest/Google.Cloud.Datastore.Admin.V1.Indexhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastore.Admin.V1/latest/Google.Cloud.Datastore.Admin.V1.Index.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastore.Admin.V1/latest/Google.Cloud.Datastore.Admin.V1.Index.Types.State` |   |