Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class CitiesResponse
- {
- @SerializedName("collection")
- @Expose
- //@Valid
- private List<City> cities = new ArrayList<City>();
- @Expose
- private Integer count;
- @Expose
- private String type;
- /**
- *
- * @return The collection
- */
- public List<City> getCities()
- {
- return cities;
- }
- ...
- }
- public class City
- {
- @Expose
- private Integer id;
- @Expose
- private Double lat;
- @Expose
- private Double lng;
- @Expose
- private String name;
- @SerializedName("short_name")
- @Expose
- private String shortName;
- @Expose
- private String state;
- @Expose
- private String timezone;
- @Expose
- private String type;
- /**
- *
- * @return The id
- */
- public Integer getId()
- {
- return id;
- }
- /**
- *
- * @param id
- * The id
- */
- public void setId(Integer id)
- {
- this.id = id;
- }
- public City withId(Integer id)
- {
- this.id = id;
- return this;
- }
- /**
- *
- * @return The lat
- */
- public Double getLat()
- {
- return lat;
- }
- /**
- *
- * @param lat
- * The lat
- */
- public void setLat(Double lat)
- {
- this.lat = lat;
- }
- public City withLat(Double lat)
- {
- this.lat = lat;
- return this;
- }
- /**
- *
- * @return The lng
- */
- public Double getLng()
- {
- return lng;
- }
- /**
- *
- * @param lng
- * The lng
- */
- public void setLng(Double lng)
- {
- this.lng = lng;
- }
- public City withLng(Double lng)
- {
- this.lng = lng;
- return this;
- }
- /**
- *
- * @return The name
- */
- public String getName()
- {
- return name;
- }
- /**
- *
- * @param name
- * The name
- */
- public void setName(String name)
- {
- this.name = name;
- }
- public City withName(String name)
- {
- this.name = name;
- return this;
- }
- /**
- *
- * @return The shortName
- */
- public String getShortName()
- {
- return shortName;
- }
- /**
- *
- * @param shortName
- * The short_name
- */
- public void setShortName(String shortName)
- {
- this.shortName = shortName;
- }
- public City withShortName(String shortName)
- {
- this.shortName = shortName;
- return this;
- }
- /**
- *
- * @return The state
- */
- public String getState()
- {
- return state;
- }
- /**
- *
- * @param state
- * The state
- */
- public void setState(String state)
- {
- this.state = state;
- }
- public City withState(String state)
- {
- this.state = state;
- return this;
- }
- /**
- *
- * @return The timezone
- */
- public String getTimezone()
- {
- return timezone;
- }
- /**
- *
- * @param timezone
- * The timezone
- */
- public void setTimezone(String timezone)
- {
- this.timezone = timezone;
- }
- public City withTimezone(String timezone)
- {
- this.timezone = timezone;
- return this;
- }
- /**
- *
- * @return The type
- */
- public String getType()
- {
- return type;
- }
- /**
- *
- * @param type
- * The type
- */
- public void setType(String type)
- {
- this.type = type;
- }
- public City withType(String type)
- {
- this.type = type;
- return this;
- }
- @Override
- public String toString()
- {
- return ToStringBuilder.reflectionToString(this);
- }
- @Override
- public int hashCode()
- {
- return new HashCodeBuilder().append(id).append(lat).append(lng)
- .append(name).append(shortName).append(state).append(timezone)
- .append(type).toHashCode();
- }
- @Override
- public boolean equals(Object other)
- {
- if (other == this)
- {
- return true;
- }
- if ((other instanceof City) == false)
- {
- return false;
- }
- City rhs = ((City) other);
- return new EqualsBuilder().append(id, rhs.id).append(lat, rhs.lat)
- .append(lng, rhs.lng).append(name, rhs.name)
- .append(shortName, rhs.shortName).append(state, rhs.state)
- .append(timezone, rhs.timezone).append(type, rhs.type)
- .isEquals();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement