// 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.BackupType;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

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

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

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

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

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

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

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

    /*
     * Volume name
     */
    @JsonProperty(value = "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 = "useExistingSnapshot")
    private Boolean useExistingSnapshot;

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

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

    /**
     * Get the creationDate property: creationDate
     *
     * <p>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 BackupProperties object itself.
     */
    public BackupProperties withLabel(String label) {
        this.label = label;
        return this;
    }

    /**
     * Get the backupType property: backupType
     *
     * <p>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 BackupProperties object itself.
     */
    public BackupProperties withUseExistingSnapshot(Boolean useExistingSnapshot) {
        this.useExistingSnapshot = useExistingSnapshot;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
    }
}
