package com.bocloud.ims.entity.resource.azure.monitor;

import com.bocloud.entity.annotations.Column;
import com.bocloud.entity.annotations.IgnoreAll;
import com.bocloud.entity.annotations.PK;
import com.bocloud.entity.annotations.Table;
import com.bocloud.entity.bean.GenericEntity;
import com.bocloud.entity.meta.PKStrategy;

import java.util.List;

/**
 * @Company: 博云 www.bocloud.com
 * @ClassName: MetricAlert
 * @Description:指标警报
 * @author: zhenpingLi/李振平
 * @date: 2021/1/8 14:13
 */
@Table("metric_alert")
public class MetricAlert extends GenericEntity {

    @PK(value = PKStrategy.AUTO)
    private Long id; // ID
    @Column("uuid")
    private String uuid;
    @Column("severity")
    private Integer severity;//警报严重性 {0，1，2，3，4}
    @Column("enabled")
    private Boolean enabled;//指示是否启用指标警报的标志。
    @Column("description")
    private String description;//将包括在警报电子邮件中的指标警报的说明。
    @Column("evaluation_frequency")
    private String evaluationFrequency;//指标警报的评估频率，以 ISO 8601 持续时间格式表示。
    @Column("window_size")
    private String windowSize;//用于根据阈值监视警报活动的时间段 (ISO 8601 duration 格式) 。
    @Column("target_resource_type")
    private String targetResourceType;//创建/更新警报的目标资源 () 的资源类型。 对于 MultipleResourceMultipleMetricCriteria 是必需的
    @Column("auto_mitigate")
    private Boolean autoMitigate; //指示警报是否应自动解决的标志。 默认值为 true。
    @Column("vendor_id")
    private Long vendorId;
    @Column("tenant_id")
    private Long tenantId;
    @Column("project_id")
    private Long projectId;// 项目ID
    @Column("region_id")
    private String regionId;
    @Column("resource_group_id")
    private Long resourceGroupId;
    @Column("user_id")
    private Long userId;
    @IgnoreAll
    private String regionName;
    @IgnoreAll
    private String resourceGroupName;//资源组名称
    @IgnoreAll
    private List<MetricCriteria> metricCriterias;//规则集合
    @IgnoreAll
    private List<Long> resourceIds;//监控资源id集合
    @IgnoreAll
    private List<Object> resources;

    public List<Object> getResources() {
        return resources;
    }

    public void setResources(List<Object> resources) {
        this.resources = resources;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public List<Long> getResourceIds() {
        return resourceIds;
    }

    public void setResourceIds(List<Long> resourceIds) {
        this.resourceIds = resourceIds;
    }

    public List<MetricCriteria> getMetricCriterias() {
        return metricCriterias;
    }

    public void setMetricCriterias(List<MetricCriteria> metricCriterias) {
        this.metricCriterias = metricCriterias;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public Integer getSeverity() {
        return severity;
    }

    public void setSeverity(Integer severity) {
        this.severity = severity;
    }

    public Boolean getEnabled() {
        return enabled;
    }

    public void setEnabled(Boolean enabled) {
        this.enabled = enabled;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getEvaluationFrequency() {
        return evaluationFrequency;
    }

    public void setEvaluationFrequency(String evaluationFrequency) {
        this.evaluationFrequency = evaluationFrequency;
    }

    public String getWindowSize() {
        return windowSize;
    }

    public void setWindowSize(String windowSize) {
        this.windowSize = windowSize;
    }

    public String getTargetResourceType() {
        return targetResourceType;
    }

    public void setTargetResourceType(String targetResourceType) {
        this.targetResourceType = targetResourceType;
    }

    public Boolean getAutoMitigate() {
        return autoMitigate;
    }

    public void setAutoMitigate(Boolean autoMitigate) {
        this.autoMitigate = autoMitigate;
    }

    public Long getVendorId() {
        return vendorId;
    }

    public void setVendorId(Long vendorId) {
        this.vendorId = vendorId;
    }

    public Long getTenantId() {
        return tenantId;
    }

    public void setTenantId(Long tenantId) {
        this.tenantId = tenantId;
    }

    public Long getProjectId() {
        return projectId;
    }

    public void setProjectId(Long projectId) {
        this.projectId = projectId;
    }

    public String getRegionId() {
        return regionId;
    }

    public void setRegionId(String regionId) {
        this.regionId = regionId;
    }

    public Long getResourceGroupId() {
        return resourceGroupId;
    }

    public void setResourceGroupId(Long resourceGroupId) {
        this.resourceGroupId = resourceGroupId;
    }

    public String getRegionName() {
        return regionName;
    }

    public void setRegionName(String regionName) {
        this.regionName = regionName;
    }

    public String getResourceGroupName() {
        return resourceGroupName;
    }

    public void setResourceGroupName(String resourceGroupName) {
        this.resourceGroupName = resourceGroupName;
    }
}