# Google Cloud Sql Admin V1 Client - Class InsightsConfig (1.9.0)

1.9.0 (latest) 1.8.0 1.7.0 1.6.0 1.5.0 1.4.0 1.3.1 1.2.6 1.1.0 1.0.0 0.19.0 0.18.0 0.17.1 0.16.1 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.1 0.3.1 0.2.12 Reference documentation and code samples for the Google Cloud Sql Admin V1 Client class InsightsConfig.

Insights configuration. This specifies when Cloud SQL Insights feature is
enabled and optional configuration.

Generated from protobuf message `google.cloud.sql.v1.InsightsConfig`

## Namespace

Google \\ Cloud \\ Sql \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ query_insights_enabled` | `bool` Whether Query Insights feature is enabled. |
| `↳ record_client_address` | `bool` Whether Query Insights will record client address when enabled. |
| `↳ record_application_tags` | `bool` Whether Query Insights will record application tags from query when enabled. |
| `↳ query_string_length` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Int32Value` Maximum query length stored in bytes. Default value: 1024 bytes. Range: 256-4500 bytes. Query lengths greater than this field value will be truncated to this value. When unset, query length will be the default value. Changing query length will restart the database. |
| `↳ query_plans_per_minute` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Int32Value` Number of query execution plans captured by Insights per minute for all queries combined. Default is 5. |
| `↳ enhanced_query_insights_enabled` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/BoolValue` Optional. Whether enhanced query insights feature is enabled. |

### getQueryInsightsEnabled

Whether Query Insights feature is enabled.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setQueryInsightsEnabled

Whether Query Insights feature is enabled.

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

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

### getRecordClientAddress

Whether Query Insights will record client address when enabled.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setRecordClientAddress

Whether Query Insights will record client address when enabled.

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

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

### getRecordApplicationTags

Whether Query Insights will record application tags from query when
enabled.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setRecordApplicationTags

Whether Query Insights will record application tags from query when
enabled.

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

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

### getQueryStringLength

Maximum query length stored in bytes. Default value: 1024 bytes.

Range: 256-4500 bytes. Query lengths greater than this field value will be
truncated to this value. When unset, query length will be the default
value. Changing query length will restart the database.

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

### hasQueryStringLength

### clearQueryStringLength

### getQueryStringLengthUnwrapped

Returns the unboxed value from `getQueryStringLength()`

Maximum query length stored in bytes. Default value: 1024 bytes.
Range: 256-4500 bytes. Query lengths greater than this field value will be
truncated to this value. When unset, query length will be the default
value. Changing query length will restart the database.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int|null` |   |

### setQueryStringLength

Maximum query length stored in bytes. Default value: 1024 bytes.

Range: 256-4500 bytes. Query lengths greater than this field value will be
truncated to this value. When unset, query length will be the default
value. Changing query length will restart the database.

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

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

### setQueryStringLengthUnwrapped

Sets the field by wrapping a primitive type in a Google\\Protobuf\\Int32Value object.

Maximum query length stored in bytes. Default value: 1024 bytes.
Range: 256-4500 bytes. Query lengths greater than this field value will be
truncated to this value. When unset, query length will be the default
value. Changing query length will restart the database.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int|null` |

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

### getQueryPlansPerMinute

Number of query execution plans captured by Insights per minute
for all queries combined. Default is 5.

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

### hasQueryPlansPerMinute

### clearQueryPlansPerMinute

### getQueryPlansPerMinuteUnwrapped

Returns the unboxed value from `getQueryPlansPerMinute()`

Number of query execution plans captured by Insights per minute
for all queries combined. Default is 5.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int|null` |   |

### setQueryPlansPerMinute

Number of query execution plans captured by Insights per minute
for all queries combined. Default is 5.

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

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

### setQueryPlansPerMinuteUnwrapped

Sets the field by wrapping a primitive type in a Google\\Protobuf\\Int32Value object.

Number of query execution plans captured by Insights per minute
for all queries combined. Default is 5.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int|null` |

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

### getEnhancedQueryInsightsEnabled

Optional. Whether enhanced query insights feature is enabled.

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

### hasEnhancedQueryInsightsEnabled

### clearEnhancedQueryInsightsEnabled

### getEnhancedQueryInsightsEnabledUnwrapped

Returns the unboxed value from `getEnhancedQueryInsightsEnabled()`

Optional. Whether enhanced query insights feature is enabled.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool|null` |   |

### setEnhancedQueryInsightsEnabled

Optional. Whether enhanced query insights feature is enabled.

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

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

### setEnhancedQueryInsightsEnabledUnwrapped

Sets the field by wrapping a primitive type in a Google\\Protobuf\\BoolValue object.

Optional. Whether enhanced query insights feature is enabled.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool|null` |

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