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

Message describing a DataSource object.

Datasource object used to represent Datasource details for both admin and
basic view.

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

## 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. Name of the datasource to create. It must have the format`"projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}"`. `{datasource}` cannot be changed after creation. It must be between 3-63 characters long and must be unique within the backup vault. |
| `↳ state` | `int` Output only. The DataSource resource instance state. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Optional. Resource labels to represent user provided metadata. No labels currently defined: |
| `↳ 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. |
| `↳ backup_count` | `int|string` Number of backups in the data source. |
| `↳ etag` | `string` Server specified ETag for the ManagementServer resource to prevent simultaneous updates from overwiting each other. |
| `↳ total_stored_bytes` | `int|string` The number of bytes (metadata and data) stored in this datasource. |
| `↳ config_state` | `int` Output only. The backup configuration state. |
| `↳ backup_config_info` | `https://docs.cloud.google.com/php/docs/reference/cloud-backupdr/latest/V1.BackupConfigInfo` Output only. Details of how the resource is configured for backup. |
| `↳ data_source_gcp_resource` | `https://docs.cloud.google.com/php/docs/reference/cloud-backupdr/latest/V1.DataSourceGcpResource` The backed up resource is a Google Cloud resource. The word 'DataSource' was included in the names to indicate that this is the representation of the Google Cloud resource used within the DataSource object. |
| `↳ data_source_backup_appliance_application` | `https://docs.cloud.google.com/php/docs/reference/cloud-backupdr/latest/V1.DataSourceBackupApplianceApplication` The backed up resource is a backup appliance application. |
| `↳ backup_blocked_by_vault_access_restriction` | `bool` Output only. This field is set to true if the backup is blocked by vault access restriction. |

### getName

Output only. Identifier. Name of the datasource to create.

It must have the
format`"projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}"`.
`{datasource}` cannot be changed after creation. It must be between 3-63
characters long and must be unique within the backup vault.

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

### setName

Output only. Identifier. Name of the datasource to create.

It must have the
format`"projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}"`.
`{datasource}` cannot be changed after creation. It must be between 3-63
characters long and must be unique within the backup vault.

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

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

### getState

Output only. The DataSource resource instance state.

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

### setState

Output only. The DataSource resource instance state.

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

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

### getLabels

Optional. Resource labels to represent user provided metadata.

No labels currently defined:

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

### setLabels

Optional. Resource labels to represent user provided metadata.

No labels currently defined:

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

| **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` |   |

### getBackupCount

Number of backups in the data source.

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

### hasBackupCount

### clearBackupCount

### setBackupCount

Number of backups in the data source.

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

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

### getEtag

Server specified ETag for the ManagementServer resource to prevent
simultaneous updates from overwiting each other.

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

### hasEtag

### clearEtag

### setEtag

Server specified ETag for the ManagementServer resource to prevent
simultaneous updates from overwiting each other.

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

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

### getTotalStoredBytes

The number of bytes (metadata and data) stored in this datasource.

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

### hasTotalStoredBytes

### clearTotalStoredBytes

### setTotalStoredBytes

The number of bytes (metadata and data) stored in this datasource.

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

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

### getConfigState

Output only. The backup configuration state.

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

### setConfigState

Output only. The backup configuration state.

| **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` |   |

### getBackupConfigInfo

Output only. Details of how the resource is configured for backup.

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

### hasBackupConfigInfo

### clearBackupConfigInfo

### setBackupConfigInfo

Output only. Details of how the resource is configured for backup.

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

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

### getDataSourceGcpResource

The backed up resource is a Google Cloud resource.

The word 'DataSource' was included in the names to indicate that this is
the representation of the Google Cloud resource used within the
DataSource object.

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

### hasDataSourceGcpResource

### setDataSourceGcpResource

The backed up resource is a Google Cloud resource.

The word 'DataSource' was included in the names to indicate that this is
the representation of the Google Cloud resource used within the
DataSource object.

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

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

### getDataSourceBackupApplianceApplication

The backed up resource is a backup appliance application.

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

### hasDataSourceBackupApplianceApplication

### setDataSourceBackupApplianceApplication

The backed up resource is a backup appliance application.

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

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

### getBackupBlockedByVaultAccessRestriction

Output only. This field is set to true if the backup is blocked by vault
access restriction.

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

### setBackupBlockedByVaultAccessRestriction

Output only. This field is set to true if the backup is blocked by vault
access restriction.

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

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

### getSourceResource

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