# Google Cloud Sql Admin V1 Client - Class UserPasswordValidationPolicy (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 UserPasswordValidationPolicy.

User level password validation policy.

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

## Namespace

Google \\ Cloud \\ Sql \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ allowed_failed_attempts` | `int` Number of failed login attempts allowed before user get locked. |
| `↳ password_expiration_duration` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` Expiration duration after password is updated. |
| `↳ enable_failed_attempts_check` | `bool` If true, failed login attempts check will be enabled. |
| `↳ status` | `https://docs.cloud.google.com/php/docs/reference/cloud-sql-admin/latest/V1.PasswordStatus` Output only. Read-only password status. |
| `↳ enable_password_verification` | `bool` If true, the user must specify the current password before changing the password. This flag is supported only for MySQL. |

### getAllowedFailedAttempts

Number of failed login attempts allowed before user get locked.

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

### setAllowedFailedAttempts

Number of failed login attempts allowed before user get locked.

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

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

### getPasswordExpirationDuration

Expiration duration after password is updated.

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

### hasPasswordExpirationDuration

### clearPasswordExpirationDuration

### setPasswordExpirationDuration

Expiration duration after password is updated.

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

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

### getEnableFailedAttemptsCheck

If true, failed login attempts check will be enabled.

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

### setEnableFailedAttemptsCheck

If true, failed login attempts check will be enabled.

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

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

### getStatus

Output only. Read-only password status.

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

### hasStatus

### clearStatus

### setStatus

Output only. Read-only password status.

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

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

### getEnablePasswordVerification

If true, the user must specify the current password before changing the
password. This flag is supported only for MySQL.

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

### setEnablePasswordVerification

If true, the user must specify the current password before changing the
password. This flag is supported only for MySQL.

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

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