/*
* Copyright (c) linroid 2015.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.linroid.pushapp.model;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
/**
* Created by linroid on 8/15/15.
*/
public class Auth implements Parcelable {
@Expose
Integer id;
@Expose
User user;
@SerializedName("created_at")
@Expose
private String createdAt;
@SerializedName("updated_at")
@Expose
private String updatedAt;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
public String getCreatedAt() {
return createdAt;
}
public void setCreatedAt(String createdAt) {
this.createdAt = createdAt;
}
public String getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(String updatedAt) {
this.updatedAt = updatedAt;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeValue(this.id);
dest.writeParcelable(this.user, 0);
dest.writeString(this.createdAt);
dest.writeString(this.updatedAt);
}
public Auth() {
}
protected Auth(Parcel in) {
this.id = (Integer) in.readValue(Integer.class.getClassLoader());
this.user = in.readParcelable(User.class.getClassLoader());
this.createdAt = in.readString();
this.updatedAt = in.readString();
}
public static final Parcelable.Creator<Auth> CREATOR = new Parcelable.Creator<Auth>() {
public Auth createFromParcel(Parcel source) {
return new Auth(source);
}
public Auth[] newArray(int size) {
return new Auth[size];
}
};
}