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

package com.azure.resourcemanager.securityinsights.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

/** Describes an automation rule action. */
@JsonTypeInfo(
    use = JsonTypeInfo.Id.NAME,
    include = JsonTypeInfo.As.PROPERTY,
    property = "actionType",
    defaultImpl = AutomationRuleAction.class)
@JsonTypeName("AutomationRuleAction")
@JsonSubTypes({
    @JsonSubTypes.Type(name = "ModifyProperties", value = AutomationRuleModifyPropertiesAction.class),
    @JsonSubTypes.Type(name = "RunPlaybook", value = AutomationRuleRunPlaybookAction.class)
})
@Fluent
public class AutomationRuleAction {
    /*
     * The order property.
     */
    @JsonProperty(value = "order", required = true)
    private int order;

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

    /**
     * Set the order property: The order property.
     *
     * @param order the order value to set.
     * @return the AutomationRuleAction object itself.
     */
    public AutomationRuleAction withOrder(int order) {
        this.order = order;
        return this;
    }

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