package com.njcn.gather.systemmonitor.disk.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;

/**
 * HTTP 通知项。
 */
@Data
public class DiskMonitorNotifyHttpItem {

    @ApiModelProperty("回调地址")
    @NotBlank(message = "HTTP通知目标不能为空，请检查url参数")
    private String url;

    @ApiModelProperty("名称")
    private String name;

    @ApiModelProperty("请求方法")
    private String method;

    @ApiModelProperty("超时时间")
    @Min(value = 1, message = "timeoutMs必须大于0")
    private Integer timeoutMs;

    @ApiModelProperty("是否启用")
    private Boolean enabled;
}
