AllSubscribeRequest.java 1.85 KB
package com.cnlive.goldenline.model.request;

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

/**
 * Created by luxiaoman on 2017/4/11.
 */

public class AllSubscribeRequest implements Parcelable {

    int type;
    int page;
    String vdCategoryId;
    String vdCategory;
    String userId;


    public AllSubscribeRequest() {
    }

    public AllSubscribeRequest(int type, int page, String vdCategoryId, String vdCategory, String userId) {
        this.type = type;
        this.page = page;
        this.vdCategoryId = vdCategoryId;
        this.vdCategory = vdCategory;
        this.userId = userId;
    }

    protected AllSubscribeRequest(Parcel in) {
        type = in.readInt();
        page = in.readInt();
        vdCategoryId=in.readString();
        vdCategory=in.readString();
        userId=in.readString();
    }

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

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

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

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(type);
        dest.writeInt(page);
        dest.writeString(vdCategoryId);
        dest.writeString(vdCategory);
        dest.writeString(userId);
    }

    @Override
    public String toString() {
        return "AllSubscribeRequest{" +
                "type=" + type +
                ", page=" + page +
                ", vdCategoryId='" + vdCategoryId + '\'' +
                ", vdCategory='" + vdCategory + '\'' +
                ", userId='" + userId + '\'' +
                '}';
    }
}