package net.northking.cctp.element.core.keyword;

import java.io.Serializable;

import net.northking.cctp.element.core.type.DataType;
import net.northking.cctp.element.core.type.InputType;
import net.northking.cctp.element.core.type.ParamScope;
import net.northking.cctp.element.util.AtpUtils;

/**
 * Keyword argument info
 *
 * @author fengxiang.zhang
 * @since 1.0
 */
public class KeywordArgument implements Serializable {

    private static final long serialVersionUID = -4963709497468352025L;

    /**
     * Argument name
     */
    private String name;

    /**
     * Argument comment
     */
    private String comment;

    /**
     * Argument type
     */
    private DataType type;

    /**
     * Argument inputType
     */
    private InputType inputType;

    /**
     * Argument scope
     */
    private ParamScope scope;

    /**
     * default Display
     */
    private boolean defaultDisplay;

    /**
     * Enum type value list
     */
    private String enumValues;

    /**
     * Argument actual type
     */
    private String actualType;

    /**
     * Argument is required
     */
    private boolean required;

    /**
     * Argument default value.<br>
     * if required is false, argument should have default value
     */
    private String defaultValue;

    /**
     * Use * instead when printing logs
     */
    private boolean hideSensitive;

    /**
     * Related to the execution environment flag
     */
    private boolean relateEnv;

    /**
     * Expression flag
     */
    private boolean expression;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public DataType getType() {
        return type;
    }

    public String getTypeName() {
        return AtpUtils.camelCaseName(type.name());
    }

    public void setType(DataType type) {
        this.type = type;
    }

    public String getActualType() {
        return actualType;
    }

    public void setActualType(String actualType) {
        this.actualType = actualType;
    }

    public boolean isRequired() {
        return required;
    }

    public void setRequired(boolean required) {
        this.required = required;
    }

    public String getDefaultValue() {
        return defaultValue;
    }

    public void setDefaultValue(String defaultValue) {
        this.defaultValue = defaultValue;
    }

    public boolean isHideSensitive() {
        return hideSensitive;
    }

    public void setHideSensitive(boolean hideSensitive) {
        this.hideSensitive = hideSensitive;
    }

    public boolean isRelateEnv() {
        return relateEnv;
    }

    public void setRelateEnv(boolean relateEnv) {
        this.relateEnv = relateEnv;
    }

    public ParamScope getScope() {
        return scope;
    }

    public void setScope(ParamScope scope) {
        this.scope = scope;
    }

    public String getEnumValues() {
        return enumValues;
    }

    public void setEnumValues(String enumValues) {
        this.enumValues = enumValues;
    }

    public InputType getInputType() {
        return inputType;
    }

    public void setInputType(InputType inputType) {
        this.inputType = inputType;
    }

    public boolean isDefaultDisplay() {
        return defaultDisplay;
    }

    public void setDefaultDisplay(boolean defaultDisplay) {
        this.defaultDisplay = defaultDisplay;
    }

    public boolean isExpression() {
        return expression;
    }

    public void setExpression(boolean expression) {
        this.expression = expression;
    }
}