com.azure.resourcemanager.recoveryservicesbackup.models.MonthlyRetentionSchedule Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-recoveryservicesbackup Show documentation
Show all versions of azure-resourcemanager-recoveryservicesbackup Show documentation
This package contains Microsoft Azure SDK for RecoveryServicesBackup Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Open API 2.0 Specs for Azure RecoveryServices Backup service. Package tag package-2024-04.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.recoveryservicesbackup.models;
import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.List;
/**
* Monthly retention schedule.
*/
@Fluent
public final class MonthlyRetentionSchedule {
/*
* Retention schedule format type for monthly retention policy.
*/
@JsonProperty(value = "retentionScheduleFormatType")
private RetentionScheduleFormat retentionScheduleFormatType;
/*
* Daily retention format for monthly retention policy.
*/
@JsonProperty(value = "retentionScheduleDaily")
private DailyRetentionFormat retentionScheduleDaily;
/*
* Weekly retention format for monthly retention policy.
*/
@JsonProperty(value = "retentionScheduleWeekly")
private WeeklyRetentionFormat retentionScheduleWeekly;
/*
* Retention times of retention policy.
*/
@JsonProperty(value = "retentionTimes")
private List retentionTimes;
/*
* Retention duration of retention Policy.
*/
@JsonProperty(value = "retentionDuration")
private RetentionDuration retentionDuration;
/**
* Creates an instance of MonthlyRetentionSchedule class.
*/
public MonthlyRetentionSchedule() {
}
/**
* Get the retentionScheduleFormatType property: Retention schedule format type for monthly retention policy.
*
* @return the retentionScheduleFormatType value.
*/
public RetentionScheduleFormat retentionScheduleFormatType() {
return this.retentionScheduleFormatType;
}
/**
* Set the retentionScheduleFormatType property: Retention schedule format type for monthly retention policy.
*
* @param retentionScheduleFormatType the retentionScheduleFormatType value to set.
* @return the MonthlyRetentionSchedule object itself.
*/
public MonthlyRetentionSchedule
withRetentionScheduleFormatType(RetentionScheduleFormat retentionScheduleFormatType) {
this.retentionScheduleFormatType = retentionScheduleFormatType;
return this;
}
/**
* Get the retentionScheduleDaily property: Daily retention format for monthly retention policy.
*
* @return the retentionScheduleDaily value.
*/
public DailyRetentionFormat retentionScheduleDaily() {
return this.retentionScheduleDaily;
}
/**
* Set the retentionScheduleDaily property: Daily retention format for monthly retention policy.
*
* @param retentionScheduleDaily the retentionScheduleDaily value to set.
* @return the MonthlyRetentionSchedule object itself.
*/
public MonthlyRetentionSchedule withRetentionScheduleDaily(DailyRetentionFormat retentionScheduleDaily) {
this.retentionScheduleDaily = retentionScheduleDaily;
return this;
}
/**
* Get the retentionScheduleWeekly property: Weekly retention format for monthly retention policy.
*
* @return the retentionScheduleWeekly value.
*/
public WeeklyRetentionFormat retentionScheduleWeekly() {
return this.retentionScheduleWeekly;
}
/**
* Set the retentionScheduleWeekly property: Weekly retention format for monthly retention policy.
*
* @param retentionScheduleWeekly the retentionScheduleWeekly value to set.
* @return the MonthlyRetentionSchedule object itself.
*/
public MonthlyRetentionSchedule withRetentionScheduleWeekly(WeeklyRetentionFormat retentionScheduleWeekly) {
this.retentionScheduleWeekly = retentionScheduleWeekly;
return this;
}
/**
* Get the retentionTimes property: Retention times of retention policy.
*
* @return the retentionTimes value.
*/
public List retentionTimes() {
return this.retentionTimes;
}
/**
* Set the retentionTimes property: Retention times of retention policy.
*
* @param retentionTimes the retentionTimes value to set.
* @return the MonthlyRetentionSchedule object itself.
*/
public MonthlyRetentionSchedule withRetentionTimes(List retentionTimes) {
this.retentionTimes = retentionTimes;
return this;
}
/**
* Get the retentionDuration property: Retention duration of retention Policy.
*
* @return the retentionDuration value.
*/
public RetentionDuration retentionDuration() {
return this.retentionDuration;
}
/**
* Set the retentionDuration property: Retention duration of retention Policy.
*
* @param retentionDuration the retentionDuration value to set.
* @return the MonthlyRetentionSchedule object itself.
*/
public MonthlyRetentionSchedule withRetentionDuration(RetentionDuration retentionDuration) {
this.retentionDuration = retentionDuration;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (retentionScheduleDaily() != null) {
retentionScheduleDaily().validate();
}
if (retentionScheduleWeekly() != null) {
retentionScheduleWeekly().validate();
}
if (retentionDuration() != null) {
retentionDuration().validate();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy