2015-05-05 18:01:02 +02:00
|
|
|
/*
|
2015-05-09 07:20:47 +02:00
|
|
|
* Twidere - Twitter client for Android
|
2015-05-05 18:01:02 +02:00
|
|
|
*
|
|
|
|
* Copyright (C) 2012-2015 Mariotaku Lee <mariotaku.lee@gmail.com>
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2015-12-13 14:30:14 +01:00
|
|
|
package org.mariotaku.twidere.api.twitter.model;
|
2015-05-05 18:01:02 +02:00
|
|
|
|
2016-04-27 16:23:05 +02:00
|
|
|
import android.os.Parcel;
|
|
|
|
import android.os.Parcelable;
|
|
|
|
|
2015-05-05 18:01:02 +02:00
|
|
|
import com.bluelinelabs.logansquare.annotation.JsonField;
|
|
|
|
import com.bluelinelabs.logansquare.annotation.JsonObject;
|
2016-04-27 16:23:05 +02:00
|
|
|
import com.hannesdorfmann.parcelableplease.annotation.ParcelablePlease;
|
2015-05-05 18:01:02 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Created by mariotaku on 15/3/31.
|
|
|
|
*/
|
2016-04-27 16:23:05 +02:00
|
|
|
@ParcelablePlease
|
2015-05-05 18:01:02 +02:00
|
|
|
@JsonObject
|
2016-04-27 16:23:05 +02:00
|
|
|
public class UserEntities implements Parcelable {
|
2015-05-05 18:01:02 +02:00
|
|
|
|
|
|
|
@JsonField(name = "url")
|
2015-12-13 14:30:14 +01:00
|
|
|
Entities url;
|
2015-05-05 18:01:02 +02:00
|
|
|
|
|
|
|
@JsonField(name = "description")
|
2015-12-13 14:30:14 +01:00
|
|
|
Entities description;
|
2015-05-05 18:01:02 +02:00
|
|
|
|
|
|
|
public UrlEntity[] getDescriptionEntities() {
|
|
|
|
if (description == null) return null;
|
|
|
|
return description.getUrls();
|
|
|
|
}
|
|
|
|
|
|
|
|
public UrlEntity[] getUrlEntities() {
|
|
|
|
if (url == null) return null;
|
|
|
|
return url.getUrls();
|
|
|
|
}
|
2015-12-13 14:30:14 +01:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public String toString() {
|
|
|
|
return "UserEntities{" +
|
|
|
|
"url=" + url +
|
|
|
|
", description=" + description +
|
|
|
|
'}';
|
|
|
|
}
|
2016-04-27 16:23:05 +02:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public int describeContents() {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void writeToParcel(Parcel dest, int flags) {
|
|
|
|
UserEntitiesParcelablePlease.writeToParcel(this, dest, flags);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static final Creator<UserEntities> CREATOR = new Creator<UserEntities>() {
|
|
|
|
@Override
|
|
|
|
public UserEntities createFromParcel(Parcel source) {
|
|
|
|
UserEntities target = new UserEntities();
|
|
|
|
UserEntitiesParcelablePlease.readFromParcel(target, source);
|
|
|
|
return target;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public UserEntities[] newArray(int size) {
|
|
|
|
return new UserEntities[size];
|
|
|
|
}
|
|
|
|
};
|
2015-05-05 18:01:02 +02:00
|
|
|
}
|