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

package com.azure.resourcemanager.avs.fluent.models;

import com.azure.core.annotation.Immutable;
import com.azure.resourcemanager.avs.models.ScriptParameter;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Properties of a pre-canned script. */
@Immutable
public final class ScriptCmdletProperties {
    /*
     * Description of the scripts functionality
     */
    @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY)
    private String description;

    /*
     * Recommended time limit for execution
     */
    @JsonProperty(value = "timeout", access = JsonProperty.Access.WRITE_ONLY)
    private String timeout;

    /*
     * Parameters the script will accept
     */
    @JsonProperty(value = "parameters", access = JsonProperty.Access.WRITE_ONLY)
    private List<ScriptParameter> parameters;

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

    /**
     * Get the description property: Description of the scripts functionality.
     *
     * @return the description value.
     */
    public String description() {
        return this.description;
    }

    /**
     * Get the timeout property: Recommended time limit for execution.
     *
     * @return the timeout value.
     */
    public String timeout() {
        return this.timeout;
    }

    /**
     * Get the parameters property: Parameters the script will accept.
     *
     * @return the parameters value.
     */
    public List<ScriptParameter> parameters() {
        return this.parameters;
    }

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