// 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.core.management.ProxyResource;
import com.azure.resourcemanager.avs.models.ScriptParameter;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** A cmdlet available for script execution. */
@Immutable
public final class ScriptCmdletInner extends ProxyResource {
    /*
     * The properties of a script cmdlet resource
     */
    @JsonProperty(value = "properties")
    private ScriptCmdletProperties innerProperties;

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

    /**
     * Get the innerProperties property: The properties of a script cmdlet resource.
     *
     * @return the innerProperties value.
     */
    private ScriptCmdletProperties innerProperties() {
        return this.innerProperties;
    }

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

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

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

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