com.factset.sdk.IRNConfiguration.models.FormulaConfigDto 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;
/**
* FormulaConfigDto
*/
@JsonPropertyOrder({
FormulaConfigDto.JSON_PROPERTY_FORMULA,
FormulaConfigDto.JSON_PROPERTY_FORMULA_TYPE
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class FormulaConfigDto implements Serializable {
private static final long serialVersionUID = 1L;
public static final String JSON_PROPERTY_FORMULA = "formula";
private JsonNullable formula = JsonNullable.undefined();
public static final String JSON_PROPERTY_FORMULA_TYPE = "formulaType";
private JsonNullable formulaType = JsonNullable.undefined();
public FormulaConfigDto() {
}
public FormulaConfigDto formula(String formula) {
this.formula = JsonNullable.of(formula);
return this;
}
/**
* Get formula
* @return formula
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public String getFormula() {
return formula.orElse(null);
}
@JsonProperty(JSON_PROPERTY_FORMULA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getFormula_JsonNullable() {
return formula;
}
@JsonProperty(JSON_PROPERTY_FORMULA)
public void setFormula_JsonNullable(JsonNullable formula) {
this.formula = formula;
}
public void setFormula(String formula) {
this.formula = JsonNullable.of(formula);
}
public FormulaConfigDto formulaType(String formulaType) {
this.formulaType = JsonNullable.of(formulaType);
return this;
}
/**
* Get formulaType
* @return formulaType
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public String getFormulaType() {
return formulaType.orElse(null);
}
@JsonProperty(JSON_PROPERTY_FORMULA_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getFormulaType_JsonNullable() {
return formulaType;
}
@JsonProperty(JSON_PROPERTY_FORMULA_TYPE)
public void setFormulaType_JsonNullable(JsonNullable formulaType) {
this.formulaType = formulaType;
}
public void setFormulaType(String formulaType) {
this.formulaType = JsonNullable.of(formulaType);
}
/**
* Return true if this FormulaConfigDto object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
FormulaConfigDto formulaConfigDto = (FormulaConfigDto) o;
return equalsNullable(this.formula, formulaConfigDto.formula) &&
equalsNullable(this.formulaType, formulaConfigDto.formulaType);
}
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(hashCodeNullable(formula), hashCodeNullable(formulaType));
}
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 FormulaConfigDto {\n");
sb.append(" formula: ").append(toIndentedString(formula)).append("\n");
sb.append(" formulaType: ").append(toIndentedString(formulaType)).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 ");
}
}