com.vk.api.sdk.objects.groups.AddressesInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk Show documentation
Show all versions of sdk Show documentation
Java library for VK API interaction, includes OAuth 2.0 authorization and API methods.
The newest version!
// Autogenerated from vk-api-schema. Please don't edit it manually.
package com.vk.api.sdk.objects.groups;
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;
/**
* AddressesInfo object
*/
public class AddressesInfo implements Validable {
/**
* Count of addresses
*/
@SerializedName("count")
private Integer count;
/**
* Information whether addresses is enabled
*/
@SerializedName("is_enabled")
@Required
private Boolean isEnabled;
/**
* Main address
*/
@SerializedName("main_address")
private Address mainAddress;
/**
* Main address id for group
*/
@SerializedName("main_address_id")
private Integer mainAddressId;
public Integer getCount() {
return count;
}
public AddressesInfo setCount(Integer count) {
this.count = count;
return this;
}
public Boolean getIsEnabled() {
return isEnabled;
}
public AddressesInfo setIsEnabled(Boolean isEnabled) {
this.isEnabled = isEnabled;
return this;
}
public Address getMainAddress() {
return mainAddress;
}
public AddressesInfo setMainAddress(Address mainAddress) {
this.mainAddress = mainAddress;
return this;
}
public Integer getMainAddressId() {
return mainAddressId;
}
public AddressesInfo setMainAddressId(Integer mainAddressId) {
this.mainAddressId = mainAddressId;
return this;
}
@Override
public int hashCode() {
return Objects.hash(mainAddressId, isEnabled, count, mainAddress);
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
AddressesInfo addressesInfo = (AddressesInfo) o;
return Objects.equals(isEnabled, addressesInfo.isEnabled) &&
Objects.equals(mainAddress, addressesInfo.mainAddress) &&
Objects.equals(count, addressesInfo.count) &&
Objects.equals(mainAddressId, addressesInfo.mainAddressId);
}
@Override
public String toString() {
final Gson gson = new Gson();
return gson.toJson(this);
}
public String toPrettyString() {
final StringBuilder sb = new StringBuilder("AddressesInfo{");
sb.append("isEnabled=").append(isEnabled);
sb.append(", mainAddress=").append(mainAddress);
sb.append(", count=").append(count);
sb.append(", mainAddressId=").append(mainAddressId);
sb.append('}');
return sb.toString();
}
}