package com.ym.pojo;

import io.rong.messages.BaseMessage;
import org.apache.commons.lang3.StringUtils;

public class CustomMessage extends BaseMessage {
    private Boolean enable;
    private int customType;
    private int rate;
    private int playVolume;
    private String userId;

    public int getPlayVolume() {
        return playVolume;
    }

    public void setPlayVolume(int playVolume) {
        this.playVolume = playVolume;
    }

    public Boolean getEnable() {
        return enable;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }

    public int getCustomType() {
        return customType;
    }

    public void setCustomType(int customType) {
        this.customType = customType;
    }

    public int getRate() {
        return rate;
    }

    public void setRate(int rate) {
        this.rate = rate;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    @Override
    public String getType() {
        return "DY:PlayMidiMessage";
    }

    @Override
    public String toString() {
        return "{\"enable\":" + enable +
                ", \"customType\":" + customType +
                ", \"rate\":" + rate +
                ", \"playVolume\":" + playVolume +
                ", \"userId\":" + (StringUtils.isEmpty(userId)?"\"\"":"\"" + userId + "\"") +
                '}';
    }
}
