package org.holer.common.model;

import java.util.Arrays;


public class HolerMsg {
    public static final byte TYPE_AUTH = 1;
    public static final byte TYPE_NO_AVAILABLE_PORT = 2;
    public static final byte TYPE_CONNECT = 3;
    public static final byte TYPE_DISCONNECT = 4;
    public static final byte TYPE_TRANSFER = 5;
    public static final byte TYPE_IS_INUSE_KEY = 6;
    public static final byte TYPE_HEARTBEAT = 7;
    public static final byte TYPE_DISABLED_ACCESS_KEY = 8;
    public static final byte TYPE_DISABLED_TRIAL_CLIENT = 9;
    public static final byte TYPE_INVALID_KEY = 16;
    private byte type;
    private long serialNumber;
    private String uri;
    private byte[] data;

    public byte getType() {
        return this.type;
    }


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


    public long getSerialNumber() {
        return this.serialNumber;
    }


    public void setSerialNumber(long serialNumber) {
        this.serialNumber = serialNumber;
    }


    public String getUri() {
        return this.uri;
    }


    public void setUri(String uri) {
        this.uri = uri;
    }


    public byte[] getData() {
        return this.data;
    }


    public void setData(byte[] data) {
        this.data = data;
    }


    public String toString() {
        StringBuilder builder = new StringBuilder();
        builder.append("HolerMsg [type=");
        builder.append(this.type);
        builder.append(", serialNumber=");
        builder.append(this.serialNumber);
        builder.append(", uri=");
        builder.append(this.uri);
        builder.append(", data=");
        builder.append(Arrays.toString(this.data));
        builder.append("]");
        return builder.toString();
    }
}
