# Firestore in Datastore mode Admin V1 API - Class Google::Cloud::Datastore::Admin::V1::Index (v1.7.0)

1.7.0 (latest) 1.6.0 1.5.1 1.4.0 1.3.0 1.2.1 1.1.0 1.0.1 0.12.0 0.11.2 0.10.0 0.9.1 0.8.0 0.7.1 0.6.0 0.5.0 0.4.5 Reference documentation and code samples for the Firestore in Datastore mode Admin V1 API class Google::Cloud::Datastore::Admin::V1::Index.

Datastore composite index definition.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #ancestor

    def ancestor() -> ::Google::Cloud::Datastore::Admin::V1::Index::AncestorMode

**Returns**

- ([::Google::Cloud::Datastore::Admin::V1::Index::AncestorMode](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastore-admin-v1/latest/Google-Cloud-Datastore-Admin-V1-Index-AncestorMode)) --- Required. The index's ancestor mode. Must not be ANCESTOR_MODE_UNSPECIFIED.

### #ancestor=

    def ancestor=(value) -> ::Google::Cloud::Datastore::Admin::V1::Index::AncestorMode

**Parameter**

- **value** ([::Google::Cloud::Datastore::Admin::V1::Index::AncestorMode](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastore-admin-v1/latest/Google-Cloud-Datastore-Admin-V1-Index-AncestorMode)) --- Required. The index's ancestor mode. Must not be ANCESTOR_MODE_UNSPECIFIED.
**Returns**

- ([::Google::Cloud::Datastore::Admin::V1::Index::AncestorMode](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastore-admin-v1/latest/Google-Cloud-Datastore-Admin-V1-Index-AncestorMode)) --- Required. The index's ancestor mode. Must not be ANCESTOR_MODE_UNSPECIFIED.

### #index_id

    def index_id() -> ::String

**Returns**

- (::String) --- Output only. The resource ID of the index.

### #kind

    def kind() -> ::String

**Returns**

- (::String) --- Required. The entity kind to which this index applies.

### #kind=

    def kind=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. The entity kind to which this index applies.
**Returns**

- (::String) --- Required. The entity kind to which this index applies.

### #project_id

    def project_id() -> ::String

**Returns**

- (::String) --- Output only. Project ID.

### #properties

    def properties() -> ::Array<::Google::Cloud::Datastore::Admin::V1::Index::IndexedProperty>

**Returns**

- (::Array\<[::Google::Cloud::Datastore::Admin::V1::Index::IndexedProperty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastore-admin-v1/latest/Google-Cloud-Datastore-Admin-V1-Index-IndexedProperty)\>) ---

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

  Requires:
  - A maximum of 100 properties.

### #properties=

    def properties=(value) -> ::Array<::Google::Cloud::Datastore::Admin::V1::Index::IndexedProperty>

**Parameter**

- **value** (::Array\<[::Google::Cloud::Datastore::Admin::V1::Index::IndexedProperty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastore-admin-v1/latest/Google-Cloud-Datastore-Admin-V1-Index-IndexedProperty)\>) ---

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

  Requires:
  - A maximum of 100 properties.
**Returns**

- (::Array\<[::Google::Cloud::Datastore::Admin::V1::Index::IndexedProperty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastore-admin-v1/latest/Google-Cloud-Datastore-Admin-V1-Index-IndexedProperty)\>) ---

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

  Requires:
  - A maximum of 100 properties.

### #state

    def state() -> ::Google::Cloud::Datastore::Admin::V1::Index::State

**Returns**

- ([::Google::Cloud::Datastore::Admin::V1::Index::State](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastore-admin-v1/latest/Google-Cloud-Datastore-Admin-V1-Index-State)) --- Output only. The state of the index.