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_vios_physical_ethernet_adapter")
public class HmdViosPhysicalEthernetAdapter extends HmdGenericEntity {
    @Column("vios_id")
    private Long viosId; // 所属vios的id，对应hmd_partition表的id字段
    @Column("name")
    private String name; // 名称
    @Column("device_type")
    private String deviceType; // 适配器类型
    @Column("physical_location")
    private String physicalLocation; // 物理位置
    @Column("unique_device_id")
    private String uniqueDeviceId; // 设备唯一id
    @Column("ip_interface_name")
    private String ipInterfaceName; // 网络接口名称
    @Column("ip_interface_status")
    private String ipInterfaceStatus; // 网络接口状态
    @Column("ip_address")
    private String ipAddress; // IP地址
    @Column("subnet_mask")
    private String subnetMask; // 子网掩码

    private HmdPartition vios; // 所属vios

    public Long getViosId() {
        return viosId;
    }

    public void setViosId(Long viosId) {
        this.viosId = viosId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDeviceType() {
        return deviceType;
    }

    public void setDeviceType(String deviceType) {
        this.deviceType = deviceType;
    }

    public String getPhysicalLocation() {
        return physicalLocation;
    }

    public void setPhysicalLocation(String physicalLocation) {
        this.physicalLocation = physicalLocation;
    }

    public String getUniqueDeviceId() {
        return uniqueDeviceId;
    }

    public void setUniqueDeviceId(String uniqueDeviceId) {
        this.uniqueDeviceId = uniqueDeviceId;
    }

    public String getIpInterfaceName() {
        return ipInterfaceName;
    }

    public void setIpInterfaceName(String ipInterfaceName) {
        this.ipInterfaceName = ipInterfaceName;
    }

    public String getIpInterfaceStatus() {
        return ipInterfaceStatus;
    }

    public void setIpInterfaceStatus(String ipInterfaceStatus) {
        this.ipInterfaceStatus = ipInterfaceStatus;
    }

    public String getIpAddress() {
        return ipAddress;
    }

    public void setIpAddress(String ipAddress) {
        this.ipAddress = ipAddress;
    }

    public String getSubnetMask() {
        return subnetMask;
    }

    public void setSubnetMask(String subnetMask) {
        this.subnetMask = subnetMask;
    }

    public HmdPartition getVios() {
        return vios;
    }

    public void setVios(HmdPartition vios) {
        this.vios = vios;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        HmdViosPhysicalEthernetAdapter that = (HmdViosPhysicalEthernetAdapter) o;
        return Objects.equals(viosId, that.viosId) &&
            Objects.equals(physicalLocation, that.physicalLocation);
    }

    @Override
    public int hashCode() {
        return Objects.hash(viosId, physicalLocation);
    }
}
