com.azure.resourcemanager.recoveryservicesbackup.models.GenericProtectionPolicy 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;
/**
* Azure VM (Mercury) workload-specific backup policy.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "backupManagementType")
@JsonTypeName("GenericProtectionPolicy")
@Fluent
public final class GenericProtectionPolicy extends ProtectionPolicy {
/*
* List of sub-protection policies which includes schedule and retention
*/
@JsonProperty(value = "subProtectionPolicy")
private List subProtectionPolicy;
/*
* TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time".
*/
@JsonProperty(value = "timeZone")
private String timeZone;
/*
* Name of this policy's fabric.
*/
@JsonProperty(value = "fabricName")
private String fabricName;
/**
* Creates an instance of GenericProtectionPolicy class.
*/
public GenericProtectionPolicy() {
}
/**
* Get the subProtectionPolicy property: List of sub-protection policies which includes schedule and retention.
*
* @return the subProtectionPolicy value.
*/
public List subProtectionPolicy() {
return this.subProtectionPolicy;
}
/**
* Set the subProtectionPolicy property: List of sub-protection policies which includes schedule and retention.
*
* @param subProtectionPolicy the subProtectionPolicy value to set.
* @return the GenericProtectionPolicy object itself.
*/
public GenericProtectionPolicy withSubProtectionPolicy(List subProtectionPolicy) {
this.subProtectionPolicy = subProtectionPolicy;
return this;
}
/**
* Get the timeZone property: TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time".
*
* @return the timeZone value.
*/
public String timeZone() {
return this.timeZone;
}
/**
* Set the timeZone property: TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time".
*
* @param timeZone the timeZone value to set.
* @return the GenericProtectionPolicy object itself.
*/
public GenericProtectionPolicy withTimeZone(String timeZone) {
this.timeZone = timeZone;
return this;
}
/**
* Get the fabricName property: Name of this policy's fabric.
*
* @return the fabricName value.
*/
public String fabricName() {
return this.fabricName;
}
/**
* Set the fabricName property: Name of this policy's fabric.
*
* @param fabricName the fabricName value to set.
* @return the GenericProtectionPolicy object itself.
*/
public GenericProtectionPolicy withFabricName(String fabricName) {
this.fabricName = fabricName;
return this;
}
/**
* {@inheritDoc}
*/
@Override
public GenericProtectionPolicy withProtectedItemsCount(Integer protectedItemsCount) {
super.withProtectedItemsCount(protectedItemsCount);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public GenericProtectionPolicy 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 (subProtectionPolicy() != null) {
subProtectionPolicy().forEach(e -> e.validate());
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy