package com.chute.sdk.v2.model; import android.os.Parcel; import android.os.Parcelable; import com.fasterxml.jackson.annotation.JsonProperty; public class StoreModel implements Parcelable { @JsonProperty("id") private String id; @JsonProperty("created_at") private String createdAt; @JsonProperty("updated_at") private String updatedAt; @JsonProperty("value") private String value; @JsonProperty("url") private String url; public StoreModel() { } public String getId() { return id; } public void setId(String id) { this.id = id; } 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; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("StoreModel [id="); builder.append(id); builder.append(", createdAt="); builder.append(createdAt); builder.append(", updatedAt="); builder.append(updatedAt); builder.append(", value="); builder.append(value); builder.append(", url="); builder.append(url); builder.append("]"); return builder.toString(); } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((createdAt == null) ? 0 : createdAt.hashCode()); result = prime * result + ((id == null) ? 0 : id.hashCode()); result = prime * result + ((updatedAt == null) ? 0 : updatedAt.hashCode()); result = prime * result + ((url == null) ? 0 : url.hashCode()); result = prime * result + ((value == null) ? 0 : value.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; StoreModel other = (StoreModel) obj; if (createdAt == null) { if (other.createdAt != null) return false; } else if (!createdAt.equals(other.createdAt)) return false; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; if (updatedAt == null) { if (other.updatedAt != null) return false; } else if (!updatedAt.equals(other.updatedAt)) return false; if (url == null) { if (other.url != null) return false; } else if (!url.equals(other.url)) return false; if (value == null) { if (other.value != null) return false; } else if (!value.equals(other.value)) return false; return true; } public StoreModel(Parcel in) { id = in.readString(); createdAt = in.readString(); updatedAt = in.readString(); value = in.readString(); url = in.readString(); } @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel dest, int flags) { dest.writeString(id); dest.writeString(createdAt); dest.writeString(updatedAt); dest.writeString(value); dest.writeString(url); } public static final Creator<StoreModel> CREATOR = new Creator<StoreModel>() { @Override public StoreModel createFromParcel(Parcel in) { return new StoreModel(in); } @Override public StoreModel[] newArray(int size) { return new StoreModel[size]; } }; }