
com.dominodatalab.pub.model.DefinedSchemaValue Maven / Gradle / Ivy
/*
* Domino Public API
* Domino Public API Endpoints
*
* The version of the OpenAPI document: 0.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.dominodatalab.pub.model;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.dominodatalab.pub.model.SchemaValueDataType;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.dominodatalab.pub.invoker.ApiClient;
/**
* DefinedSchemaValue
*/
@JsonPropertyOrder({
DefinedSchemaValue.JSON_PROPERTY_DESCRIPTION,
DefinedSchemaValue.JSON_PROPERTY_GROUP,
DefinedSchemaValue.JSON_PROPERTY_NAME,
DefinedSchemaValue.JSON_PROPERTY_TITLE,
DefinedSchemaValue.JSON_PROPERTY_TYPE,
DefinedSchemaValue.JSON_PROPERTY_VALUE
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-04T16:37:28.765500600-04:00[America/New_York]", comments = "Generator version: 7.8.0")
public class DefinedSchemaValue {
public static final String JSON_PROPERTY_DESCRIPTION = "description";
private String description;
public static final String JSON_PROPERTY_GROUP = "group";
private String group;
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public static final String JSON_PROPERTY_TITLE = "title";
private String title;
public static final String JSON_PROPERTY_TYPE = "type";
private SchemaValueDataType type;
public static final String JSON_PROPERTY_VALUE = "value";
private String value;
public DefinedSchemaValue() {
}
public DefinedSchemaValue description(String description) {
this.description = description;
return this;
}
/**
* Description for the property
* @return description
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_DESCRIPTION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getDescription() {
return description;
}
@JsonProperty(JSON_PROPERTY_DESCRIPTION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDescription(String description) {
this.description = description;
}
public DefinedSchemaValue group(String group) {
this.group = group;
return this;
}
/**
* Name of group where other fields of the same group will be displayed
* @return group
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_GROUP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getGroup() {
return group;
}
@JsonProperty(JSON_PROPERTY_GROUP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setGroup(String group) {
this.group = group;
}
public DefinedSchemaValue name(String name) {
this.name = name;
return this;
}
/**
* Internal name of the property
* @return name
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getName() {
return name;
}
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setName(String name) {
this.name = name;
}
public DefinedSchemaValue title(String title) {
this.title = title;
return this;
}
/**
* Label for the property
* @return title
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_TITLE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getTitle() {
return title;
}
@JsonProperty(JSON_PROPERTY_TITLE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setTitle(String title) {
this.title = title;
}
public DefinedSchemaValue type(SchemaValueDataType type) {
this.type = type;
return this;
}
/**
* Get type
* @return type
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_TYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public SchemaValueDataType getType() {
return type;
}
@JsonProperty(JSON_PROPERTY_TYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setType(SchemaValueDataType type) {
this.type = type;
}
public DefinedSchemaValue value(String value) {
this.value = value;
return this;
}
/**
* Get value
* @return value
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_VALUE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getValue() {
return value;
}
@JsonProperty(JSON_PROPERTY_VALUE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setValue(String value) {
this.value = value;
}
/**
* Return true if this DefinedSchemaValue object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DefinedSchemaValue definedSchemaValue = (DefinedSchemaValue) o;
return Objects.equals(this.description, definedSchemaValue.description) &&
Objects.equals(this.group, definedSchemaValue.group) &&
Objects.equals(this.name, definedSchemaValue.name) &&
Objects.equals(this.title, definedSchemaValue.title) &&
Objects.equals(this.type, definedSchemaValue.type) &&
Objects.equals(this.value, definedSchemaValue.value);
}
@Override
public int hashCode() {
return Objects.hash(description, group, name, title, type, value);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DefinedSchemaValue {\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" group: ").append(toIndentedString(group)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" value: ").append(toIndentedString(value)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
/**
* Convert the instance into URL query string.
*
* @return URL query string
*/
public String toUrlQueryString() {
return toUrlQueryString(null);
}
/**
* Convert the instance into URL query string.
*
* @param prefix prefix of the query string
* @return URL query string
*/
public String toUrlQueryString(String prefix) {
String suffix = "";
String containerSuffix = "";
String containerPrefix = "";
if (prefix == null) {
// style=form, explode=true, e.g. /pet?name=cat&type=manx
prefix = "";
} else {
// deepObject style e.g. /pet?id[name]=cat&id[type]=manx
prefix = prefix + "[";
suffix = "]";
containerSuffix = "]";
containerPrefix = "[";
}
StringJoiner joiner = new StringJoiner("&");
// add `description` to the URL query string
if (getDescription() != null) {
joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `group` to the URL query string
if (getGroup() != null) {
joiner.add(String.format("%sgroup%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getGroup()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `name` to the URL query string
if (getName() != null) {
joiner.add(String.format("%sname%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `title` to the URL query string
if (getTitle() != null) {
joiner.add(String.format("%stitle%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getTitle()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `type` to the URL query string
if (getType() != null) {
joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `value` to the URL query string
if (getValue() != null) {
joiner.add(String.format("%svalue%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getValue()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
return joiner.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy