
com.vk.api.sdk.objects.base.Country Maven / Gradle / Ivy
// Autogenerated from vk-api-schema. Please don't edit it manually.
package com.vk.api.sdk.objects.base;
import com.google.gson.Gson;
import com.google.gson.annotations.SerializedName;
import com.vk.api.sdk.objects.Validable;
import com.vk.api.sdk.objects.annotations.Required;
import java.util.Objects;
/**
* Country object
*/
public class Country implements Validable {
/**
* Country ID
*/
@SerializedName("id")
@Required
private Integer id;
/**
* Country title
*/
@SerializedName("title")
@Required
private String title;
public Integer getId() {
return id;
}
public Country setId(Integer id) {
this.id = id;
return this;
}
public String getTitle() {
return title;
}
public Country setTitle(String title) {
this.title = title;
return this;
}
@Override
public int hashCode() {
return Objects.hash(id, title);
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Country country = (Country) o;
return Objects.equals(id, country.id) &&
Objects.equals(title, country.title);
}
@Override
public String toString() {
final Gson gson = new Gson();
return gson.toJson(this);
}
public String toPrettyString() {
final StringBuilder sb = new StringBuilder("Country{");
sb.append("id=").append(id);
sb.append(", title='").append(title).append("'");
sb.append('}');
return sb.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy