package com.example.doctor_app_flutter.Model;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

public class GetSessionStatusModel implements Parcelable {

    @SerializedName("VC_ID")
    @Expose
    private Integer vCID;
    @SerializedName("TokenID")
    @Expose
    private String tokenID;
    @SerializedName("generalid")
    @Expose
    private String generalid;
    @SerializedName("DoctorId")
    @Expose
    private Integer doctorId;

    public GetSessionStatusModel() {
    }

    public GetSessionStatusModel(Integer vCID, String tokenID, String generalid, Integer doctorId) {
        this.vCID = vCID;
        this.tokenID = tokenID;
        this.generalid = generalid;
        this.doctorId = doctorId;
    }

    protected GetSessionStatusModel(Parcel in) {
        if (in.readByte() == 0) {
            vCID = null;
        } else {
            vCID = in.readInt();
        }
        tokenID = in.readString();
        generalid = in.readString();
        if (in.readByte() == 0) {
            doctorId = null;
        } else {
            doctorId = in.readInt();
        }
    }

    public static final Creator<GetSessionStatusModel> CREATOR = new Creator<GetSessionStatusModel>() {
        @Override
        public GetSessionStatusModel createFromParcel(Parcel in) {
            return new GetSessionStatusModel(in);
        }

        @Override
        public GetSessionStatusModel[] newArray(int size) {
            return new GetSessionStatusModel[size];
        }
    };

    public Integer getVCID() {
        return vCID;
    }

    public void setVCID(Integer vCID) {
        this.vCID = vCID;
    }

    public String getTokenID() {
        return tokenID;
    }

    public void setTokenID(String tokenID) {
        this.tokenID = tokenID;
    }

    public String getGeneralid() {
        return generalid;
    }

    public void setGeneralid(String generalid) {
        this.generalid = generalid;
    }

    public Integer getDoctorId() {
        return doctorId;
    }

    public void setDoctorId(Integer doctorId) {
        this.doctorId = doctorId;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        if (vCID == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(vCID);
        }
        dest.writeString(tokenID);
        dest.writeString(generalid);
        if (doctorId == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(doctorId);
        }
    }
}
