-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDiet.java
58 lines (47 loc) · 1.05 KB
/
Diet.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package com.deange.uwaterlooapi.model.foodservices;
import android.os.Parcel;
import android.os.Parcelable;
import com.deange.uwaterlooapi.model.BaseModel;
import com.google.gson.annotations.SerializedName;
public class Diet
extends BaseModel
implements
Parcelable {
@SerializedName("diet_id")
int mId;
@SerializedName("diet_type")
String mType;
protected Diet(final Parcel in) {
super(in);
mId = in.readInt();
mType = in.readString();
}
@Override
public void writeToParcel(final Parcel dest, final int flags) {
super.writeToParcel(dest, flags);
dest.writeInt(mId);
dest.writeString(mType);
}
public static final Creator<Diet> CREATOR = new Creator<Diet>() {
@Override
public Diet createFromParcel(final Parcel in) {
return new Diet(in);
}
@Override
public Diet[] newArray(final int size) {
return new Diet[size];
}
};
/**
* Diet ID number
*/
public int getId() {
return mId;
}
/**
* Diet type
*/
public String getType() {
return mType;
}
}