package com.bocloud.cmp.model;

import java.math.BigDecimal;

public class FlavorModel {
    private String name;
    private Integer cpu;
    private BigDecimal memory;
    private String family;
    private String flavorUuid;
    private Integer disk; // 磁盘
    private String uuid; // UUID
    private String instanceChargeType; // 计费类型
    private String status; // 规格状态
    private String zone; // 地域
    private String regionId;
    private Integer dataDiskMax; // 最大数据盘
    private Integer dataDiskMin;
    private String performanceType; // 规格的分类
    private FlavorExtraSpecsModel extraSpecs;

    private Object osExtraSpecs;
    private Object attachableQuantity;
    private String cpuArchitecture;

    //azure 规格支持的可用性区域
    private String availabilityZoneIds;
    //规格是否可用
    private Boolean available;

    public Boolean getAvailable() {
        return available;
    }

    public void setAvailable(Boolean available) {
        this.available = available;
    }

    public String getAvailabilityZoneIds() {
        return availabilityZoneIds;
    }

    public void setAvailabilityZoneIds(String availabilityZoneIds) {
        this.availabilityZoneIds = availabilityZoneIds;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the cpu
     */
    public Integer getCpu() {
        return cpu;
    }

    /**
     * @param cpu the cpu to set
     */
    public void setCpu(Integer cpu) {
        this.cpu = cpu;
    }

    /**
     * @return the memory
     */
    public BigDecimal getMemory() {
        return memory;
    }

    /**
     * @param memory the memory to set
     */
    public void setMemory(BigDecimal memory) {
        this.memory = memory;
    }

    /**
     * @return the family
     */
    public String getFamily() {
        return family;
    }

    /**
     * @param family the family to set
     */
    public void setFamily(String family) {
        this.family = family;
    }

    /**
     * @return the flavorUuid
     */
    public String getFlavorUuid() {
        return flavorUuid;
    }

    /**
     * @param flavorUuid the flavorUuid to set
     */
    public void setFlavorUuid(String flavorUuid) {
        this.flavorUuid = flavorUuid;
    }

    /**
     * @return the disk
     */
    public Integer getDisk() {
        return disk;
    }

    /**
     * @param disk the disk to set
     */
    public void setDisk(Integer disk) {
        this.disk = disk;
    }

    /**
     * @return the uuid
     */
    public String getUuid() {
        return uuid;
    }

    /**
     * @param uuid the uuid to set
     */
    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public FlavorModel() {
        super();
    }

    public FlavorModel(String name, Integer cpu, BigDecimal memory, Integer disk) {
        super();
        this.name = name;
        this.cpu = cpu;
        this.memory = memory;
        this.disk = disk;
    }

    public String getInstanceChargeType() {
        return instanceChargeType;
    }

    public void setInstanceChargeType(String instanceChargeType) {
        this.instanceChargeType = instanceChargeType;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getZone() {
        return zone;
    }

    public void setZone(String zone) {
        this.zone = zone;
    }

    public String getRegionId() {
        return regionId;
    }

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

    public FlavorExtraSpecsModel getExtraSpecs() {
        return extraSpecs;
    }

    public void setExtraSpecs(FlavorExtraSpecsModel extraSpecs) {
        this.extraSpecs = extraSpecs;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((cpu == null) ? 0 : cpu.hashCode());
        result = prime * result + ((flavorUuid == null) ? 0 : flavorUuid.hashCode());
        result = prime * result + ((memory == null) ? 0 : memory.hashCode());
        result = prime * result + ((name == null) ? 0 : name.hashCode());
        result = prime * result + ((regionId == null) ? 0 : regionId.hashCode());
        result = prime * result + ((uuid == null) ? 0 : uuid.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        FlavorModel other = (FlavorModel) obj;
        if (cpu == null) {
            if (other.cpu != null) {
                return false;
            }
        } else if (!cpu.equals(other.cpu)) {
            return false;
        }
        if (flavorUuid == null) {
            if (other.flavorUuid != null) {
                return false;
            }
        } else if (!flavorUuid.equals(other.flavorUuid)) {
            return false;
        }
        if (memory == null) {
            if (other.memory != null) {
                return false;
            }
        } else if (!memory.equals(other.memory)) {
            return false;
        }
        if (name == null) {
            if (other.name != null) {
                return false;
            }
        } else if (!name.equals(other.name)) {
            return false;
        }
        if (regionId == null) {
            if (other.regionId != null) {
                return false;
            }
        } else if (!regionId.equals(other.regionId)) {
            return false;
        }
        if (uuid == null) {
            if (other.uuid != null) {
                return false;
            }
        } else if (!uuid.equals(other.uuid)) {
            return false;
        }
        return true;
    }

    public Integer getDataDiskMax() {
        return dataDiskMax;
    }

    public void setDataDiskMax(Integer dataDiskMax) {
        this.dataDiskMax = dataDiskMax;
    }

    public Integer getDataDiskMin() {
        return dataDiskMin;
    }

    public void setDataDiskMin(Integer dataDiskMin) {
        this.dataDiskMin = dataDiskMin;
    }

    public String getPerformanceType() {
        return performanceType;
    }

    public void setPerformanceType(String performanceType) {
        this.performanceType = performanceType;
    }

    public Object getOsExtraSpecs() {
        return osExtraSpecs;
    }

    public void setOsExtraSpecs(Object osExtraSpecs) {
        this.osExtraSpecs = osExtraSpecs;
    }

    public Object getAttachableQuantity() {
        return attachableQuantity;
    }

    public void setAttachableQuantity(Object attachableQuantity) {
        this.attachableQuantity = attachableQuantity;
    }

    public String getCpuArchitecture() {
        return cpuArchitecture;
    }

    public void setCpuArchitecture(String cpuArchitecture) {
        this.cpuArchitecture = cpuArchitecture;
    }

}
