package com.fxy.bean;

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

/**
 * Created by HuangYH on 2015/9/29.
 */
public class ActionBean implements Parcelable {

    public int status;
    public int code = -1;
    public int totalSize = 0;
    public String flag;
    public String msg;
    public String data;

    @Override
    public String toString() {
        return "ActionBean{" +
                "status=" + status +
                ", code=" + code +
                ", totalSize=" + totalSize +
                ", flag='" + flag + '\'' +
                ", msg='" + msg + '\'' +
                ", data='" + data + '\'' +
                '}';
    }

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

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.status);
        dest.writeInt(this.code);
        dest.writeInt(this.totalSize);
        dest.writeString(this.flag);
        dest.writeString(this.msg);
        dest.writeString(this.data);
    }

    public ActionBean() {
    }

    protected ActionBean(Parcel in) {
        this.status = in.readInt();
        this.code = in.readInt();
        this.totalSize = in.readInt();
        this.flag = in.readString();
        this.msg = in.readString();
        this.data = in.readString();
    }

    public static final Parcelable.Creator<ActionBean> CREATOR = new Parcelable.Creator<ActionBean>() {
        @Override
        public ActionBean createFromParcel(Parcel source) {
            return new ActionBean(source);
        }

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