Google Cloud Sql Admin V1 Client - Class BackupRetentionSettings (0.19.0)

Reference documentation and code samples for the Google Cloud Sql Admin V1 Client class BackupRetentionSettings.

We currently only support backup retention by specifying the number of backups we will retain.

Generated from protobuf message google.cloud.sql.v1.BackupRetentionSettings

Namespace

Google \ Cloud \ Sql \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ retention_unit int

The unit that 'retained_backups' represents.

↳ retained_backups Google\Protobuf\Int32Value

Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is 'COUNT', we will retain this many backups.

getRetentionUnit

The unit that 'retained_backups' represents.

Returns
Type Description
int

setRetentionUnit

The unit that 'retained_backups' represents.

Parameter
Name Description
var int
Returns
Type Description
$this

getRetainedBackups

Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is 'COUNT', we will retain this many backups.

Returns
Type Description
Google\Protobuf\Int32Value|null

hasRetainedBackups

clearRetainedBackups

getRetainedBackupsValue

Returns the unboxed value from getRetainedBackups()

Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is 'COUNT', we will retain this many backups.

Returns
Type Description
int|null

setRetainedBackups

Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is 'COUNT', we will retain this many backups.

Parameter
Name Description
var Google\Protobuf\Int32Value
Returns
Type Description
$this

setRetainedBackupsValue

Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object.

Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is 'COUNT', we will retain this many backups.

Parameter
Name Description
var int|null
Returns
Type Description
$this