com.factset.sdk.IRNConfiguration.models.OptionsConfigDto Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of irnconfiguration Show documentation
Show all versions of irnconfiguration Show documentation
FactSet SDK for Java - irnconfiguration
/*
* IRN API v1
* Allows users to extract, create, update and configure IRN data.
*
* The version of the OpenAPI document: 1
*
*
* 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.factset.sdk.IRNConfiguration.models;
import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.jackson.nullable.JsonNullable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.openapitools.jackson.nullable.JsonNullable;
import java.util.NoSuchElementException;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.factset.sdk.IRNConfiguration.JSON;
/**
* OptionsConfigDto
*/
@JsonPropertyOrder({
OptionsConfigDto.JSON_PROPERTY_MULTI_SELECT_ENABLED,
OptionsConfigDto.JSON_PROPERTY_ON_THE_FLY_ENABLED,
OptionsConfigDto.JSON_PROPERTY_OPTIONS
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class OptionsConfigDto implements Serializable {
private static final long serialVersionUID = 1L;
public static final String JSON_PROPERTY_MULTI_SELECT_ENABLED = "multiSelectEnabled";
private Boolean multiSelectEnabled;
public static final String JSON_PROPERTY_ON_THE_FLY_ENABLED = "onTheFlyEnabled";
private Boolean onTheFlyEnabled;
public static final String JSON_PROPERTY_OPTIONS = "options";
private JsonNullable> options = JsonNullable.>undefined();
public OptionsConfigDto() {
}
public OptionsConfigDto multiSelectEnabled(Boolean multiSelectEnabled) {
this.multiSelectEnabled = multiSelectEnabled;
return this;
}
/**
* Get multiSelectEnabled
* @return multiSelectEnabled
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MULTI_SELECT_ENABLED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getMultiSelectEnabled() {
return multiSelectEnabled;
}
@JsonProperty(JSON_PROPERTY_MULTI_SELECT_ENABLED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMultiSelectEnabled(Boolean multiSelectEnabled) {
this.multiSelectEnabled = multiSelectEnabled;
}
public OptionsConfigDto onTheFlyEnabled(Boolean onTheFlyEnabled) {
this.onTheFlyEnabled = onTheFlyEnabled;
return this;
}
/**
* Get onTheFlyEnabled
* @return onTheFlyEnabled
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ON_THE_FLY_ENABLED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getOnTheFlyEnabled() {
return onTheFlyEnabled;
}
@JsonProperty(JSON_PROPERTY_ON_THE_FLY_ENABLED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setOnTheFlyEnabled(Boolean onTheFlyEnabled) {
this.onTheFlyEnabled = onTheFlyEnabled;
}
public OptionsConfigDto options(java.util.List options) {
this.options = JsonNullable.>of(options);
return this;
}
public OptionsConfigDto addOptionsItem(String optionsItem) {
if (this.options == null || !this.options.isPresent()) {
this.options = JsonNullable.>of(new java.util.ArrayList<>());
}
try {
this.options.get().add(optionsItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* Get options
* @return options
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public java.util.List getOptions() {
return options.orElse(null);
}
@JsonProperty(JSON_PROPERTY_OPTIONS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable> getOptions_JsonNullable() {
return options;
}
@JsonProperty(JSON_PROPERTY_OPTIONS)
public void setOptions_JsonNullable(JsonNullable> options) {
this.options = options;
}
public void setOptions(java.util.List options) {
this.options = JsonNullable.>of(options);
}
/**
* Return true if this OptionsConfigDto object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
OptionsConfigDto optionsConfigDto = (OptionsConfigDto) o;
return Objects.equals(this.multiSelectEnabled, optionsConfigDto.multiSelectEnabled) &&
Objects.equals(this.onTheFlyEnabled, optionsConfigDto.onTheFlyEnabled) &&
equalsNullable(this.options, optionsConfigDto.options);
}
private static boolean equalsNullable(JsonNullable a, JsonNullable b) {
return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
}
@Override
public int hashCode() {
return Objects.hash(multiSelectEnabled, onTheFlyEnabled, hashCodeNullable(options));
}
private static int hashCodeNullable(JsonNullable a) {
if (a == null) {
return 1;
}
return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OptionsConfigDto {\n");
sb.append(" multiSelectEnabled: ").append(toIndentedString(multiSelectEnabled)).append("\n");
sb.append(" onTheFlyEnabled: ").append(toIndentedString(onTheFlyEnabled)).append("\n");
sb.append(" options: ").append(toIndentedString(options)).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 ");
}
}