
com.azure.resourcemanager.netapp.fluent.models.BackupPolicyInner Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-netapp Show documentation
Show all versions of azure-resourcemanager-netapp Show documentation
This package contains Microsoft Azure SDK for NetAppFiles Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft NetApp Files Azure Resource Provider specification. Package tag package-preview-2024-07-01-preview.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.netapp.fluent.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.netapp.models.VolumeBackups;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;
/**
* Backup policy information.
*/
@Fluent
public final class BackupPolicyInner extends Resource {
/*
* A unique read-only string that changes whenever the resource is updated.
*/
@JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
private String etag;
/*
* Backup policy Properties
*/
@JsonProperty(value = "properties", required = true)
private BackupPolicyProperties innerProperties = new BackupPolicyProperties();
/*
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
/**
* Creates an instance of BackupPolicyInner class.
*/
public BackupPolicyInner() {
}
/**
* Get the etag property: A unique read-only string that changes whenever the resource is updated.
*
* @return the etag value.
*/
public String etag() {
return this.etag;
}
/**
* Get the innerProperties property: Backup policy Properties.
*
* @return the innerProperties value.
*/
private BackupPolicyProperties innerProperties() {
return this.innerProperties;
}
/**
* Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* @return the systemData value.
*/
public SystemData systemData() {
return this.systemData;
}
/**
* {@inheritDoc}
*/
@Override
public BackupPolicyInner withLocation(String location) {
super.withLocation(location);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public BackupPolicyInner withTags(Map tags) {
super.withTags(tags);
return this;
}
/**
* Get the backupPolicyId property: Backup Policy Resource ID.
*
* @return the backupPolicyId value.
*/
public String backupPolicyId() {
return this.innerProperties() == null ? null : this.innerProperties().backupPolicyId();
}
/**
* Get the provisioningState property: Azure lifecycle management.
*
* @return the provisioningState value.
*/
public String provisioningState() {
return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
}
/**
* Get the dailyBackupsToKeep property: Daily backups count to keep.
*
* @return the dailyBackupsToKeep value.
*/
public Integer dailyBackupsToKeep() {
return this.innerProperties() == null ? null : this.innerProperties().dailyBackupsToKeep();
}
/**
* Set the dailyBackupsToKeep property: Daily backups count to keep.
*
* @param dailyBackupsToKeep the dailyBackupsToKeep value to set.
* @return the BackupPolicyInner object itself.
*/
public BackupPolicyInner withDailyBackupsToKeep(Integer dailyBackupsToKeep) {
if (this.innerProperties() == null) {
this.innerProperties = new BackupPolicyProperties();
}
this.innerProperties().withDailyBackupsToKeep(dailyBackupsToKeep);
return this;
}
/**
* Get the weeklyBackupsToKeep property: Weekly backups count to keep.
*
* @return the weeklyBackupsToKeep value.
*/
public Integer weeklyBackupsToKeep() {
return this.innerProperties() == null ? null : this.innerProperties().weeklyBackupsToKeep();
}
/**
* Set the weeklyBackupsToKeep property: Weekly backups count to keep.
*
* @param weeklyBackupsToKeep the weeklyBackupsToKeep value to set.
* @return the BackupPolicyInner object itself.
*/
public BackupPolicyInner withWeeklyBackupsToKeep(Integer weeklyBackupsToKeep) {
if (this.innerProperties() == null) {
this.innerProperties = new BackupPolicyProperties();
}
this.innerProperties().withWeeklyBackupsToKeep(weeklyBackupsToKeep);
return this;
}
/**
* Get the monthlyBackupsToKeep property: Monthly backups count to keep.
*
* @return the monthlyBackupsToKeep value.
*/
public Integer monthlyBackupsToKeep() {
return this.innerProperties() == null ? null : this.innerProperties().monthlyBackupsToKeep();
}
/**
* Set the monthlyBackupsToKeep property: Monthly backups count to keep.
*
* @param monthlyBackupsToKeep the monthlyBackupsToKeep value to set.
* @return the BackupPolicyInner object itself.
*/
public BackupPolicyInner withMonthlyBackupsToKeep(Integer monthlyBackupsToKeep) {
if (this.innerProperties() == null) {
this.innerProperties = new BackupPolicyProperties();
}
this.innerProperties().withMonthlyBackupsToKeep(monthlyBackupsToKeep);
return this;
}
/**
* Get the volumesAssigned property: Volumes using current backup policy.
*
* @return the volumesAssigned value.
*/
public Integer volumesAssigned() {
return this.innerProperties() == null ? null : this.innerProperties().volumesAssigned();
}
/**
* Get the enabled property: The property to decide policy is enabled or not.
*
* @return the enabled value.
*/
public Boolean enabled() {
return this.innerProperties() == null ? null : this.innerProperties().enabled();
}
/**
* Set the enabled property: The property to decide policy is enabled or not.
*
* @param enabled the enabled value to set.
* @return the BackupPolicyInner object itself.
*/
public BackupPolicyInner withEnabled(Boolean enabled) {
if (this.innerProperties() == null) {
this.innerProperties = new BackupPolicyProperties();
}
this.innerProperties().withEnabled(enabled);
return this;
}
/**
* Get the volumeBackups property: A list of volumes assigned to this policy.
*
* @return the volumeBackups value.
*/
public List volumeBackups() {
return this.innerProperties() == null ? null : this.innerProperties().volumeBackups();
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (innerProperties() == null) {
throw LOGGER.logExceptionAsError(
new IllegalArgumentException("Missing required property innerProperties in model BackupPolicyInner"));
} else {
innerProperties().validate();
}
}
private static final ClientLogger LOGGER = new ClientLogger(BackupPolicyInner.class);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy