// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.postgresqlflexibleserver.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

/** Backup properties of a server. */
@Fluent
public final class Backup {
    /*
     * Backup retention days for the server.
     */
    @JsonProperty(value = "backupRetentionDays")
    private Integer backupRetentionDays;

    /*
     * A value indicating whether Geo-Redundant backup is enabled on the server.
     */
    @JsonProperty(value = "geoRedundantBackup")
    private GeoRedundantBackupEnum geoRedundantBackup;

    /*
     * The earliest restore point time (ISO8601 format) for server.
     */
    @JsonProperty(value = "earliestRestoreDate", access = JsonProperty.Access.WRITE_ONLY)
    private OffsetDateTime earliestRestoreDate;

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

    /**
     * Get the backupRetentionDays property: Backup retention days for the server.
     *
     * @return the backupRetentionDays value.
     */
    public Integer backupRetentionDays() {
        return this.backupRetentionDays;
    }

    /**
     * Set the backupRetentionDays property: Backup retention days for the server.
     *
     * @param backupRetentionDays the backupRetentionDays value to set.
     * @return the Backup object itself.
     */
    public Backup withBackupRetentionDays(Integer backupRetentionDays) {
        this.backupRetentionDays = backupRetentionDays;
        return this;
    }

    /**
     * Get the geoRedundantBackup property: A value indicating whether Geo-Redundant backup is enabled on the server.
     *
     * @return the geoRedundantBackup value.
     */
    public GeoRedundantBackupEnum geoRedundantBackup() {
        return this.geoRedundantBackup;
    }

    /**
     * Set the geoRedundantBackup property: A value indicating whether Geo-Redundant backup is enabled on the server.
     *
     * @param geoRedundantBackup the geoRedundantBackup value to set.
     * @return the Backup object itself.
     */
    public Backup withGeoRedundantBackup(GeoRedundantBackupEnum geoRedundantBackup) {
        this.geoRedundantBackup = geoRedundantBackup;
        return this;
    }

    /**
     * Get the earliestRestoreDate property: The earliest restore point time (ISO8601 format) for server.
     *
     * @return the earliestRestoreDate value.
     */
    public OffsetDateTime earliestRestoreDate() {
        return this.earliestRestoreDate;
    }

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