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_virtual_cd")
public class HmdViosVirtualCd extends HmdGenericEntity {
    @Column("name")
    private String name; // 名称
    @Column("uuid")
    private String uuid; // 唯一标识
    @Column("capacity")
    private Float capacity; // 容量
    @Column("mount_type")
    private String mountType; // 挂载类型
    @Column("vios_id")
    private Long viosId; // 所属vios的id，对应hmd_partition表的id字段
    @Column("vios_adapter_id")
    private Integer viosAdapterId; // 所属vios适配器id
    @Column("assign_partition_id")
    private Long assignPartitionId; // 分配的逻辑分区id，对应hmd_partition表的id字段
    @Column("assign_adapter_id")
    private Integer assignAdapterId; // 分配的逻辑分区的适配器id
    @Column("assign_target_name")
    private String assignTargetName; // 分配后生成的target的名称
    @Column("assign_target_unique_device_id")
    private String assignTargetUniqueDeviceId; // 分配后生成的target的唯一设备id
    @Column("volume_group_id")
    private Long volumeGroupId; // 所属存储池id，对应hmd_volume_group表的id

    private HmdPartition vios; // 所属vios
    private HmdViosVolumeGroup volumeGroup; // 所属存储池
    private HmdPartition assignPartition; // 分配的lpar

    public String getUuid() {
        return uuid;
    }

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

    public Float getCapacity() {
        return capacity;
    }

    public void setCapacity(Float capacity) {
        this.capacity = capacity;
    }

    public String getMountType() {
        return mountType;
    }

    public void setMountType(String mountType) {
        this.mountType = mountType;
    }

    public Long getViosId() {
        return viosId;
    }

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

    public Integer getViosAdapterId() {
        return viosAdapterId;
    }

    public void setViosAdapterId(Integer viosAdapterId) {
        this.viosAdapterId = viosAdapterId;
    }

    public Long getAssignPartitionId() {
        return assignPartitionId;
    }

    public void setAssignPartitionId(Long assignPartitionId) {
        this.assignPartitionId = assignPartitionId;
    }

    public Integer getAssignAdapterId() {
        return assignAdapterId;
    }

    public void setAssignAdapterId(Integer assignAdapterId) {
        this.assignAdapterId = assignAdapterId;
    }

    public String getName() {
        return name;
    }

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

    public Long getVolumeGroupId() {
        return volumeGroupId;
    }

    public void setVolumeGroupId(Long volumeGroupId) {
        this.volumeGroupId = volumeGroupId;
    }

    public String getAssignTargetName() {
        return assignTargetName;
    }

    public void setAssignTargetName(String assignTargetName) {
        this.assignTargetName = assignTargetName;
    }

    public String getAssignTargetUniqueDeviceId() {
        return assignTargetUniqueDeviceId;
    }

    public void setAssignTargetUniqueDeviceId(String assignTargetUniqueDeviceId) {
        this.assignTargetUniqueDeviceId = assignTargetUniqueDeviceId;
    }

    public HmdPartition getVios() {
        return vios;
    }

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

    public HmdViosVolumeGroup getVolumeGroup() {
        return volumeGroup;
    }

    public void setVolumeGroup(HmdViosVolumeGroup volumeGroup) {
        this.volumeGroup = volumeGroup;
    }

    public HmdPartition getAssignPartition() {
        return assignPartition;
    }

    public void setAssignPartition(HmdPartition assignPartition) {
        this.assignPartition = assignPartition;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        if (!super.equals(o)) {
            return false;
        }
        HmdViosVirtualCd that = (HmdViosVirtualCd) o;
        return Objects.equals(uuid, that.uuid);
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), uuid);
    }
}

