# Google Cloud Datastore Admin V1 Client - Class CreateIndexRequest (1.1.2)

1.1.2 (latest) 1.1.1 1.0.4 0.8.5 0.7.5 0.6.0 0.5.8 Reference documentation and code samples for the Google Cloud Datastore Admin V1 Client class CreateIndexRequest.

The request for
[google.datastore.admin.v1.DatastoreAdmin.CreateIndex](https://docs.cloud.google.com/php/docs/reference/cloud-datastore-admin/latest/V1.Client.DatastoreAdminClient#_Google_Cloud_Datastore_Admin_V1_Client_DatastoreAdminClient__createIndex__).

Generated from protobuf message `google.datastore.admin.v1.CreateIndexRequest`

## Namespace

Google \\ Cloud \\ Datastore \\ Admin \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ project_id` | `string` Project ID against which to make the request. |
| `↳ index` | `https://docs.cloud.google.com/php/docs/reference/cloud-datastore-admin/latest/V1.Index` The index to create. The name and state fields are output only and will be ignored. Single property indexes cannot be created or deleted. |

### getProjectId

Project ID against which to make the request.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setProjectId

Project ID against which to make the request.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getIndex

The index to create. The name and state fields are output only and will be
ignored. Single property indexes cannot be created or deleted.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-datastore-admin/latest/V1.Index|null` |   |

### hasIndex

### clearIndex

### setIndex

The index to create. The name and state fields are output only and will be
ignored. Single property indexes cannot be created or deleted.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-datastore-admin/latest/V1.Index` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |