package com.bocloud.ims.entity.resource;

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;

@Table("cluster_node")
public class ClusterNode extends GenericEntity {

    @PK(value = PKStrategy.AUTO)
    private Long id;
    @Column("ip")
    private String ip;
    @Column("resource_id")
    private String resourceId;
    @Column("type")
    private String type;
    @Column("cluster_id")
    private Long clusterId;
    @Column("vendor_id")
    private Long vendorId;
    @Column("roles")
    private String roles;
    @Column("os_category")
    private String osCategory;
    @IgnoreAll
    private double capacity;
    @Column("zone")
    private String zone;
    @Column("disk")
    private Integer disk;
    @Column("memory")
    private Integer memory;
    @Column("service")
    private String service;
    @Column("cpu")
    private Integer cpu;

    @IgnoreAll
    private String saltMasterUrl;
    @IgnoreAll
    private String targetServers;
    @IgnoreAll
    private String host;
    @IgnoreAll
    private String hostType;

    /**
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * @param id
     *            the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @return the ip
     */
    public String getIp() {
        return ip;
    }

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

    /**
     * @return the resourceId
     */
    public String getResourceId() {
        return resourceId;
    }

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

    /**
     * @return the type
     */
    public String getType() {
        return type;
    }

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

    /**
     * @return the clusterId
     */
    public Long getClusterId() {
        return clusterId;
    }

    /**
     * @param clusterId
     *            the clusterId to set
     */
    public void setClusterId(Long clusterId) {
        this.clusterId = clusterId;
    }

    /**
     * @return the vendorId
     */
    public Long getVendorId() {
        return vendorId;
    }

    /**
     * @param vendorId
     *            the vendorId to set
     */
    public void setVendorId(Long vendorId) {
        this.vendorId = vendorId;
    }

    /**
     * @return the roles
     */
    public String getRoles() {
        return roles;
    }

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

    /**
     * @return the osCategory
     */
    public String getOsCategory() {
        return osCategory;
    }

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

    /**
     * @return the capacity
     */
    public double getCapacity() {
        return capacity;
    }

    /**
     * @param capacity
     *            the capacity to set
     */
    public void setCapacity(double capacity) {
        this.capacity = capacity;
    }

    public ClusterNode() {
        super();
    }

    public ClusterNode(String ip, String resourceId, String type, Long clusterId) {
        super();
        this.ip = ip;
        this.resourceId = resourceId;
        this.type = type;
        this.clusterId = clusterId;
    }

    public String getZone() {
        return zone;
    }

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

    public Integer getDisk() {
        return disk;
    }

    public void setDisk(Integer disk) {
        this.disk = disk;
    }

    public Integer getMemory() {
        return memory;
    }

    public void setMemory(Integer memory) {
        this.memory = memory;
    }

    public String getService() {
        return service;
    }

    public void setService(String service) {
        this.service = service;
    }

    public Integer getCpu() {
        return cpu;
    }

    public void setCpu(Integer cpu) {
        this.cpu = cpu;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public String getHostType() {
        return hostType;
    }

    public void setHostType(String hostType) {
        this.hostType = hostType;
    }

    public String getSaltMasterUrl() {
        return saltMasterUrl;
    }

    public void setSaltMasterUrl(String saltMasterUrl) {
        this.saltMasterUrl = saltMasterUrl;
    }

    public String getTargetServers() {
        return targetServers;
    }

    public void setTargetServers(String targetServers) {
        this.targetServers = targetServers;
    }

}
