package com.atmob.voiceai.data.api.bean;

import androidx.annotation.IntDef;
import androidx.databinding.BaseObservable;
import androidx.databinding.Bindable;

import com.atmob.voiceai.BR;
import com.google.gson.annotations.SerializedName;

public class VoiceListBean extends BaseObservable {
    @SerializedName("id")
    private int id;
    @SerializedName("typeId")
    private int typeId;
    @SerializedName("name")
    private String name;
    @SerializedName("avatarUrl")
    private String avatarUrl;
    @SerializedName("voiceUrl")
    private String voiceUrl;
    @SerializedName("hasNew")
    private boolean hasNew;
    @SerializedName("hasPro")
    private boolean hasPro;

    private boolean isAddIcon;

    @SerializedName("voiceType")
    private int voiceType;

    private int viewType;

    private boolean check;

    private String content;

    @VoicePlayState
    private int voicePlayState;

    @IntDef({VoicePlayState.INITIAL, VoicePlayState.LOADING, VoicePlayState.PLAYING})
    public @interface VoicePlayState {

        int INITIAL = 0;
        int LOADING = 1;
        int PLAYING = 2;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getVoiceType() {
        return voiceType;
    }

    @Bindable
    @VoicePlayState
    public int getVoicePlayState() {
        return voicePlayState;
    }

    public void setVoicePlayState(@VoicePlayState int voicePlayState) {
        this.voicePlayState = voicePlayState;
        notifyPropertyChanged(BR.voicePlayState);
    }

    @Bindable
    public boolean isCheck() {
        return check;
    }

    public void setCheck(boolean check) {
        this.check = check;
        notifyPropertyChanged(BR.check);
    }

    public int getViewType() {
        return viewType;
    }

    public void setViewType(int viewType) {
        this.viewType = viewType;
    }

    public void setAddIcon(boolean addIcon) {
        isAddIcon = addIcon;
    }

    public boolean isAddIcon() {
        return isAddIcon;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getTypeId() {
        return typeId;
    }

    public void setTypeId(int typeId) {
        this.typeId = typeId;
    }

    @Bindable
    public String getName() {
        return name;
    }

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

    @Bindable
    public String getAvatarUrl() {
        return avatarUrl;
    }

    public void setAvatarUrl(String avatarUrl) {
        this.avatarUrl = avatarUrl;
        notifyPropertyChanged(BR.avatarUrl);
    }

    public String getVoiceUrl() {
        return voiceUrl;
    }

    public void setVoiceUrl(String voiceUrl) {
        this.voiceUrl = voiceUrl;
    }

    public boolean isHasNew() {
        return hasNew;
    }

    public void setHasNew(boolean hasNew) {
        this.hasNew = hasNew;
    }

    public boolean isHasPro() {
        return hasPro;
    }

    public void setHasPro(boolean hasPro) {
        this.hasPro = hasPro;
    }

}
