package org.iotivity.bridge.homeserver.model;

import org.iotivity.oc.OcCborException;
import org.iotivity.oc.OcRepresentation;

import java.util.ArrayList;
import java.util.List;

public class VirtualOCFDevice extends OCFDevice {

    // Virtual OCF Device (VOD) resource names
    static public final String ECONAME_KEY = "econame";

    // Virtual OCF Device variables
    private String vod_id ;
    private int vod_index ;
    private String econame ;

    private boolean discovered ;
    private boolean added_to_bridge ;
    private boolean isOwned ;


    public VirtualOCFDevice(int vod_index, String name, String econame, String virtual_di, String type) {
        super(name, type);

        this.vod_index = vod_index;
        this.econame = econame ;
        this.vod_id = virtual_di ;
    }

    public int getVODIndex() {
        return vod_index;
    }
    public void setVODIndex(int vod_index) {
        this.vod_index = vod_index;
    }

    public String getEcoName() {
        return econame;
    }
    public void setEcoName(String econame) {
        this.econame = econame;
    }

    public String getVirtualDeviceId() {
        return vod_id;
    }
    public void setVirtualDeviceId(String di) {
        this.vod_id = di;
    }

    public boolean isDiscovered() {
        return discovered;
    }
    public void setDiscovered(boolean discovered) {
        this.discovered = discovered;
    }

    public boolean isAddedToBridge() {
        return added_to_bridge;
    }
    public void setAddedToBridge(boolean added) {
        this.added_to_bridge = added;
    }

    @Override
    public String toString() {
        StringBuffer sb = new StringBuffer();
        sb.append("VOD ["+vod_index+"]");
        sb.append(", name="+device_name);
        sb.append(", econame="+econame);
        sb.append(", vod_id="+vod_id);
        sb.append(", isDiscoverd="+discovered);
        sb.append(", addedToBridge="+added_to_bridge);
        sb.append(", isOwned="+isOwned);

        return sb.toString();
    }
}
