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

package com.azure.resourcemanager.recoveryservicessiterecovery.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;

/** This class represents the script action task details. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType")
@JsonTypeName("ScriptActionTaskDetails")
@Fluent
public final class ScriptActionTaskDetails extends TaskTypeDetails {
    /*
     * The name.
     */
    @JsonProperty(value = "name")
    private String name;

    /*
     * The path.
     */
    @JsonProperty(value = "path")
    private String path;

    /*
     * The output.
     */
    @JsonProperty(value = "output")
    private String output;

    /*
     * A value indicating whether it is a primary side script or not.
     */
    @JsonProperty(value = "isPrimarySideScript")
    private Boolean isPrimarySideScript;

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

    /**
     * Get the name property: The name.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Set the name property: The name.
     *
     * @param name the name value to set.
     * @return the ScriptActionTaskDetails object itself.
     */
    public ScriptActionTaskDetails withName(String name) {
        this.name = name;
        return this;
    }

    /**
     * Get the path property: The path.
     *
     * @return the path value.
     */
    public String path() {
        return this.path;
    }

    /**
     * Set the path property: The path.
     *
     * @param path the path value to set.
     * @return the ScriptActionTaskDetails object itself.
     */
    public ScriptActionTaskDetails withPath(String path) {
        this.path = path;
        return this;
    }

    /**
     * Get the output property: The output.
     *
     * @return the output value.
     */
    public String output() {
        return this.output;
    }

    /**
     * Set the output property: The output.
     *
     * @param output the output value to set.
     * @return the ScriptActionTaskDetails object itself.
     */
    public ScriptActionTaskDetails withOutput(String output) {
        this.output = output;
        return this;
    }

    /**
     * Get the isPrimarySideScript property: A value indicating whether it is a primary side script or not.
     *
     * @return the isPrimarySideScript value.
     */
    public Boolean isPrimarySideScript() {
        return this.isPrimarySideScript;
    }

    /**
     * Set the isPrimarySideScript property: A value indicating whether it is a primary side script or not.
     *
     * @param isPrimarySideScript the isPrimarySideScript value to set.
     * @return the ScriptActionTaskDetails object itself.
     */
    public ScriptActionTaskDetails withIsPrimarySideScript(Boolean isPrimarySideScript) {
        this.isPrimarySideScript = isPrimarySideScript;
        return this;
    }

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