package xyz.wbsite.module.admin.req;

import xyz.wbsite.frame.base.BaseRequest;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;
import xyz.wbsite.frame.validation.Select;

/**
 * RulesCreateRequest - 配置规则新增
 *
 * @author wangbing
 * @version 0.0.1
 * @since 2021-02-08
 */
public class RulesCreateRequest extends BaseRequest {

    /**
     * 规则目标.
     * 全局:全局
     * 主机:主机
     * 路径:路径
     */
    @Select({"全局", "主机", "路径"})
    private String ruleFor;

    /**
     * 规则标题.
     */
    @Length(min = 0, max = 100, message = "[ruleTitle]规则标题长度不合法(0-100)")
    private String ruleTitle;

    /**
     * 规则名称.
     */
    @Length(min = 0, max = 100, message = "[ruleName]规则名称长度不合法(0-100)")
    private String ruleName;

    /**
     * 规则属值.
     */
    @Length(min = 0, max = 100, message = "[ruleValue]规则属值长度不合法(0-100)")
    private String ruleValue;

    /**
     * 默认属值.
     */
    @Length(min = 0, max = 100, message = "[valueDefault]默认属值长度不合法(0-100)")
    private String valueDefault;

    /**
     * 属值正则.
     */
    @Length(min = 0, max = 100, message = "[valueRegex]属值正则长度不合法(0-100)")
    private String valueRegex;

    /**
     * 规则描述.
     */
    @Length(min = 0, max = 500, message = "[ruleNote]规则描述长度不合法(0-500)")
    private String ruleNote;

    public String getRuleFor() {
        return this.ruleFor;
    }

    public void setRuleFor(String ruleFor) {
        this.ruleFor = ruleFor;
    }

    public String getRuleTitle() {
        return this.ruleTitle;
    }

    public void setRuleTitle(String ruleTitle) {
        this.ruleTitle = ruleTitle;
    }

    public String getRuleName() {
        return this.ruleName;
    }

    public void setRuleName(String ruleName) {
        this.ruleName = ruleName;
    }

    public String getRuleValue() {
        return this.ruleValue;
    }

    public void setRuleValue(String ruleValue) {
        this.ruleValue = ruleValue;
    }

    public String getValueDefault() {
        return this.valueDefault;
    }

    public void setValueDefault(String valueDefault) {
        this.valueDefault = valueDefault;
    }

    public String getValueRegex() {
        return this.valueRegex;
    }

    public void setValueRegex(String valueRegex) {
        this.valueRegex = valueRegex;
    }

    public String getRuleNote() {
        return this.ruleNote;
    }

    public void setRuleNote(String ruleNote) {
        this.ruleNote = ruleNote;
    }
}
