package com.bocloud.ims.entity.resource.hmc;

import com.bocloud.entity.annotations.Column;
import com.bocloud.entity.annotations.Table;

import java.util.Objects;

@Table("hmd_server_hea_physical_port")
public class HmdServerHeaPhysicalPort extends HmdGenericEntity {
    @Column("hea_id")
    private Long heaId; // 主机以太网适配器id，关联hmd_server_hea的id字段
    @Column("connection_speed")
    private String connectionSpeed; // 传输速率
    @Column("link_up")
    private Boolean linkUp; // 连接状态
    @Column("duplex_mode")
    private String duplexMode; // 双工
    @Column("flow_control")
    private Boolean flowControl; // 流控状态
    @Column("transmit_flow_control")
    private Boolean transmitFlowControl; // 传输流控状态
    @Column("receive_flow_control")
    private Boolean receiveFlowControl; // 接收流控状态
    @Column("max_receive_packet")
    private String maxReceivePacket; // 最大接收数据包大小
    @Column("port_location")
    private String portLocation; // 端口位置
    @Column("port_id")
    private Integer portId; // 端口id
    @Column("port_type")
    private String portType; // 端口类型
    @Column("port_group_id")
    private Integer portGroupId; // 端口组id
    @Column("multi_core_scaling")
    private Integer multiCoreScaling; // 多核心等级
    @Column("supported_multi_core_scaling")
    private String supportedMultiCoreScaling; // 支持的多核心等级
    @Column("owner")
    private String owner; // 所有者

    private HmdServerHea hea; // 所属hea

    public Long getHeaId() {
        return heaId;
    }

    public void setHeaId(Long heaId) {
        this.heaId = heaId;
    }

    public String getConnectionSpeed() {
        return connectionSpeed;
    }

    public void setConnectionSpeed(String connectionSpeed) {
        this.connectionSpeed = connectionSpeed;
    }

    public Boolean getLinkUp() {
        return linkUp;
    }

    public void setLinkUp(Boolean linkUp) {
        this.linkUp = linkUp;
    }

    public String getDuplexMode() {
        return duplexMode;
    }

    public void setDuplexMode(String duplexMode) {
        this.duplexMode = duplexMode;
    }

    public Boolean getFlowControl() {
        return flowControl;
    }

    public void setFlowControl(Boolean flowControl) {
        this.flowControl = flowControl;
    }

    public Boolean getTransmitFlowControl() {
        return transmitFlowControl;
    }

    public void setTransmitFlowControl(Boolean transmitFlowControl) {
        this.transmitFlowControl = transmitFlowControl;
    }

    public Boolean getReceiveFlowControl() {
        return receiveFlowControl;
    }

    public void setReceiveFlowControl(Boolean receiveFlowControl) {
        this.receiveFlowControl = receiveFlowControl;
    }

    public String getMaxReceivePacket() {
        return maxReceivePacket;
    }

    public void setMaxReceivePacket(String maxReceivePacket) {
        this.maxReceivePacket = maxReceivePacket;
    }

    public String getPortLocation() {
        return portLocation;
    }

    public void setPortLocation(String portLocation) {
        this.portLocation = portLocation;
    }

    public Integer getPortId() {
        return portId;
    }

    public void setPortId(Integer portId) {
        this.portId = portId;
    }

    public String getPortType() {
        return portType;
    }

    public void setPortType(String portType) {
        this.portType = portType;
    }

    public Integer getPortGroupId() {
        return portGroupId;
    }

    public void setPortGroupId(Integer portGroupId) {
        this.portGroupId = portGroupId;
    }

    public Integer getMultiCoreScaling() {
        return multiCoreScaling;
    }

    public void setMultiCoreScaling(Integer multiCoreScaling) {
        this.multiCoreScaling = multiCoreScaling;
    }

    public String getSupportedMultiCoreScaling() {
        return supportedMultiCoreScaling;
    }

    public void setSupportedMultiCoreScaling(String supportedMultiCoreScaling) {
        this.supportedMultiCoreScaling = supportedMultiCoreScaling;
    }

    public String getOwner() {
        return owner;
    }

    public void setOwner(String owner) {
        this.owner = owner;
    }

    public HmdServerHea getHea() {
        return hea;
    }

    public void setHea(HmdServerHea hea) {
        this.hea = hea;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        HmdServerHeaPhysicalPort port = (HmdServerHeaPhysicalPort) o;
        return Objects.equals(heaId, port.heaId) &&
            Objects.equals(portId, port.portId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(heaId, portId);
    }
}

