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

package com.azure.resourcemanager.recoveryservicesbackup.models;

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

/** Additional information on Azure Sql specific protected item. */
@Fluent
public final class AzureSqlProtectedItemExtendedInfo {
    /*
     * The oldest backup copy available for this item in the service.
     */
    @JsonProperty(value = "oldestRecoveryPoint")
    private OffsetDateTime oldestRecoveryPoint;

    /*
     * Number of available backup copies associated with this backup item.
     */
    @JsonProperty(value = "recoveryPointCount")
    private Integer recoveryPointCount;

    /*
     * State of the backup policy associated with this backup item.
     */
    @JsonProperty(value = "policyState")
    private String policyState;

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

    /**
     * Get the oldestRecoveryPoint property: The oldest backup copy available for this item in the service.
     *
     * @return the oldestRecoveryPoint value.
     */
    public OffsetDateTime oldestRecoveryPoint() {
        return this.oldestRecoveryPoint;
    }

    /**
     * Set the oldestRecoveryPoint property: The oldest backup copy available for this item in the service.
     *
     * @param oldestRecoveryPoint the oldestRecoveryPoint value to set.
     * @return the AzureSqlProtectedItemExtendedInfo object itself.
     */
    public AzureSqlProtectedItemExtendedInfo withOldestRecoveryPoint(OffsetDateTime oldestRecoveryPoint) {
        this.oldestRecoveryPoint = oldestRecoveryPoint;
        return this;
    }

    /**
     * Get the recoveryPointCount property: Number of available backup copies associated with this backup item.
     *
     * @return the recoveryPointCount value.
     */
    public Integer recoveryPointCount() {
        return this.recoveryPointCount;
    }

    /**
     * Set the recoveryPointCount property: Number of available backup copies associated with this backup item.
     *
     * @param recoveryPointCount the recoveryPointCount value to set.
     * @return the AzureSqlProtectedItemExtendedInfo object itself.
     */
    public AzureSqlProtectedItemExtendedInfo withRecoveryPointCount(Integer recoveryPointCount) {
        this.recoveryPointCount = recoveryPointCount;
        return this;
    }

    /**
     * Get the policyState property: State of the backup policy associated with this backup item.
     *
     * @return the policyState value.
     */
    public String policyState() {
        return this.policyState;
    }

    /**
     * Set the policyState property: State of the backup policy associated with this backup item.
     *
     * @param policyState the policyState value to set.
     * @return the AzureSqlProtectedItemExtendedInfo object itself.
     */
    public AzureSqlProtectedItemExtendedInfo withPolicyState(String policyState) {
        this.policyState = policyState;
        return this;
    }

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