wjc
2023-06-28 14de918a79943e4961b09fa01ed320c6cad41f2e
HDLLinkLocalSdk/src/main/java/com/hdl/sdk/link/core/bean/gateway/GatewayBean.java
New file
@@ -0,0 +1,349 @@
package com.hdl.sdk.link.core.bean.gateway;
import android.text.TextUtils;
import androidx.annotation.NonNull;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
 * Created by hxb on 2021/12/15.
 * 网关对象
 */
public class GatewayBean implements Serializable {
    /**
     * true-在线
     * false-离线
     */
    private boolean online=true;
    /**
     * 网关型号
     */
    private String device_model;
    /**
     * 网关备注
     */
    private String device_name;
    /**
     * 网关Mac
     */
    private String device_mac;
    /**
     * 网关Id
     */
    private String gatewayId;
    /**
     * 网关类型
     */
    private String gatewayType;
    private String gateway_type;
    /**
     * 网关oid
     */
    private String oid;
    /**
     * IP地址
     */
    private String ip_address;
    /**
     * 连接的网关类型 LAN WIFI
     */
    private String access_mode;
    /**
     * 是否主网关 true false
     */
    private String master;
    /**
     * 是否加密
     */
    private boolean isLocalEncrypt;
    /**
     * 是否本地网关
     */
    private boolean isLocalGateWay;
    /**
     * 住宅Id
     */
    private String homeId;
    /**
     * 使用mqtt的时候需要解密
     */
    private String aesKey;
    private String deviceId;
    /**
     * 毫米波sid
     */
    private String sid;
    /**
     * 设备来源(自定义:0=表示网关;1=表示平台)
     */
    private String src;
    public String getSrc() {
        return src==null?"":this.src;
    }
    public void setSrc(String src) {
        this.src = src;
    }
    public String getAesKey() {
        return aesKey == null ? "" : aesKey;
    }
    public void setAesKey(@NonNull String aesKey) {
        this.aesKey = aesKey;
    }
    public String getDeviceId() {
        return deviceId == null ? "" : deviceId;
    }
    public void setDeviceId(@NonNull String deviceId) {
        this.deviceId = deviceId;
    }
    public boolean getOnline() {
        return online;
    }
    public void setOnline(boolean online) {
        this.online = online;
    }
    /**
     * 网关型号
     */
    public String getDevice_model() {
        return device_model == null ? "" : device_model;
    }
    /**
     * 网关型号
     */
    public void setDevice_model(String device_model) {
        this.device_model = device_model;
    }
    /**
     * 网关备注
     */
    public String getDevice_name() {
        if(TextUtils.isEmpty(device_name)){
            return getDevice_model();
        }else {
        }
        return device_name;
    }
    /**
     * 模板匹配标记 wxr 自定义 2022-02-23 16:09:44
     */
    private boolean templateSettingFlag = false;
    public boolean isTemplateSettingFlag() {
        return templateSettingFlag;
    }
    public void setTemplateSettingFlag(boolean templateSettingFlag) {
        this.templateSettingFlag = templateSettingFlag;
    }
    private String templateAddr ;
    public String getTemplateAddr() {
        return templateAddr == null ? "" : templateAddr;
    }
    public void setTemplateAddr(String templateAddr) {
        this.templateAddr = templateAddr;
    }
    /**
     * 网关备注
     */
    public void setDevice_name(String device_name) {
        this.device_name = device_name;
    }
    /**
     * 网关Mac
     * @return
     */
    @NonNull
    public String getDevice_mac() {
        return TextUtils.isEmpty(device_mac) ? "" : device_mac;
    }
    /**
     * 网关Mac
     */
    public void setDevice_mac(String device_mac) {
        this.device_mac = device_mac;
    }
    /**
     * 网关Id
     */
    @NonNull
    public String getGatewayId() {
        return TextUtils.isEmpty(gatewayId) ? getOid() : gatewayId;
    }
    /**
     * 网关Id
     */
    public void setGatewayId(String gatewayId) {
        this.gatewayId = gatewayId;
    }
    /**
     * 网关类型
     */
    @NonNull
    public String getGatewayType() {
        return gatewayType == null ? "" : gatewayType;
    }
    /**
     * 网关类型
     */
    public void setGatewayType(String gatewayType) {
        this.gatewayType = gatewayType;
    }
    @NonNull
    public String getGateway_type() {
        return gateway_type == null ? "" : gateway_type;
    }
    public void setGateway_type(String gateway_type) {
        this.gateway_type = gateway_type;
    }
    /**
     * 网关Oid
     */
    @NonNull
    public String getOid() {
        return TextUtils.isEmpty(oid) ? getDevice_mac() : oid;
    }
    /**
     * 网关Oid
     */
    public void setOid(String oid) {
        this.oid = oid;
    }
    /**
     * IP地址
     */
    @NonNull
    public String getIp_address() {
        return ip_address == null ? "" : ip_address;
    }
    /**
     * IP地址
     */
    public void setIp_address(String ip_address) {
        this.ip_address = ip_address;
    }
    /**
     * 连接的网关类型 LAN WIFI
     */
    @NonNull
    public String getAccess_mode() {
        return access_mode == null ? "" : access_mode;
    }
    /**
     * 连接的网关类型 LAN WIFI
     */
    public void setAccess_mode(String access_mode) {
        this.access_mode = access_mode;
    }
    /**
     * 是否主网关 true false
     */
    public String getMaster() {
        return master == null ? "" : master;
    }
    /**
     * 是否主网关 true false no_config
     */
    public void setMaster(String master) {
        this.master = master;
    }
    /**
     * 是否加密
     */
    public boolean getIsLocalEncrypt() {
        return isLocalEncrypt;
    }
    /**
     * 是否加密
     */
    public void setIsLocalEncrypt(boolean localEncrypt) {
        isLocalEncrypt = localEncrypt;
    }
    /**
     * 获取住宅Id
     */
    @NonNull
    public String getHomeId() {
        return homeId == null ? "" : homeId;
    }
    /**
     * 设置住宅Id
     */
    public void setHomeId(String homeId) {
        this.homeId = homeId;
    }
    /**
     * 获取毫米波sid
     * @return sid
     */
    public String getSid() {
        return sid==null?"":this.sid;
    }
    /**
     * 设置毫米波sid
     */
    public void setSid(String sid) {
        this.sid = sid;
    }
    /**
     * 是否本地网关 true false
     */
    public void setIsLocalGateWay(boolean isLocalGateWay) {
        this.isLocalGateWay = isLocalGateWay;
    }
    /**
     * 获取网关是否本地网关
     */
    public boolean getIsLocalGateway() {
        return this.isLocalGateWay;
    }
    /*
    * 模板标记 wxr
    * */
    private boolean templateFlag = false;
    public boolean isLocalEncrypt() {
        return isLocalEncrypt;
    }
    public void setLocalEncrypt(boolean localEncrypt) {
        isLocalEncrypt = localEncrypt;
    }
}