# Google Cloud Backup Dr V1 Client - Class BackupPlanAssociation (0.13.0)

0.13.0 (latest) 0.12.1 0.11.1 0.10.0 0.9.0 0.8.1 0.7.0 0.6.2 0.5.1 0.4.2 0.3.0 0.2.0 0.1.0 Reference documentation and code samples for the Google Cloud Backup Dr V1 Client class BackupPlanAssociation.

A BackupPlanAssociation represents a single BackupPlanAssociation which
contains details like workload, backup plan etc

Generated from protobuf message `google.cloud.backupdr.v1.BackupPlanAssociation`

## Namespace

Google \\ Cloud \\ BackupDR \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Output only. Identifier. The resource name of BackupPlanAssociation in below format Format : projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId} |
| `↳ resource_type` | `string` Required. Immutable. Resource type of workload on which backupplan is applied |
| `↳ resource` | `string` Required. Immutable. Resource name of workload on which the backup plan is applied. The format can either be the resource name (e.g., "projects/my-project/zones/us-central1-a/instances/my-instance") or the full resource URI (e.g., "<https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-a/instances/my-instance>"). |
| `↳ backup_plan` | `string` Required. Resource name of backup plan which needs to be applied on workload. Format: projects/{project}/locations/{location}/backupPlans/{backupPlanId} |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The time when the instance was created. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The time when the instance was updated. |
| `↳ state` | `int` Output only. The BackupPlanAssociation resource state. |
| `↳ rules_config_info` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-backupdr/latest/V1.RuleConfigInfo>` Output only. The config info related to backup rules. |
| `↳ data_source` | `string` Output only. Resource name of data source which will be used as storage location for backups taken. Format : projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource} |
| `↳ cloud_sql_instance_backup_plan_association_properties` | `https://docs.cloud.google.com/php/docs/reference/cloud-backupdr/latest/V1.CloudSqlInstanceBackupPlanAssociationProperties` Output only. Cloud SQL instance's backup plan association properties. |
| `↳ alloydb_cluster_backup_plan_association_properties` | `https://docs.cloud.google.com/php/docs/reference/cloud-backupdr/latest/V1.AlloyDBClusterBackupPlanAssociationProperties` Output only. AlloyDB cluster's backup plan association properties. |
| `↳ backup_plan_revision_id` | `string` Output only. The user friendly revision ID of the `BackupPlanRevision`. Example: v0, v1, v2, etc. |
| `↳ backup_plan_revision_name` | `string` Output only. The resource id of the `BackupPlanRevision`. Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}` |

### getName

Output only. Identifier. The resource name of BackupPlanAssociation in
below format Format :
projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}

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

### setName

Output only. Identifier. The resource name of BackupPlanAssociation in
below format Format :
projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}

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

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

### getResourceType

Required. Immutable. Resource type of workload on which backupplan is
applied

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

### setResourceType

Required. Immutable. Resource type of workload on which backupplan is
applied

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

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

### getResource

Required. Immutable. Resource name of workload on which the backup plan is
applied.

The format can either be the resource name (e.g.,
"projects/my-project/zones/us-central1-a/instances/my-instance") or the
full resource URI (e.g.,
"<https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-a/instances/my-instance>").

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

### setResource

Required. Immutable. Resource name of workload on which the backup plan is
applied.

The format can either be the resource name (e.g.,
"projects/my-project/zones/us-central1-a/instances/my-instance") or the
full resource URI (e.g.,
"<https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-a/instances/my-instance>").

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

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

### getBackupPlan

Required. Resource name of backup plan which needs to be applied on
workload. Format:
projects/{project}/locations/{location}/backupPlans/{backupPlanId}

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

### setBackupPlan

Required. Resource name of backup plan which needs to be applied on
workload. Format:
projects/{project}/locations/{location}/backupPlans/{backupPlanId}

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

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

### getCreateTime

Output only. The time when the instance was created.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The time when the instance was created.

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

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

### getUpdateTime

Output only. The time when the instance was updated.

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

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. The time when the instance was updated.

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

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

### getState

Output only. The BackupPlanAssociation resource state.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [State](https://docs.cloud.google.com/php/docs/reference/cloud-backupdr/latest/V1.BackupPlanAssociation.State). |

### setState

Output only. The BackupPlanAssociation resource state.

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

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

### getRulesConfigInfo

Output only. The config info related to backup rules.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-backupdr/latest/V1.RuleConfigInfo>` |   |

### setRulesConfigInfo

Output only. The config info related to backup rules.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-backupdr/latest/V1.RuleConfigInfo>` |

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

### getDataSource

Output only. Resource name of data source which will be used as storage
location for backups taken. Format :
projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}

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

### setDataSource

Output only. Resource name of data source which will be used as storage
location for backups taken. Format :
projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}

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

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

### getCloudSqlInstanceBackupPlanAssociationProperties

Output only. Cloud SQL instance's backup plan association properties.

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

### hasCloudSqlInstanceBackupPlanAssociationProperties

### setCloudSqlInstanceBackupPlanAssociationProperties

Output only. Cloud SQL instance's backup plan association properties.

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

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

### getAlloydbClusterBackupPlanAssociationProperties

Output only. AlloyDB cluster's backup plan association properties.

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

### hasAlloydbClusterBackupPlanAssociationProperties

### setAlloydbClusterBackupPlanAssociationProperties

Output only. AlloyDB cluster's backup plan association properties.

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

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

### getBackupPlanRevisionId

Output only. The user friendly revision ID of the `BackupPlanRevision`.

Example: v0, v1, v2, etc.

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

### setBackupPlanRevisionId

Output only. The user friendly revision ID of the `BackupPlanRevision`.

Example: v0, v1, v2, etc.

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

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

### getBackupPlanRevisionName

Output only. The resource id of the `BackupPlanRevision`.

Format:
`projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}`

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

### setBackupPlanRevisionName

Output only. The resource id of the `BackupPlanRevision`.

Format:
`projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}`

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

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

### getResourceProperties

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