Del via


BaseLongTermRetentionPolicyProperties Class

  • java.lang.Object
    • com.azure.resourcemanager.sql.fluent.models.BaseLongTermRetentionPolicyProperties

Implements

public final class BaseLongTermRetentionPolicyProperties
implements JsonSerializable<BaseLongTermRetentionPolicyProperties>

Properties of a long term retention policy.

Constructor Summary

Constructor Description
BaseLongTermRetentionPolicyProperties()

Creates an instance of BaseLongTermRetentionPolicyProperties class.

Method Summary

Modifier and Type Method and Description
static BaseLongTermRetentionPolicyProperties fromJson(JsonReader jsonReader)

Reads an instance of BaseLongTermRetentionPolicyProperties from the JsonReader.

String monthlyRetention()

Get the monthlyRetention property: The monthly retention policy for an LTR backup in an ISO 8601 format.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

String weeklyRetention()

Get the weeklyRetention property: The weekly retention policy for an LTR backup in an ISO 8601 format.

Integer weekOfYear()

Get the weekOfYear property: The week of year to take the yearly backup in an ISO 8601 format.

BaseLongTermRetentionPolicyProperties withMonthlyRetention(String monthlyRetention)

Set the monthlyRetention property: The monthly retention policy for an LTR backup in an ISO 8601 format.

BaseLongTermRetentionPolicyProperties withWeeklyRetention(String weeklyRetention)

Set the weeklyRetention property: The weekly retention policy for an LTR backup in an ISO 8601 format.

BaseLongTermRetentionPolicyProperties withWeekOfYear(Integer weekOfYear)

Set the weekOfYear property: The week of year to take the yearly backup in an ISO 8601 format.

BaseLongTermRetentionPolicyProperties withYearlyRetention(String yearlyRetention)

Set the yearlyRetention property: The yearly retention policy for an LTR backup in an ISO 8601 format.

String yearlyRetention()

Get the yearlyRetention property: The yearly retention policy for an LTR backup in an ISO 8601 format.

Methods inherited from java.lang.Object

Constructor Details

BaseLongTermRetentionPolicyProperties

public BaseLongTermRetentionPolicyProperties()

Creates an instance of BaseLongTermRetentionPolicyProperties class.

Method Details

fromJson

public static BaseLongTermRetentionPolicyProperties fromJson(JsonReader jsonReader)

Reads an instance of BaseLongTermRetentionPolicyProperties from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of BaseLongTermRetentionPolicyProperties if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the BaseLongTermRetentionPolicyProperties.

monthlyRetention

public String monthlyRetention()

Get the monthlyRetention property: The monthly retention policy for an LTR backup in an ISO 8601 format.

Returns:

the monthlyRetention value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

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:

the weeklyRetention value.

weekOfYear

public Integer weekOfYear()

Get the weekOfYear property: The week of year to take the yearly backup in an ISO 8601 format.

Returns:

the weekOfYear value.

withMonthlyRetention

public BaseLongTermRetentionPolicyProperties withMonthlyRetention(String monthlyRetention)

Set the monthlyRetention property: The monthly retention policy for an LTR backup in an ISO 8601 format.

Parameters:

monthlyRetention - the monthlyRetention value to set.

Returns:

the BaseLongTermRetentionPolicyProperties object itself.

withWeeklyRetention

public BaseLongTermRetentionPolicyProperties withWeeklyRetention(String weeklyRetention)

Set the weeklyRetention property: The weekly retention policy for an LTR backup in an ISO 8601 format.

Parameters:

weeklyRetention - the weeklyRetention value to set.

Returns:

the BaseLongTermRetentionPolicyProperties object itself.

withWeekOfYear

public BaseLongTermRetentionPolicyProperties withWeekOfYear(Integer weekOfYear)

Set the weekOfYear property: The week of year to take the yearly backup in an ISO 8601 format.

Parameters:

weekOfYear - the weekOfYear value to set.

Returns:

the BaseLongTermRetentionPolicyProperties object itself.

withYearlyRetention

public BaseLongTermRetentionPolicyProperties withYearlyRetention(String yearlyRetention)

Set the yearlyRetention property: The yearly retention policy for an LTR backup in an ISO 8601 format.

Parameters:

yearlyRetention - the yearlyRetention value to set.

Returns:

the BaseLongTermRetentionPolicyProperties object itself.

yearlyRetention

public String yearlyRetention()

Get the yearlyRetention property: The yearly retention policy for an LTR backup in an ISO 8601 format.

Returns:

the yearlyRetention value.

Applies to