# Google Cloud Backup Dr V1 Client - Class DataSourceReference (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 DataSourceReference.

DataSourceReference is a reference to a DataSource resource.

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

## Namespace

Google \\ Cloud \\ BackupDR \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Identifier. The resource name of the DataSourceReference. Format: projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference} |
| `↳ data_source` | `string` Output only. The resource name of the DataSource. Format: projects/{project}/locations/{location}/backupVaults/{backupVault}/dataSources/{dataSource} |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The time when the DataSourceReference was created. |
| `↳ data_source_backup_config_state` | `int` Output only. The backup configuration state of the DataSource. |
| `↳ data_source_backup_count` | `int|string` Output only. Number of backups in the DataSource. |
| `↳ data_source_backup_config_info` | `https://docs.cloud.google.com/php/docs/reference/cloud-backupdr/latest/V1.DataSourceBackupConfigInfo` Output only. Information of backup configuration on the DataSource. |
| `↳ data_source_gcp_resource_info` | `https://docs.cloud.google.com/php/docs/reference/cloud-backupdr/latest/V1.DataSourceGcpResourceInfo` Output only. The GCP resource that the DataSource is associated with. |
| `↳ total_stored_bytes` | `int|string` Output only. Total size of the storage used by all backup resources for the referenced datasource. |

### getName

Identifier. The resource name of the DataSourceReference.

Format:
projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}

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

### setName

Identifier. The resource name of the DataSourceReference.

Format:
projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}

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

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

### getDataSource

Output only. The resource name of the DataSource.

Format:
projects/{project}/locations/{location}/backupVaults/{backupVault}/dataSources/{dataSource}

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

### setDataSource

Output only. The resource name of the DataSource.

Format:
projects/{project}/locations/{location}/backupVaults/{backupVault}/dataSources/{dataSource}

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

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

### getCreateTime

Output only. The time when the DataSourceReference 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 DataSourceReference was created.

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

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

### getDataSourceBackupConfigState

Output only. The backup configuration state of the DataSource.

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

### setDataSourceBackupConfigState

Output only. The backup configuration state of the DataSource.

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

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

### getDataSourceBackupCount

Output only. Number of backups in the DataSource.

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

### setDataSourceBackupCount

Output only. Number of backups in the DataSource.

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

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

### getDataSourceBackupConfigInfo

Output only. Information of backup configuration on the DataSource.

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

### hasDataSourceBackupConfigInfo

### clearDataSourceBackupConfigInfo

### setDataSourceBackupConfigInfo

Output only. Information of backup configuration on the DataSource.

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

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

### getDataSourceGcpResourceInfo

Output only. The GCP resource that the DataSource is associated with.

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

### hasDataSourceGcpResourceInfo

### clearDataSourceGcpResourceInfo

### setDataSourceGcpResourceInfo

Output only. The GCP resource that the DataSource is associated with.

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

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

### getTotalStoredBytes

Output only. Total size of the storage used by all backup resources for the
referenced datasource.

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

### hasTotalStoredBytes

### clearTotalStoredBytes

### setTotalStoredBytes

Output only. Total size of the storage used by all backup resources for the
referenced datasource.

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

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