// 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.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Instruction step details. */
@Fluent
public class ConnectorInstructionModelBase {
    /*
     * The parameters for the setting
     */
    @JsonProperty(value = "parameters")
    private Object parameters;

    /*
     * The kind of the setting
     */
    @JsonProperty(value = "type", required = true)
    private SettingType type;

    /**
     * Get the parameters property: The parameters for the setting.
     *
     * @return the parameters value.
     */
    public Object parameters() {
        return this.parameters;
    }

    /**
     * Set the parameters property: The parameters for the setting.
     *
     * @param parameters the parameters value to set.
     * @return the ConnectorInstructionModelBase object itself.
     */
    public ConnectorInstructionModelBase withParameters(Object parameters) {
        this.parameters = parameters;
        return this;
    }

    /**
     * Get the type property: The kind of the setting.
     *
     * @return the type value.
     */
    public SettingType type() {
        return this.type;
    }

    /**
     * Set the type property: The kind of the setting.
     *
     * @param type the type value to set.
     * @return the ConnectorInstructionModelBase object itself.
     */
    public ConnectorInstructionModelBase withType(SettingType type) {
        this.type = type;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (type() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property type in model ConnectorInstructionModelBase"));
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(ConnectorInstructionModelBase.class);
}
