com.vk.api.sdk.objects.leadforms.QuestionItem 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.leadforms;
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.List;
import java.util.Objects;
/**
* QuestionItem object
*/
public class QuestionItem implements Validable {
@SerializedName("key")
@Required
private String key;
@SerializedName("label")
private String label;
/**
* Опции выбора для типов radio, checkbox, select
*/
@SerializedName("options")
private List options;
@SerializedName("type")
@Required
private QuestionItemType type;
public String getKey() {
return key;
}
public QuestionItem setKey(String key) {
this.key = key;
return this;
}
public String getLabel() {
return label;
}
public QuestionItem setLabel(String label) {
this.label = label;
return this;
}
public List getOptions() {
return options;
}
public QuestionItem setOptions(List options) {
this.options = options;
return this;
}
public QuestionItemType getType() {
return type;
}
public QuestionItem setType(QuestionItemType type) {
this.type = type;
return this;
}
@Override
public int hashCode() {
return Objects.hash(options, label, type, key);
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
QuestionItem questionItem = (QuestionItem) o;
return Objects.equals(options, questionItem.options) &&
Objects.equals(label, questionItem.label) &&
Objects.equals(type, questionItem.type) &&
Objects.equals(key, questionItem.key);
}
@Override
public String toString() {
final Gson gson = new Gson();
return gson.toJson(this);
}
public String toPrettyString() {
final StringBuilder sb = new StringBuilder("QuestionItem{");
sb.append("options=").append(options);
sb.append(", label='").append(label).append("'");
sb.append(", type='").append(type).append("'");
sb.append(", key='").append(key).append("'");
sb.append('}');
return sb.toString();
}
}