# Stackdriver Logging V2 Client - Class IndexConfig (2.1.0)

2.1.0 (latest) 2.0.0 1.34.5 1.33.0 1.32.3 1.31.3 1.30.3 1.29.0 1.28.5 1.27.1 1.26.0 1.25.5 1.24.10 Reference documentation and code samples for the Stackdriver Logging V2 Client class IndexConfig.

Configuration for an indexed field.

Generated from protobuf message `google.logging.v2.IndexConfig`

## Namespace

Google \\ Cloud \\ Logging \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ field_path` | `string` Required. The LogEntry field path to index. Note that some paths are automatically indexed, and other paths are not eligible for indexing. See [indexing documentation](https://cloud.google.com/logging/docs/view/advanced-queries#indexed-fields) for details. For example: `jsonPayload.request.status` |
| `↳ type` | `int` Required. The type of data in this index. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The timestamp when the index was last modified. This is used to return the timestamp, and will be ignored if supplied during update. |

### getFieldPath

Required. The LogEntry field path to index.

Note that some paths are automatically indexed, and other paths are not
eligible for indexing. See [indexing documentation](https://cloud.google.com/logging/docs/view/advanced-queries#indexed-fields)
for details.
For example: `jsonPayload.request.status`

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

### setFieldPath

Required. The LogEntry field path to index.

Note that some paths are automatically indexed, and other paths are not
eligible for indexing. See [indexing documentation](https://cloud.google.com/logging/docs/view/advanced-queries#indexed-fields)
for details.
For example: `jsonPayload.request.status`

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

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

### getType

Required. The type of data in this index.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [IndexType](https://docs.cloud.google.com/php/docs/reference/cloud-logging/latest/V2.IndexType). |

### setType

Required. The type of data in this index.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [IndexType](https://docs.cloud.google.com/php/docs/reference/cloud-logging/latest/V2.IndexType). |

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

### getCreateTime

Output only. The timestamp when the index was last modified.

This is used to return the timestamp, and will be ignored if supplied
during update.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The timestamp when the index was last modified.

This is used to return the timestamp, and will be ignored if supplied
during update.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

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