# Backup and DR Service V1 API - Class Google::Cloud::BackupDR::V1::BackupLock (v1.10.0)

1.10.0 (latest) 1.9.0 1.8.0 1.7.0 1.6.0 1.5.0 1.4.1 1.3.0 1.2.0 1.1.0 1.0.1 0.5.0 0.4.0 0.3.0 0.2.1 0.1.0 Reference documentation and code samples for the Backup and DR Service V1 API class Google::Cloud::BackupDR::V1::BackupLock.

BackupLock represents a single lock on a Backup resource. An unexpired
lock on a Backup prevents the Backup from being deleted.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #backup_appliance_lock_info

    def backup_appliance_lock_info() -> ::Google::Cloud::BackupDR::V1::BackupApplianceLockInfo

**Returns**

- ([::Google::Cloud::BackupDR::V1::BackupApplianceLockInfo](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-backupdr-v1/latest/Google-Cloud-BackupDR-V1-BackupApplianceLockInfo)) --- If the client is a backup and recovery appliance, this contains metadata about why the lock exists.


  Note: The following fields are mutually exclusive: `backup_appliance_lock_info`, `service_lock_info`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #backup_appliance_lock_info=

    def backup_appliance_lock_info=(value) -> ::Google::Cloud::BackupDR::V1::BackupApplianceLockInfo

**Parameter**

- **value** ([::Google::Cloud::BackupDR::V1::BackupApplianceLockInfo](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-backupdr-v1/latest/Google-Cloud-BackupDR-V1-BackupApplianceLockInfo)) --- If the client is a backup and recovery appliance, this contains metadata about why the lock exists.


  Note: The following fields are mutually exclusive: `backup_appliance_lock_info`, `service_lock_info`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::BackupDR::V1::BackupApplianceLockInfo](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-backupdr-v1/latest/Google-Cloud-BackupDR-V1-BackupApplianceLockInfo)) --- If the client is a backup and recovery appliance, this contains metadata about why the lock exists.


  Note: The following fields are mutually exclusive: `backup_appliance_lock_info`, `service_lock_info`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #lock_until_time

    def lock_until_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-backupdr-v1/latest/Google-Protobuf-Timestamp)) --- Required. The time after which this lock is not considered valid and will no longer protect the Backup from deletion.

### #lock_until_time=

    def lock_until_time=(value) -> ::Google::Protobuf::Timestamp

**Parameter**

- **value** ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-backupdr-v1/latest/Google-Protobuf-Timestamp)) --- Required. The time after which this lock is not considered valid and will no longer protect the Backup from deletion.
**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-backupdr-v1/latest/Google-Protobuf-Timestamp)) --- Required. The time after which this lock is not considered valid and will no longer protect the Backup from deletion.

### #service_lock_info

    def service_lock_info() -> ::Google::Cloud::BackupDR::V1::ServiceLockInfo

**Returns**

- ([::Google::Cloud::BackupDR::V1::ServiceLockInfo](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-backupdr-v1/latest/Google-Cloud-BackupDR-V1-ServiceLockInfo)) --- Output only. Contains metadata about the lock exist for Google Cloud native backups.


  Note: The following fields are mutually exclusive: `service_lock_info`, `backup_appliance_lock_info`. If a field in that set is populated, all other fields in the set will automatically be cleared.