com.vk.api.sdk.objects.market.responses.SearchResponse 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.market.responses;
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 com.vk.api.sdk.objects.groups.GroupFull;
import com.vk.api.sdk.objects.market.GlobalSearchFilters;
import com.vk.api.sdk.objects.market.MarketItem;
import com.vk.api.sdk.objects.market.ServicesViewType;
import java.util.List;
import java.util.Objects;
/**
* SearchResponse object
*/
public class SearchResponse implements Validable {
/**
* Total number
*/
@SerializedName("count")
@Required
private Integer count;
@SerializedName("filters")
private GlobalSearchFilters filters;
@SerializedName("groups")
private List groups;
@SerializedName("items")
@Required
private List items;
@SerializedName("variants")
private List variants;
@SerializedName("view_type")
@Required
private ServicesViewType viewType;
public Integer getCount() {
return count;
}
public SearchResponse setCount(Integer count) {
this.count = count;
return this;
}
public GlobalSearchFilters getFilters() {
return filters;
}
public SearchResponse setFilters(GlobalSearchFilters filters) {
this.filters = filters;
return this;
}
public List getGroups() {
return groups;
}
public SearchResponse setGroups(List groups) {
this.groups = groups;
return this;
}
public List getItems() {
return items;
}
public SearchResponse setItems(List items) {
this.items = items;
return this;
}
public List getVariants() {
return variants;
}
public SearchResponse setVariants(List variants) {
this.variants = variants;
return this;
}
public ServicesViewType getViewType() {
return viewType;
}
public SearchResponse setViewType(ServicesViewType viewType) {
this.viewType = viewType;
return this;
}
@Override
public int hashCode() {
return Objects.hash(count, viewType, groups, filters, variants, items);
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
SearchResponse searchResponse = (SearchResponse) o;
return Objects.equals(count, searchResponse.count) &&
Objects.equals(groups, searchResponse.groups) &&
Objects.equals(viewType, searchResponse.viewType) &&
Objects.equals(filters, searchResponse.filters) &&
Objects.equals(variants, searchResponse.variants) &&
Objects.equals(items, searchResponse.items);
}
@Override
public String toString() {
final Gson gson = new Gson();
return gson.toJson(this);
}
public String toPrettyString() {
final StringBuilder sb = new StringBuilder("SearchResponse{");
sb.append("count=").append(count);
sb.append(", groups=").append(groups);
sb.append(", viewType=").append(viewType);
sb.append(", filters=").append(filters);
sb.append(", variants=").append(variants);
sb.append(", items=").append(items);
sb.append('}');
return sb.toString();
}
}