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

com.azure.resourcemanager.netapp.fluent.models.BackupInner 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.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.netapp.models.BackupType;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

/** Backup of a Volume. */
@JsonFlatten
@Fluent
public class BackupInner extends ProxyResource {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupInner.class);

    /*
     * Resource location
     */
    @JsonProperty(value = "location", required = true)
    private String location;

    /*
     * UUID v4 used to identify the Backup
     */
    @JsonProperty(value = "properties.backupId", access = JsonProperty.Access.WRITE_ONLY)
    private String backupId;

    /*
     * The creation date of the backup
     */
    @JsonProperty(value = "properties.creationDate", access = JsonProperty.Access.WRITE_ONLY)
    private OffsetDateTime creationDate;

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

    /*
     * Size of backup
     */
    @JsonProperty(value = "properties.size", access = JsonProperty.Access.WRITE_ONLY)
    private Long size;

    /*
     * Label for backup
     */
    @JsonProperty(value = "properties.label")
    private String label;

    /*
     * Type of backup Manual or Scheduled
     */
    @JsonProperty(value = "properties.backupType", access = JsonProperty.Access.WRITE_ONLY)
    private BackupType backupType;

    /*
     * Failure reason
     */
    @JsonProperty(value = "properties.failureReason", access = JsonProperty.Access.WRITE_ONLY)
    private String failureReason;

    /*
     * Volume name
     */
    @JsonProperty(value = "properties.volumeName", access = JsonProperty.Access.WRITE_ONLY)
    private String volumeName;

    /*
     * Manual backup an already existing snapshot. This will always be false
     * for scheduled backups and true/false for manual backups
     */
    @JsonProperty(value = "properties.useExistingSnapshot")
    private Boolean useExistingSnapshot;

    /**
     * Get the location property: Resource location.
     *
     * @return the location value.
     */
    public String location() {
        return this.location;
    }

    /**
     * Set the location property: Resource location.
     *
     * @param location the location value to set.
     * @return the BackupInner object itself.
     */
    public BackupInner withLocation(String location) {
        this.location = location;
        return this;
    }

    /**
     * Get the backupId property: UUID v4 used to identify the Backup.
     *
     * @return the backupId value.
     */
    public String backupId() {
        return this.backupId;
    }

    /**
     * Get the creationDate property: The creation date of the backup.
     *
     * @return the creationDate value.
     */
    public OffsetDateTime creationDate() {
        return this.creationDate;
    }

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

    /**
     * Get the size property: Size of backup.
     *
     * @return the size value.
     */
    public Long size() {
        return this.size;
    }

    /**
     * Get the label property: Label for backup.
     *
     * @return the label value.
     */
    public String label() {
        return this.label;
    }

    /**
     * Set the label property: Label for backup.
     *
     * @param label the label value to set.
     * @return the BackupInner object itself.
     */
    public BackupInner withLabel(String label) {
        this.label = label;
        return this;
    }

    /**
     * Get the backupType property: Type of backup Manual or Scheduled.
     *
     * @return the backupType value.
     */
    public BackupType backupType() {
        return this.backupType;
    }

    /**
     * Get the failureReason property: Failure reason.
     *
     * @return the failureReason value.
     */
    public String failureReason() {
        return this.failureReason;
    }

    /**
     * Get the volumeName property: Volume name.
     *
     * @return the volumeName value.
     */
    public String volumeName() {
        return this.volumeName;
    }

    /**
     * Get the useExistingSnapshot property: Manual backup an already existing snapshot. This will always be false for
     * scheduled backups and true/false for manual backups.
     *
     * @return the useExistingSnapshot value.
     */
    public Boolean useExistingSnapshot() {
        return this.useExistingSnapshot;
    }

    /**
     * Set the useExistingSnapshot property: Manual backup an already existing snapshot. This will always be false for
     * scheduled backups and true/false for manual backups.
     *
     * @param useExistingSnapshot the useExistingSnapshot value to set.
     * @return the BackupInner object itself.
     */
    public BackupInner withUseExistingSnapshot(Boolean useExistingSnapshot) {
        this.useExistingSnapshot = useExistingSnapshot;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (location() == null) {
            throw logger
                .logExceptionAsError(
                    new IllegalArgumentException("Missing required property location in model BackupInner"));
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy