// 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 com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

/** Operation status extended info for ILR provision action. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType")
@JsonTypeName("OperationStatusProvisionILRExtendedInfo")
@Fluent
public final class OperationStatusProvisionIlrExtendedInfo extends OperationStatusExtendedInfo {
    /*
     * Target details for file / folder restore.
     */
    @JsonProperty(value = "recoveryTarget")
    private InstantItemRecoveryTarget recoveryTarget;

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

    /**
     * Get the recoveryTarget property: Target details for file / folder restore.
     *
     * @return the recoveryTarget value.
     */
    public InstantItemRecoveryTarget recoveryTarget() {
        return this.recoveryTarget;
    }

    /**
     * Set the recoveryTarget property: Target details for file / folder restore.
     *
     * @param recoveryTarget the recoveryTarget value to set.
     * @return the OperationStatusProvisionIlrExtendedInfo object itself.
     */
    public OperationStatusProvisionIlrExtendedInfo withRecoveryTarget(InstantItemRecoveryTarget recoveryTarget) {
        this.recoveryTarget = recoveryTarget;
        return this;
    }

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