# Google Cloud Vision Ai V1 Client - Class CreateIndexRequest (0.3.0)

0.3.0 (latest) 0.2.0 0.1.0 Reference documentation and code samples for the Google Cloud Vision Ai V1 Client class CreateIndexRequest.

Message for creating an Index.

Generated from protobuf message `google.cloud.visionai.v1.CreateIndexRequest`

## Namespace

Google \\ Cloud \\ VisionAI \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` Required. Value for the parent. The resource name of the Corpus under which this index is created. Format: `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` |
| `↳ index_id` | `string` Optional. The ID for the index. This will become the final resource name for the index. If the user does not specify this value, it will be generated by system. This value should be up to 63 characters, and valid characters are /\[a-z\]\[0-9\]-/. The first character must be a letter, the last could be a letter or a number. |
| `↳ index` | `https://docs.cloud.google.com/php/docs/reference/cloud-visionai/latest/V1.Index` Required. The index being created. |

### getParent

Required. Value for the parent. The resource name of the Corpus under which
this index is created. Format:
`projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`

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

### setParent

Required. Value for the parent. The resource name of the Corpus under which
this index is created. Format:
`projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`

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

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

### getIndexId

Optional. The ID for the index. This will become the final resource name
for the index. If the user does not specify this value, it will be
generated by system.

This value should be up to 63 characters, and valid characters
are /\[a-z\]\[0-9\]-/. The first character must be a letter, the last could be
a letter or a number.

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

### setIndexId

Optional. The ID for the index. This will become the final resource name
for the index. If the user does not specify this value, it will be
generated by system.

This value should be up to 63 characters, and valid characters
are /\[a-z\]\[0-9\]-/. The first character must be a letter, the last could be
a letter or a number.

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

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

### getIndex

Required. The index being created.

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

### hasIndex

### clearIndex

### setIndex

Required. The index being created.

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. Value for the parent. The resource name of the Corpus under which this index is created. Format: `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` Please see WarehouseClient::corpusName() for help formatting this field. |
| `index` | `https://docs.cloud.google.com/php/docs/reference/cloud-visionai/latest/V1.Index` Required. The index being created. |
| `indexId` | `string` Optional. The ID for the index. This will become the final resource name for the index. If the user does not specify this value, it will be generated by system. This value should be up to 63 characters, and valid characters are /\[a-z\]\[0-9\]-/. The first character must be a letter, the last could be a letter or a number. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-visionai/latest/V1.CreateIndexRequest` |   |