All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.azure.resourcemanager.netapp.fluent.models.BackupPolicyProperties Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 1.6.0-beta.1
Show newest version
// 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.resourcemanager.netapp.models.VolumeBackups;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/**
 * Backup policy properties.
 */
@Fluent
public final class BackupPolicyProperties {
    /*
     * Backup Policy Resource ID
     */
    @JsonProperty(value = "backupPolicyId", access = JsonProperty.Access.WRITE_ONLY)
    private String backupPolicyId;

    /*
     * Azure lifecycle management
     */
    @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
    private String provisioningState;

    /*
     * Daily backups count to keep
     */
    @JsonProperty(value = "dailyBackupsToKeep")
    private Integer dailyBackupsToKeep;

    /*
     * Weekly backups count to keep
     */
    @JsonProperty(value = "weeklyBackupsToKeep")
    private Integer weeklyBackupsToKeep;

    /*
     * Monthly backups count to keep
     */
    @JsonProperty(value = "monthlyBackupsToKeep")
    private Integer monthlyBackupsToKeep;

    /*
     * Volumes using current backup policy
     */
    @JsonProperty(value = "volumesAssigned", access = JsonProperty.Access.WRITE_ONLY)
    private Integer volumesAssigned;

    /*
     * The property to decide policy is enabled or not
     */
    @JsonProperty(value = "enabled")
    private Boolean enabled;

    /*
     * A list of volumes assigned to this policy
     */
    @JsonProperty(value = "volumeBackups", access = JsonProperty.Access.WRITE_ONLY)
    private List volumeBackups;

    /**
     * Creates an instance of BackupPolicyProperties class.
     */
    public BackupPolicyProperties() {
    }

    /**
     * Get the backupPolicyId property: Backup Policy Resource ID.
     * 
     * @return the backupPolicyId value.
     */
    public String backupPolicyId() {
        return this.backupPolicyId;
    }

    /**
     * Get the provisioningState property: Azure lifecycle management.
     * 
     * @return the provisioningState value.
     */
    public String provisioningState() {
        return this.provisioningState;
    }

    /**
     * Get the dailyBackupsToKeep property: Daily backups count to keep.
     * 
     * @return the dailyBackupsToKeep value.
     */
    public Integer dailyBackupsToKeep() {
        return this.dailyBackupsToKeep;
    }

    /**
     * Set the dailyBackupsToKeep property: Daily backups count to keep.
     * 
     * @param dailyBackupsToKeep the dailyBackupsToKeep value to set.
     * @return the BackupPolicyProperties object itself.
     */
    public BackupPolicyProperties withDailyBackupsToKeep(Integer dailyBackupsToKeep) {
        this.dailyBackupsToKeep = dailyBackupsToKeep;
        return this;
    }

    /**
     * Get the weeklyBackupsToKeep property: Weekly backups count to keep.
     * 
     * @return the weeklyBackupsToKeep value.
     */
    public Integer weeklyBackupsToKeep() {
        return this.weeklyBackupsToKeep;
    }

    /**
     * Set the weeklyBackupsToKeep property: Weekly backups count to keep.
     * 
     * @param weeklyBackupsToKeep the weeklyBackupsToKeep value to set.
     * @return the BackupPolicyProperties object itself.
     */
    public BackupPolicyProperties withWeeklyBackupsToKeep(Integer weeklyBackupsToKeep) {
        this.weeklyBackupsToKeep = weeklyBackupsToKeep;
        return this;
    }

    /**
     * Get the monthlyBackupsToKeep property: Monthly backups count to keep.
     * 
     * @return the monthlyBackupsToKeep value.
     */
    public Integer monthlyBackupsToKeep() {
        return this.monthlyBackupsToKeep;
    }

    /**
     * Set the monthlyBackupsToKeep property: Monthly backups count to keep.
     * 
     * @param monthlyBackupsToKeep the monthlyBackupsToKeep value to set.
     * @return the BackupPolicyProperties object itself.
     */
    public BackupPolicyProperties withMonthlyBackupsToKeep(Integer monthlyBackupsToKeep) {
        this.monthlyBackupsToKeep = monthlyBackupsToKeep;
        return this;
    }

    /**
     * Get the volumesAssigned property: Volumes using current backup policy.
     * 
     * @return the volumesAssigned value.
     */
    public Integer volumesAssigned() {
        return this.volumesAssigned;
    }

    /**
     * Get the enabled property: The property to decide policy is enabled or not.
     * 
     * @return the enabled value.
     */
    public Boolean enabled() {
        return this.enabled;
    }

    /**
     * Set the enabled property: The property to decide policy is enabled or not.
     * 
     * @param enabled the enabled value to set.
     * @return the BackupPolicyProperties object itself.
     */
    public BackupPolicyProperties withEnabled(Boolean enabled) {
        this.enabled = enabled;
        return this;
    }

    /**
     * Get the volumeBackups property: A list of volumes assigned to this policy.
     * 
     * @return the volumeBackups value.
     */
    public List volumeBackups() {
        return this.volumeBackups;
    }

    /**
     * Validates the instance.
     * 
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (volumeBackups() != null) {
            volumeBackups().forEach(e -> e.validate());
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy