LongTermRetentionPolicyInner Class
- java.
lang. Object - com.
azure. core. management. ProxyResource - com.
azure. resourcemanager. sql. fluent. models. LongTermRetentionPolicyInner
- com.
- com.
public final class LongTermRetentionPolicyInner
extends ProxyResource
A long term retention policy.
Constructor Summary
| Constructor | Description |
|---|---|
| LongTermRetentionPolicyInner() |
Creates an instance of Long |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Long |
fromJson(JsonReader jsonReader)
Reads an instance of Long |
| String |
id()
Get the id property: Fully qualified resource Id for the resource. |
| String |
monthlyRetention()
Get the monthly |
| String |
name()
Get the name property: The name of the resource. |
|
System |
systemData()
Get the system |
|
Time |
timeBasedImmutability()
Get the time |
|
Time |
timeBasedImmutabilityMode()
Get the time |
|
Json |
toJson(JsonWriter jsonWriter) |
| String |
type()
Get the type property: The type of the resource. |
| void |
validate()
Validates the instance. |
| String |
weeklyRetention()
Get the weekly |
| Integer |
weekOfYear()
Get the week |
|
Long |
withMonthlyRetention(String monthlyRetention)
Set the monthly |
|
Long |
withTimeBasedImmutability(TimeBasedImmutability timeBasedImmutability)
Set the time |
|
Long |
withTimeBasedImmutabilityMode(TimeBasedImmutabilityMode timeBasedImmutabilityMode)
Set the time |
|
Long |
withWeeklyRetention(String weeklyRetention)
Set the weekly |
|
Long |
withWeekOfYear(Integer weekOfYear)
Set the week |
|
Long |
withYearlyRetention(String yearlyRetention)
Set the yearly |
| String |
yearlyRetention()
Get the yearly |
Methods inherited from ProxyResource
Methods inherited from java.lang.Object
Constructor Details
LongTermRetentionPolicyInner
public LongTermRetentionPolicyInner()
Creates an instance of LongTermRetentionPolicyInner class.
Method Details
fromJson
public static LongTermRetentionPolicyInner fromJson(JsonReader jsonReader)
Reads an instance of LongTermRetentionPolicyInner from the JsonReader.
Parameters:
Returns:
Throws:
id
public String id()
Get the id property: Fully qualified resource Id for the resource.
Overrides:
LongTermRetentionPolicyInner.id()Returns:
monthlyRetention
public String monthlyRetention()
Get the monthlyRetention property: The monthly retention policy for an LTR backup in an ISO 8601 format.
Returns:
name
public String name()
Get the name property: The name of the resource.
Overrides:
LongTermRetentionPolicyInner.name()Returns:
systemData
public SystemData systemData()
Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
Returns:
timeBasedImmutability
public TimeBasedImmutability timeBasedImmutability()
Get the timeBasedImmutability property: The setting for whether to enable time-based immutability for future backups. When set, future backups will have TimeBasedImmutability enabled.
Returns:
timeBasedImmutabilityMode
public TimeBasedImmutabilityMode timeBasedImmutabilityMode()
Get the timeBasedImmutabilityMode property: The setting for time-based immutability mode for future backup (Value can be either Locked or UnLocked. Only effective if TimeBasedImmutability is enabled). Caution: Immutability of LTR backup cannot be removed if TimeBasedImmutabilityMode is Locked.
Returns:
toJson
public JsonWriter toJson(JsonWriter jsonWriter)
Overrides:
LongTermRetentionPolicyInner.toJson(JsonWriter jsonWriter)Parameters:
Throws:
type
public String type()
Get the type property: The type of the resource.
Overrides:
LongTermRetentionPolicyInner.type()Returns:
validate
public void validate()
Validates the instance.
weeklyRetention
public String weeklyRetention()
Get the weeklyRetention property: The weekly retention policy for an LTR backup in an ISO 8601 format.
Returns:
weekOfYear
public Integer weekOfYear()
Get the weekOfYear property: The week of year to take the yearly backup in an ISO 8601 format.
Returns:
withMonthlyRetention
public LongTermRetentionPolicyInner withMonthlyRetention(String monthlyRetention)
Set the monthlyRetention property: The monthly retention policy for an LTR backup in an ISO 8601 format.
Parameters:
Returns:
withTimeBasedImmutability
public LongTermRetentionPolicyInner withTimeBasedImmutability(TimeBasedImmutability timeBasedImmutability)
Set the timeBasedImmutability property: The setting for whether to enable time-based immutability for future backups. When set, future backups will have TimeBasedImmutability enabled.
Parameters:
Returns:
withTimeBasedImmutabilityMode
public LongTermRetentionPolicyInner withTimeBasedImmutabilityMode(TimeBasedImmutabilityMode timeBasedImmutabilityMode)
Set the timeBasedImmutabilityMode property: The setting for time-based immutability mode for future backup (Value can be either Locked or UnLocked. Only effective if TimeBasedImmutability is enabled). Caution: Immutability of LTR backup cannot be removed if TimeBasedImmutabilityMode is Locked.
Parameters:
Returns:
withWeeklyRetention
public LongTermRetentionPolicyInner withWeeklyRetention(String weeklyRetention)
Set the weeklyRetention property: The weekly retention policy for an LTR backup in an ISO 8601 format.
Parameters:
Returns:
withWeekOfYear
public LongTermRetentionPolicyInner withWeekOfYear(Integer weekOfYear)
Set the weekOfYear property: The week of year to take the yearly backup in an ISO 8601 format.
Parameters:
Returns:
withYearlyRetention
public LongTermRetentionPolicyInner withYearlyRetention(String yearlyRetention)
Set the yearlyRetention property: The yearly retention policy for an LTR backup in an ISO 8601 format.
Parameters:
Returns:
yearlyRetention
public String yearlyRetention()
Get the yearlyRetention property: The yearly retention policy for an LTR backup in an ISO 8601 format.
Returns: