# Interface IndexOrBuilder (3.1.0)

3.1.0 (latest) 2.40.0 2.37.0 2.36.0 2.34.0 2.33.3 2.32.3 2.31.4 2.30.0 2.29.1 2.28.2 2.27.1 2.26.4 2.25.2 2.24.3 2.23.0 2.22.0 2.21.3 2.20.2 2.19.2 2.18.5 2.17.6

    public interface IndexOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getAncestor()

    public abstract Index.AncestorMode getAncestor()

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

`
.google.datastore.admin.v1.Index.AncestorMode ancestor = 5 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-datastore/latest/com.google.datastore.admin.v1.Index.AncestorMode` | The ancestor. |

### getAncestorValue()

    public abstract int getAncestorValue()

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

`
.google.datastore.admin.v1.Index.AncestorMode ancestor = 5 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for ancestor. |

### getIndexId()

    public abstract String getIndexId()

Output only. The resource ID of the index.

`string index_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The indexId. |

### getIndexIdBytes()

    public abstract ByteString getIndexIdBytes()

Output only. The resource ID of the index.

`string index_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for indexId. |

### getKind()

    public abstract String getKind()

Required. The entity kind to which this index applies.

`string kind = 4 [(.google.api.field_behavior) = REQUIRED];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The kind. |

### getKindBytes()

    public abstract ByteString getKindBytes()

Required. The entity kind to which this index applies.

`string kind = 4 [(.google.api.field_behavior) = REQUIRED];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for kind. |

### getProjectId()

    public abstract String getProjectId()

Output only. Project ID.

`string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The projectId. |

### getProjectIdBytes()

    public abstract ByteString getProjectIdBytes()

Output only. Project ID.

`string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for projectId. |

### getProperties(int index)

    public abstract Index.IndexedProperty getProperties(int index)

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

Requires:

- A maximum of 100 properties.

`
repeated .google.datastore.admin.v1.Index.IndexedProperty properties = 6 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-datastore/latest/com.google.datastore.admin.v1.Index.IndexedProperty` |   |

### getPropertiesCount()

    public abstract int getPropertiesCount()

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

Requires:

- A maximum of 100 properties.

`
repeated .google.datastore.admin.v1.Index.IndexedProperty properties = 6 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getPropertiesList()

    public abstract List<Index.IndexedProperty> getPropertiesList()

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

Requires:

- A maximum of 100 properties.

`
repeated .google.datastore.admin.v1.Index.IndexedProperty properties = 6 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-datastore/latest/com.google.datastore.admin.v1.Index.IndexedProperty>` |   |

### getPropertiesOrBuilder(int index)

    public abstract Index.IndexedPropertyOrBuilder getPropertiesOrBuilder(int index)

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

Requires:

- A maximum of 100 properties.

`
repeated .google.datastore.admin.v1.Index.IndexedProperty properties = 6 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-datastore/latest/com.google.datastore.admin.v1.Index.IndexedPropertyOrBuilder` |   |

### getPropertiesOrBuilderList()

    public abstract List<? extends Index.IndexedPropertyOrBuilder> getPropertiesOrBuilderList()

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

Requires:

- A maximum of 100 properties.

`
repeated .google.datastore.admin.v1.Index.IndexedProperty properties = 6 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<? extends com.google.datastore.admin.v1.Index.IndexedPropertyOrBuilder>` |   |

### getState()

    public abstract Index.State getState()

Output only. The state of the index.

`
.google.datastore.admin.v1.Index.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-datastore/latest/com.google.datastore.admin.v1.Index.State` | The state. |

### getStateValue()

    public abstract int getStateValue()

Output only. The state of the index.

`
.google.datastore.admin.v1.Index.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for state. |