# Interface DataSourceOrBuilder (0.50.0)

0.50.0 (latest) 0.47.0 0.46.0 0.44.0 0.42.0 0.41.0 0.40.0 0.39.0 0.37.0 0.35.0 0.34.0 0.33.0 0.32.0 0.31.0 0.29.0 0.27.0 0.26.0 0.23.0 0.22.0 0.21.0 0.19.0 0.18.0 0.17.0 0.16.0 0.15.0 0.14.0 0.13.0 0.12.0 0.11.0 0.10.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.0 0.3.0 0.2.0 0.1.0

    public interface DataSourceOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### containsLabels(String key)

    public abstract boolean containsLabels(String key)

Optional. Resource labels to represent user provided metadata.
No labels currently defined:

`map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getBackupBlockedByVaultAccessRestriction()

    public abstract boolean getBackupBlockedByVaultAccessRestriction()

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

`
bool backup_blocked_by_vault_access_restriction = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The backupBlockedByVaultAccessRestriction. |

### getBackupConfigInfo()

    public abstract BackupConfigInfo getBackupConfigInfo()

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

`
.google.cloud.backupdr.v1.BackupConfigInfo backup_config_info = 25 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-backupdr/latest/com.google.cloud.backupdr.v1.BackupConfigInfo` | The backupConfigInfo. |

### getBackupConfigInfoOrBuilder()

    public abstract BackupConfigInfoOrBuilder getBackupConfigInfoOrBuilder()

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

`
.google.cloud.backupdr.v1.BackupConfigInfo backup_config_info = 25 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-backupdr/latest/com.google.cloud.backupdr.v1.BackupConfigInfoOrBuilder` |   |

### getBackupCount()

    public abstract long getBackupCount()

Number of backups in the data source.

`optional int64 backup_count = 7;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The backupCount. |

### getConfigState()

    public abstract BackupConfigState getConfigState()

Output only. The backup configuration state.

`
.google.cloud.backupdr.v1.BackupConfigState config_state = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-backupdr/latest/com.google.cloud.backupdr.v1.BackupConfigState` | The configState. |

### getConfigStateValue()

    public abstract int getConfigStateValue()

Output only. The backup configuration state.

`
.google.cloud.backupdr.v1.BackupConfigState config_state = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for configState. |

### getCreateTime()

    public abstract Timestamp getCreateTime()

Output only. The time when the instance was created.

`
optional .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` | The createTime. |

### getCreateTimeOrBuilder()

    public abstract TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The time when the instance was created.

`
optional .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder.html` |   |

### getDataSourceBackupApplianceApplication()

    public abstract DataSourceBackupApplianceApplication getDataSourceBackupApplianceApplication()

The backed up resource is a backup appliance application.

`
.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication data_source_backup_appliance_application = 27;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-backupdr/latest/com.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication` | The dataSourceBackupApplianceApplication. |

### getDataSourceBackupApplianceApplicationOrBuilder()

    public abstract DataSourceBackupApplianceApplicationOrBuilder getDataSourceBackupApplianceApplicationOrBuilder()

The backed up resource is a backup appliance application.

`
.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication data_source_backup_appliance_application = 27;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-backupdr/latest/com.google.cloud.backupdr.v1.DataSourceBackupApplianceApplicationOrBuilder` |   |

### getDataSourceGcpResource()

    public abstract DataSourceGcpResource 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.

`.google.cloud.backupdr.v1.DataSourceGcpResource data_source_gcp_resource = 26;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-backupdr/latest/com.google.cloud.backupdr.v1.DataSourceGcpResource` | The dataSourceGcpResource. |

### getDataSourceGcpResourceOrBuilder()

    public abstract DataSourceGcpResourceOrBuilder getDataSourceGcpResourceOrBuilder()

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.

`.google.cloud.backupdr.v1.DataSourceGcpResource data_source_gcp_resource = 26;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-backupdr/latest/com.google.cloud.backupdr.v1.DataSourceGcpResourceOrBuilder` |   |

### getEtag()

    public abstract String getEtag()

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

`optional string etag = 14;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The etag. |

### getEtagBytes()

    public abstract ByteString getEtagBytes()

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

`optional string etag = 14;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for etag. |

### getLabels() (deprecated)

    public abstract Map<String,String> getLabels()

Use [#getLabelsMap()](https://docs.cloud.google.com/java/docs/reference/google-cloud-backupdr/latest/com.google.cloud.backupdr.v1.DataSourceOrBuilder#com_google_cloud_backupdr_v1_DataSourceOrBuilder_getLabelsMap__) instead.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getLabelsCount()

    public abstract int getLabelsCount()

Optional. Resource labels to represent user provided metadata.
No labels currently defined:

`map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getLabelsMap()

    public abstract Map<String,String> getLabelsMap()

Optional. Resource labels to represent user provided metadata.
No labels currently defined:

`map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getLabelsOrDefault(String key, String defaultValue)

    public abstract String getLabelsOrDefault(String key, String defaultValue)

Optional. Resource labels to represent user provided metadata.
No labels currently defined:

`map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |
| `defaultValue` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getLabelsOrThrow(String key)

    public abstract String getLabelsOrThrow(String key)

Optional. Resource labels to represent user provided metadata.
No labels currently defined:

`map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getName()

    public abstract String 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.

`
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The name. |

### getNameBytes()

    public abstract ByteString getNameBytes()

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.

`
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for name. |

### getSourceResourceCase()

    public abstract DataSource.SourceResourceCase getSourceResourceCase()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-backupdr/latest/com.google.cloud.backupdr.v1.DataSource.SourceResourceCase` |   |

### getState()

    public abstract DataSource.State getState()

Output only. The DataSource resource instance state.

`
.google.cloud.backupdr.v1.DataSource.State state = 21 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-backupdr/latest/com.google.cloud.backupdr.v1.DataSource.State` | The state. |

### getStateValue()

    public abstract int getStateValue()

Output only. The DataSource resource instance state.

`
.google.cloud.backupdr.v1.DataSource.State state = 21 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for state. |

### getTotalStoredBytes()

    public abstract long getTotalStoredBytes()

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

`optional int64 total_stored_bytes = 23;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The totalStoredBytes. |

### getUpdateTime()

    public abstract Timestamp getUpdateTime()

Output only. The time when the instance was updated.

`
optional .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` | The updateTime. |

### getUpdateTimeOrBuilder()

    public abstract TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. The time when the instance was updated.

`
optional .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder.html` |   |

### hasBackupConfigInfo()

    public abstract boolean hasBackupConfigInfo()

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

`
.google.cloud.backupdr.v1.BackupConfigInfo backup_config_info = 25 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the backupConfigInfo field is set. |

### hasBackupCount()

    public abstract boolean hasBackupCount()

Number of backups in the data source.

`optional int64 backup_count = 7;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the backupCount field is set. |

### hasCreateTime()

    public abstract boolean hasCreateTime()

Output only. The time when the instance was created.

`
optional .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the createTime field is set. |

### hasDataSourceBackupApplianceApplication()

    public abstract boolean hasDataSourceBackupApplianceApplication()

The backed up resource is a backup appliance application.

`
.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication data_source_backup_appliance_application = 27;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the dataSourceBackupApplianceApplication field is set. |

### hasDataSourceGcpResource()

    public abstract boolean hasDataSourceGcpResource()

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.

`.google.cloud.backupdr.v1.DataSourceGcpResource data_source_gcp_resource = 26;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the dataSourceGcpResource field is set. |

### hasEtag()

    public abstract boolean hasEtag()

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

`optional string etag = 14;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the etag field is set. |

### hasTotalStoredBytes()

    public abstract boolean hasTotalStoredBytes()

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

`optional int64 total_stored_bytes = 23;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the totalStoredBytes field is set. |

### hasUpdateTime()

    public abstract boolean hasUpdateTime()

Output only. The time when the instance was updated.

`
optional .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the updateTime field is set. |