package com.bocloud.nms.model.hillstone;

import java.util.List;
import java.util.Objects;

// 服务组
public class ServiceGroupModel extends HillStoneGenericModel {
    private Long vendorId; // 所属平台
    private String name; // 名称
    private String type; // 2 预定义 0 自定义
    private String description; // 描述
    private List<RelationModel> members; // 成员，包括服务名称和服务组名称
    private List<Long> serviceIds; // 服务id集合
    private List<Long> serviceGroupIds; // 子服务组id集合

    public Long getVendorId() {
        return vendorId;
    }

    public void setVendorId(Long vendorId) {
        this.vendorId = vendorId;
    }

    public String getName() {
        return name;
    }

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

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public List<RelationModel> getMembers() {
        return members;
    }

    public void setMembers(List<RelationModel> members) {
        this.members = members;
    }

    public List<Long> getServiceIds() {
        return serviceIds;
    }

    public void setServiceIds(List<Long> serviceIds) {
        this.serviceIds = serviceIds;
    }

    public List<Long> getServiceGroupIds() {
        return serviceGroupIds;
    }

    public void setServiceGroupIds(List<Long> serviceGroupIds) {
        this.serviceGroupIds = serviceGroupIds;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

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

    @Override
    public int hashCode() {
        return Objects.hash(vendorId, name);
    }

}
