blob: e72a9432a99620962693f349b9114d397633d1bf [file] [log] [blame]
/*
* DO NOT MODIFY.
* This file was auto-generated by Buck.
*/
package com.example;
import android.os.Parcel;
import android.os.Parcelable;
import com.example.Person;
import com.example.Principal;
import com.example.Teacher;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
public class GeneratedStudent extends Person implements Parcelable {
@JsonProperty
protected final int id;
@JsonProperty
protected final String name;
@JsonProperty
protected final float gpa;
@JsonProperty("days_of_school_left")
protected final byte daysOfSchoolLeft;
@JsonProperty
protected final Principal principal;
@JsonProperty("is_graduated")
protected final boolean isGraduated;
@JsonProperty
protected final List<String> grades;
@JsonProperty
protected final String[] schedule;
@JsonProperty
protected final List<Teacher> teachers;
private List metadata;
public GeneratedStudent() {
super();
this.id = 0;
this.name = null;
this.gpa = 0;
this.daysOfSchoolLeft = 0;
this.principal = null;
this.isGraduated = false;
this.grades = null;
this.schedule = null;
this.teachers = ImmutableList.of();
this.metadata = null;
}
public GeneratedStudent(
boolean isMale, int age,
int id,
String name,
float gpa,
byte daysOfSchoolLeft,
Principal principal,
boolean isGraduated,
List<String> grades,
String[] schedule,
List<Teacher> teachers,
List metadata) {
super(isMale, age);
this.id = id;
this.name = name;
this.gpa = gpa;
this.daysOfSchoolLeft = daysOfSchoolLeft;
this.principal = principal;
this.isGraduated = isGraduated;
this.grades = grades;
this.schedule = schedule;
this.teachers = teachers;
this.metadata = metadata;
}
public GeneratedStudent(Parcel parcel) {
super(parcel);
this.id = parcel.readInt();
this.name = parcel.readString();
this.gpa = parcel.readFloat();
this.daysOfSchoolLeft = parcel.readByte();
this.principal = parcel.readParcelable(Principal.class.getClassLoader());
this.isGraduated = parcel.readByte() != 0;
this.grades = parcel.createStringArrayList();
this.schedule = parcel.createStringArray();
this.teachers = Lists.newArrayList();
parcel.readTypedList(this.teachers, Teacher.CREATOR);
this.metadata = parcel.readArrayList(null /* classLoader */);
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(this.id);
dest.writeString(this.name);
dest.writeFloat(this.gpa);
dest.writeByte(this.daysOfSchoolLeft);
dest.writeParcelable(this.principal, flags);
dest.writeByte((byte)(this.isGraduated ? 1 : 0));
dest.writeStringList(this.grades);
dest.writeStringArray(this.schedule);
dest.writeTypedList(this.teachers);
dest.writeList(this.metadata);
}
public static final Parcelable.Creator<com.example.Student> CREATOR = new Parcelable.Creator<com.example.Student>() {
public com.example.Student createFromParcel(Parcel in) {
return new com.example.Student(in);
}
public com.example.Student[] newArray(int size) {
return new com.example.Student[size];
}
};
}