# Google Cloud Orchestration Airflow V1 Client - Class AirflowMetadataRetentionPolicyConfig (2.2.3)

2.2.3 (latest) 2.2.2 2.1.8 2.0.1 1.6.4 1.5.0 1.4.2 1.3.0 1.2.0 1.1.0 1.0.4 Reference documentation and code samples for the Google Cloud Orchestration Airflow V1 Client class AirflowMetadataRetentionPolicyConfig.

The policy for airflow metadata database retention.

Generated from protobuf message `google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig`

## Namespace

Google \\ Cloud \\ Orchestration \\ Airflow \\ Service \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ retention_mode` | `int` Optional. Retention can be either enabled or disabled. |
| `↳ retention_days` | `int` Optional. How many days data should be retained for. |

### getRetentionMode

Optional. Retention can be either enabled or disabled.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [RetentionMode](https://docs.cloud.google.com/php/docs/reference/cloud-orchestration-airflow/latest/V1.AirflowMetadataRetentionPolicyConfig.RetentionMode). |

### setRetentionMode

Optional. Retention can be either enabled or disabled.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [RetentionMode](https://docs.cloud.google.com/php/docs/reference/cloud-orchestration-airflow/latest/V1.AirflowMetadataRetentionPolicyConfig.RetentionMode). |

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

### getRetentionDays

Optional. How many days data should be retained for.

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

### setRetentionDays

Optional. How many days data should be retained for.

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

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