package com.bocloud.nms.model.hillstone;

import java.util.Objects;

// 系统用户
public class SystemUserModel extends HillStoneGenericModel {
    private Long vendorId; // 所属平台
    private String name; // 用户名
    private String password; // 密码，接口返回是加密后的，具体加解密算法未知
    private Long roleId; // 角色id
    private String role; // 角色
    private String description; // 描述
    private Boolean console; // 允许Console登录
    private Boolean telnet; // 允许Telnet登录
    private Boolean ssh; // 允许SSH登录
    private Boolean http; // 允许Http登录
    private Boolean https; // 允许Https登录

    public String getName() {
        return name;
    }

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

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String getDescription() {
        return description;
    }

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

    public Boolean getConsole() {
        return console;
    }

    public void setConsole(Boolean console) {
        this.console = console;
    }

    public Boolean getTelnet() {
        return telnet;
    }

    public void setTelnet(Boolean telnet) {
        this.telnet = telnet;
    }

    public Boolean getSsh() {
        return ssh;
    }

    public void setSsh(Boolean ssh) {
        this.ssh = ssh;
    }

    public Boolean getHttp() {
        return http;
    }

    public void setHttp(Boolean http) {
        this.http = http;
    }

    public Boolean getHttps() {
        return https;
    }

    public void setHttps(Boolean https) {
        this.https = https;
    }

    public Long getVendorId() {
        return vendorId;
    }

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

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

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