/* * Copyright 2015 Google Inc. * * 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 io.plaidapp.data.api.dribbble.model; import android.os.Parcel; import android.os.Parcelable; import java.util.Map; import io.plaidapp.util.ParcelUtils; /** * Models a Dribbble team. */ public class Team implements Parcelable { @SuppressWarnings("unused") public static final Parcelable.Creator<Team> CREATOR = new Parcelable.Creator<Team>() { @Override public Team createFromParcel(Parcel in) { return new Team(in); } @Override public Team[] newArray(int size) { return new Team[size]; } }; public final long id; public final String name; public final String username; public final String html_url; public final String avatar_url; public final String bio; public final String location; public final Map<String, String> links; public Team(long id, String name, String username, String html_url, String avatar_url, String bio, String location, Map<String, String> links) { this.id = id; this.name = name; this.username = username; this.html_url = html_url; this.avatar_url = avatar_url; this.bio = bio; this.location = location; this.links = links; } protected Team(Parcel in) { id = in.readLong(); name = in.readString(); username = in.readString(); html_url = in.readString(); avatar_url = in.readString(); bio = in.readString(); location = in.readString(); links = ParcelUtils.readStringMap(in); } @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel dest, int flags) { dest.writeLong(id); dest.writeString(name); dest.writeString(username); dest.writeString(html_url); dest.writeString(avatar_url); dest.writeString(bio); dest.writeString(location); ParcelUtils.writeStringMap(links, dest); } }