package com.bocloud.ims.entity.resource;

import com.bocloud.common.utils.DateSerializer;
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 com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * qos policy
 * 
 * @author ymh
 * @时间 2019年11月13日
 */
@Table("qos_policy")
public class QosPolicy extends GenericEntity {

    @PK(value = PKStrategy.AUTO)
    private Long id; // ID
    @Column("vendor_id")
    private Long vendorId; // 云供应商ID
    @Column("region_id")
    private String regionId;
    @Column("policy_uuid")
    private String policyUuid;
    @Column("shared")
    private Boolean shared;
    @Column("tags")
    private String tags;
    @Column("created_at")
    @JsonSerialize(using = DateSerializer.class)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdAt;// 创建时候

    @IgnoreAll
    private Long ruleId;
    @IgnoreAll
    private Integer maxKbps;
    @IgnoreAll
    private Integer maxBurstKbps;
    @IgnoreAll
    private String direction; // egress and ingress
    @IgnoreAll
    private String vendorName; // 云供应商名称
    @IgnoreAll
    private String vendorType; // 云供应商名称
    @IgnoreAll
    private String regionName; // 镜像所在区域名称

    @Column("tenant_uuid")
    private String tenantUuid; // openstack底层租户id
    @IgnoreAll
    private String osTenantName;// openstack底层租户id

    public Long getId() {
        return id;
    }

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

    public Long getVendorId() {
        return vendorId;
    }

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

    public String getRegionId() {
        return regionId;
    }

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

    public String getPolicyUuid() {
        return policyUuid;
    }

    public void setPolicyUuid(String policyUuid) {
        this.policyUuid = policyUuid;
    }

    public Boolean getShared() {
        return shared;
    }

    public void setShared(Boolean shared) {
        this.shared = shared;
    }

    public String getTags() {
        return tags;
    }

    public void setTags(String tags) {
        this.tags = tags;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public String getVendorName() {
        return vendorName;
    }

    public void setVendorName(String vendorName) {
        this.vendorName = vendorName;
    }

    public String getVendorType() {
        return vendorType;
    }

    public void setVendorType(String vendorType) {
        this.vendorType = vendorType;
    }

    public String getRegionName() {
        return regionName;
    }

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

    public Integer getMaxKbps() {
        return maxKbps;
    }

    public void setMaxKbps(Integer maxKbps) {
        this.maxKbps = maxKbps;
    }

    public Integer getMaxBurstKbps() {
        return maxBurstKbps;
    }

    public void setMaxBurstKbps(Integer maxBurstKbps) {
        this.maxBurstKbps = maxBurstKbps;
    }

    public String getDirection() {
        return direction;
    }

    public void setDirection(String direction) {
        this.direction = direction;
    }

    public Long getRuleId() {
        return ruleId;
    }

    public void setRuleId(Long ruleId) {
        this.ruleId = ruleId;
    }

    public String getTenantUuid() {
        return tenantUuid;
    }

    public void setTenantUuid(String tenantUuid) {
        this.tenantUuid = tenantUuid;
    }

    public String getOsTenantName() {
        return osTenantName;
    }

    public void setOsTenantName(String osTenantName) {
        this.osTenantName = osTenantName;
    }

}
