com.azure.resourcemanager.recoveryservicesbackup.models.MabProtectionPolicy 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 com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.util.List;
/**
* Mab container-specific backup policy.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "backupManagementType")
@JsonTypeName("MAB")
@Fluent
public final class MabProtectionPolicy extends ProtectionPolicy {
/*
* Backup schedule of backup policy.
*/
@JsonProperty(value = "schedulePolicy")
private SchedulePolicy schedulePolicy;
/*
* Retention policy details.
*/
@JsonProperty(value = "retentionPolicy")
private RetentionPolicy retentionPolicy;
/**
* Creates an instance of MabProtectionPolicy class.
*/
public MabProtectionPolicy() {
}
/**
* Get the schedulePolicy property: Backup schedule of backup policy.
*
* @return the schedulePolicy value.
*/
public SchedulePolicy schedulePolicy() {
return this.schedulePolicy;
}
/**
* Set the schedulePolicy property: Backup schedule of backup policy.
*
* @param schedulePolicy the schedulePolicy value to set.
* @return the MabProtectionPolicy object itself.
*/
public MabProtectionPolicy withSchedulePolicy(SchedulePolicy schedulePolicy) {
this.schedulePolicy = schedulePolicy;
return this;
}
/**
* Get the retentionPolicy property: Retention policy details.
*
* @return the retentionPolicy value.
*/
public RetentionPolicy retentionPolicy() {
return this.retentionPolicy;
}
/**
* Set the retentionPolicy property: Retention policy details.
*
* @param retentionPolicy the retentionPolicy value to set.
* @return the MabProtectionPolicy object itself.
*/
public MabProtectionPolicy withRetentionPolicy(RetentionPolicy retentionPolicy) {
this.retentionPolicy = retentionPolicy;
return this;
}
/**
* {@inheritDoc}
*/
@Override
public MabProtectionPolicy withProtectedItemsCount(Integer protectedItemsCount) {
super.withProtectedItemsCount(protectedItemsCount);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public MabProtectionPolicy withResourceGuardOperationRequests(List resourceGuardOperationRequests) {
super.withResourceGuardOperationRequests(resourceGuardOperationRequests);
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
@Override
public void validate() {
super.validate();
if (schedulePolicy() != null) {
schedulePolicy().validate();
}
if (retentionPolicy() != null) {
retentionPolicy().validate();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy