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

package com.azure.resourcemanager.dataprotection.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Deleted Backup Instance. */
@Fluent
public final class DeletedBackupInstance extends BackupInstance {
    /*
     * Deletion info of Backup Instance
     */
    @JsonProperty(value = "deletionInfo", access = JsonProperty.Access.WRITE_ONLY)
    private DeletionInfo deletionInfo;

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

    /**
     * Get the deletionInfo property: Deletion info of Backup Instance.
     *
     * @return the deletionInfo value.
     */
    public DeletionInfo deletionInfo() {
        return this.deletionInfo;
    }

    /** {@inheritDoc} */
    @Override
    public DeletedBackupInstance withFriendlyName(String friendlyName) {
        super.withFriendlyName(friendlyName);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public DeletedBackupInstance withDataSourceInfo(Datasource dataSourceInfo) {
        super.withDataSourceInfo(dataSourceInfo);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public DeletedBackupInstance withDataSourceSetInfo(DatasourceSet dataSourceSetInfo) {
        super.withDataSourceSetInfo(dataSourceSetInfo);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public DeletedBackupInstance withPolicyInfo(PolicyInfo policyInfo) {
        super.withPolicyInfo(policyInfo);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public DeletedBackupInstance withDatasourceAuthCredentials(AuthCredentials datasourceAuthCredentials) {
        super.withDatasourceAuthCredentials(datasourceAuthCredentials);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public DeletedBackupInstance withValidationType(ValidationType validationType) {
        super.withValidationType(validationType);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public DeletedBackupInstance withObjectType(String objectType) {
        super.withObjectType(objectType);
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    @Override
    public void validate() {
        super.validate();
        if (deletionInfo() != null) {
            deletionInfo().validate();
        }
    }
}
