// 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.util.List;

/** Target details for file / folder restore. */
@Fluent
public final class InstantItemRecoveryTarget {
    /*
     * List of client scripts.
     */
    @JsonProperty(value = "clientScripts")
    private List<ClientScriptForConnect> clientScripts;

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

    /**
     * Get the clientScripts property: List of client scripts.
     *
     * @return the clientScripts value.
     */
    public List<ClientScriptForConnect> clientScripts() {
        return this.clientScripts;
    }

    /**
     * Set the clientScripts property: List of client scripts.
     *
     * @param clientScripts the clientScripts value to set.
     * @return the InstantItemRecoveryTarget object itself.
     */
    public InstantItemRecoveryTarget withClientScripts(List<ClientScriptForConnect> clientScripts) {
        this.clientScripts = clientScripts;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (clientScripts() != null) {
            clientScripts().forEach(e -> e.validate());
        }
    }
}
