@Override public int hashCode() { int result = source != null ? source.hashCode() : 0; result = 31 * result + (message != null ? message.hashCode() : 0); result = 31 * result + (targeting != null ? targeting.hashCode() : 0); result = 31 * result + (feedTargeting != null ? feedTargeting.hashCode() : 0); result = 31 * result + (published != null ? published.hashCode() : 0); result = 31 * result + (scheduledPublishTime != null ? scheduledPublishTime.hashCode() : 0); return result; }
/*package*/ HttpParameter[] asHttpParameterArray() { List<HttpParameter> params = new ArrayList<HttpParameter>(); params.add(new HttpParameter("source", source.getMediaFile())); if (message != null) { params.add(new HttpParameter("message", message)); } if (targeting != null) { params.add(new HttpParameter("targeting", targeting.asJSONString())); } if (feedTargeting != null) { params.add(new HttpParameter("feed_targeting", feedTargeting.asJSONString())); } if (published != null) { params.add(new HttpParameter("published", published)); } if (scheduledPublishTime != null) { params.add(new HttpParameter("scheduled_publish_time", scheduledPublishTime)); } return params.toArray(new HttpParameter[params.size()]); }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof PagePhotoUpdate)) return false; PagePhotoUpdate that = (PagePhotoUpdate) o; if (feedTargeting != null ? !feedTargeting.equals(that.feedTargeting) : that.feedTargeting != null) return false; if (message != null ? !message.equals(that.message) : that.message != null) return false; if (published != null ? !published.equals(that.published) : that.published != null) return false; if (scheduledPublishTime != null ? !scheduledPublishTime.equals(that.scheduledPublishTime) : that.scheduledPublishTime != null) return false; if (source != null ? !source.equals(that.source) : that.source != null) return false; if (targeting != null ? !targeting.equals(that.targeting) : that.targeting != null) return false; return true; }