io.logicdrop.openapi.models.Field Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sparks-openapi-models Show documentation
Show all versions of sparks-openapi-models Show documentation
Logicdrop Sparks OpenAPI client
/*
* Sparks OpenAPI
* Generated documentation for the Logicdrop Sparks API and OpenAPI clients. Logicdrop Sparks lets users build rules, analyze data, and automate documents. Use it to make decisions faster, generate documents better, and learn from your data. ### Documentation - [User Documentation](https://docs.logicdrop.com) ### Modules - [Sparks Compute](https://docs.logicdrop.com/rules/introduction) - [Sparks Decision Tables](https://docs.logicdrop.com/rules/authoring-decision-tables) - [Sparks Documents](https://docs.logicdrop.com/documents/introduction) ### Clients - [OpenAPI Clients](https://docs.logicdrop.com/development/sample-clients) ### Security - [Authorizing API Requests](https://docs.logicdrop.com/development/authorization)
*
* The version of the OpenAPI document: v_VERSION_, build# _BUILD_
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package io.logicdrop.openapi.models;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* Field
*/
@JsonPropertyOrder({
Field.JSON_PROPERTY_NAME,
Field.JSON_PROPERTY_DISPLAY,
Field.JSON_PROPERTY_DESCRIPTION,
Field.JSON_PROPERTY_DEFAULT_VALUE,
Field.JSON_PROPERTY_FORMAT,
Field.JSON_PROPERTY_TYPE,
Field.JSON_PROPERTY_MODE,
Field.JSON_PROPERTY_MAPPING,
Field.JSON_PROPERTY_ORDER,
Field.JSON_PROPERTY_KEY,
Field.JSON_PROPERTY_INDEX,
Field.JSON_PROPERTY_ENABLED,
Field.JSON_PROPERTY_VISIBLE,
Field.JSON_PROPERTY_REQUIRED,
Field.JSON_PROPERTY_MIN,
Field.JSON_PROPERTY_MAX,
Field.JSON_PROPERTY_PROPERTIES,
Field.JSON_PROPERTY_CHILDREN
})
public class Field {
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public static final String JSON_PROPERTY_DISPLAY = "display";
private String display;
public static final String JSON_PROPERTY_DESCRIPTION = "description";
private String description;
public static final String JSON_PROPERTY_DEFAULT_VALUE = "defaultValue";
private Object defaultValue;
public static final String JSON_PROPERTY_FORMAT = "format";
private String format;
/**
* Gets or Sets type
*/
public enum TypeEnum {
STRING("STRING"),
INTEGER("INTEGER"),
DOUBLE("DOUBLE"),
DECIMAL("DECIMAL"),
BOOLEAN("BOOLEAN"),
OBJECT("OBJECT"),
DATE("DATE"),
DATE_TIME("DATE_TIME"),
TIME("TIME"),
LIST("LIST"),
SET("SET"),
MAP("MAP");
private String value;
TypeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static TypeEnum fromValue(String value) {
for (TypeEnum b : TypeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_TYPE = "type";
private TypeEnum type;
/**
* Gets or Sets mode
*/
public enum ModeEnum {
READ_ONLY("READ_ONLY"),
READ_WRITE("READ_WRITE"),
WRITE_ONLY("WRITE_ONLY");
private String value;
ModeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static ModeEnum fromValue(String value) {
for (ModeEnum b : ModeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_MODE = "mode";
private ModeEnum mode;
public static final String JSON_PROPERTY_MAPPING = "mapping";
private String mapping;
public static final String JSON_PROPERTY_ORDER = "order";
private Integer order;
public static final String JSON_PROPERTY_KEY = "key";
private Boolean key;
public static final String JSON_PROPERTY_INDEX = "index";
private Boolean index;
public static final String JSON_PROPERTY_ENABLED = "enabled";
private Boolean enabled;
public static final String JSON_PROPERTY_VISIBLE = "visible";
private Boolean visible;
public static final String JSON_PROPERTY_REQUIRED = "required";
private Boolean required;
public static final String JSON_PROPERTY_MIN = "min";
private Integer min;
public static final String JSON_PROPERTY_MAX = "max";
private Integer max;
public static final String JSON_PROPERTY_PROPERTIES = "properties";
private Map properties = null;
public static final String JSON_PROPERTY_CHILDREN = "children";
private List children = null;
public Field name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Field display(String display) {
this.display = display;
return this;
}
/**
* Get display
* @return display
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_DISPLAY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getDisplay() {
return display;
}
public void setDisplay(String display) {
this.display = display;
}
public Field description(String description) {
this.description = description;
return this;
}
/**
* Get description
* @return description
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_DESCRIPTION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Field defaultValue(Object defaultValue) {
this.defaultValue = defaultValue;
return this;
}
/**
* Get defaultValue
* @return defaultValue
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_DEFAULT_VALUE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Object getDefaultValue() {
return defaultValue;
}
public void setDefaultValue(Object defaultValue) {
this.defaultValue = defaultValue;
}
public Field format(String format) {
this.format = format;
return this;
}
/**
* Get format
* @return format
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_FORMAT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getFormat() {
return format;
}
public void setFormat(String format) {
this.format = format;
}
public Field type(TypeEnum type) {
this.type = type;
return this;
}
/**
* Get type
* @return type
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public TypeEnum getType() {
return type;
}
public void setType(TypeEnum type) {
this.type = type;
}
public Field mode(ModeEnum mode) {
this.mode = mode;
return this;
}
/**
* Get mode
* @return mode
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ModeEnum getMode() {
return mode;
}
public void setMode(ModeEnum mode) {
this.mode = mode;
}
public Field mapping(String mapping) {
this.mapping = mapping;
return this;
}
/**
* Get mapping
* @return mapping
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAPPING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getMapping() {
return mapping;
}
public void setMapping(String mapping) {
this.mapping = mapping;
}
public Field order(Integer order) {
this.order = order;
return this;
}
/**
* Get order
* @return order
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ORDER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getOrder() {
return order;
}
public void setOrder(Integer order) {
this.order = order;
}
public Field key(Boolean key) {
this.key = key;
return this;
}
/**
* Get key
* @return key
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_KEY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getKey() {
return key;
}
public void setKey(Boolean key) {
this.key = key;
}
public Field index(Boolean index) {
this.index = index;
return this;
}
/**
* Get index
* @return index
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_INDEX)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getIndex() {
return index;
}
public void setIndex(Boolean index) {
this.index = index;
}
public Field enabled(Boolean enabled) {
this.enabled = enabled;
return this;
}
/**
* Get enabled
* @return enabled
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ENABLED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getEnabled() {
return enabled;
}
public void setEnabled(Boolean enabled) {
this.enabled = enabled;
}
public Field visible(Boolean visible) {
this.visible = visible;
return this;
}
/**
* Get visible
* @return visible
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_VISIBLE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getVisible() {
return visible;
}
public void setVisible(Boolean visible) {
this.visible = visible;
}
public Field required(Boolean required) {
this.required = required;
return this;
}
/**
* Get required
* @return required
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_REQUIRED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getRequired() {
return required;
}
public void setRequired(Boolean required) {
this.required = required;
}
public Field min(Integer min) {
this.min = min;
return this;
}
/**
* Get min
* @return min
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MIN)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getMin() {
return min;
}
public void setMin(Integer min) {
this.min = min;
}
public Field max(Integer max) {
this.max = max;
return this;
}
/**
* Get max
* @return max
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAX)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getMax() {
return max;
}
public void setMax(Integer max) {
this.max = max;
}
public Field properties(Map properties) {
this.properties = properties;
return this;
}
public Field putPropertiesItem(String key, Object propertiesItem) {
if (this.properties == null) {
this.properties = new HashMap<>();
}
this.properties.put(key, propertiesItem);
return this;
}
/**
* Get properties
* @return properties
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_PROPERTIES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map getProperties() {
return properties;
}
public void setProperties(Map properties) {
this.properties = properties;
}
public Field children(List children) {
this.children = children;
return this;
}
public Field addChildrenItem(Field childrenItem) {
if (this.children == null) {
this.children = new ArrayList<>();
}
this.children.add(childrenItem);
return this;
}
/**
* Get children
* @return children
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_CHILDREN)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getChildren() {
return children;
}
public void setChildren(List children) {
this.children = children;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Field field = (Field) o;
return Objects.equals(this.name, field.name) &&
Objects.equals(this.display, field.display) &&
Objects.equals(this.description, field.description) &&
Objects.equals(this.defaultValue, field.defaultValue) &&
Objects.equals(this.format, field.format) &&
Objects.equals(this.type, field.type) &&
Objects.equals(this.mode, field.mode) &&
Objects.equals(this.mapping, field.mapping) &&
Objects.equals(this.order, field.order) &&
Objects.equals(this.key, field.key) &&
Objects.equals(this.index, field.index) &&
Objects.equals(this.enabled, field.enabled) &&
Objects.equals(this.visible, field.visible) &&
Objects.equals(this.required, field.required) &&
Objects.equals(this.min, field.min) &&
Objects.equals(this.max, field.max) &&
Objects.equals(this.properties, field.properties) &&
Objects.equals(this.children, field.children);
}
@Override
public int hashCode() {
return Objects.hash(name, display, description, defaultValue, format, type, mode, mapping, order, key, index, enabled, visible, required, min, max, properties, children);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Field {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" display: ").append(toIndentedString(display)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" defaultValue: ").append(toIndentedString(defaultValue)).append("\n");
sb.append(" format: ").append(toIndentedString(format)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" mode: ").append(toIndentedString(mode)).append("\n");
sb.append(" mapping: ").append(toIndentedString(mapping)).append("\n");
sb.append(" order: ").append(toIndentedString(order)).append("\n");
sb.append(" key: ").append(toIndentedString(key)).append("\n");
sb.append(" index: ").append(toIndentedString(index)).append("\n");
sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n");
sb.append(" visible: ").append(toIndentedString(visible)).append("\n");
sb.append(" required: ").append(toIndentedString(required)).append("\n");
sb.append(" min: ").append(toIndentedString(min)).append("\n");
sb.append(" max: ").append(toIndentedString(max)).append("\n");
sb.append(" properties: ").append(toIndentedString(properties)).append("\n");
sb.append(" children: ").append(toIndentedString(children)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}