com.factset.sdk.OpenRisk.models.InlineResponse2002DataFactors Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openrisk Show documentation
Show all versions of openrisk Show documentation
FactSet SDK for Java - openrisk
/*
* Open:Risk API
* Service to calculate parametric linear risk statistics and generate risk model asset identifier mappings.
*
* The version of the OpenAPI document: 1.24.0
* 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 com.factset.sdk.OpenRisk.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 java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.factset.sdk.OpenRisk.JSON;
/**
* InlineResponse2002DataFactors
*/
@JsonPropertyOrder({
InlineResponse2002DataFactors.JSON_PROPERTY_DEFINED_AS,
InlineResponse2002DataFactors.JSON_PROPERTY_ID,
InlineResponse2002DataFactors.JSON_PROPERTY_NAME
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class InlineResponse2002DataFactors implements Serializable {
private static final long serialVersionUID = 1L;
/**
* Defintion of factor returns. `PercentChg` - Factor returns defined as percent change, which should be geometrically linked to calculate cumulative factor returns `1stDiff` - Factor returns defined as level change. Cumulative returns should be defined as the sum of returns.
*/
public enum DefinedAsEnum {
PERCENTCHG("PercentChg"),
_1STDIFF("1stDiff");
private String value;
DefinedAsEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static DefinedAsEnum fromValue(String value) {
for (DefinedAsEnum b : DefinedAsEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_DEFINED_AS = "definedAs";
private DefinedAsEnum definedAs;
public static final String JSON_PROPERTY_ID = "id";
private String id;
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public InlineResponse2002DataFactors() {
}
@JsonCreator
public InlineResponse2002DataFactors(
@JsonProperty(value=JSON_PROPERTY_DEFINED_AS, required=true) DefinedAsEnum definedAs,
@JsonProperty(value=JSON_PROPERTY_ID, required=true) String id,
@JsonProperty(value=JSON_PROPERTY_NAME, required=true) String name
) {
this();
this.definedAs = definedAs;
this.id = id;
this.name = name;
}
public InlineResponse2002DataFactors definedAs(DefinedAsEnum definedAs) {
this.definedAs = definedAs;
return this;
}
/**
* Defintion of factor returns. `PercentChg` - Factor returns defined as percent change, which should be geometrically linked to calculate cumulative factor returns `1stDiff` - Factor returns defined as level change. Cumulative returns should be defined as the sum of returns.
* @return definedAs
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "Defintion of factor returns. `PercentChg` - Factor returns defined as percent change, which should be geometrically linked to calculate cumulative factor returns `1stDiff` - Factor returns defined as level change. Cumulative returns should be defined as the sum of returns.")
@JsonProperty(JSON_PROPERTY_DEFINED_AS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public DefinedAsEnum getDefinedAs() {
return definedAs;
}
@JsonProperty(JSON_PROPERTY_DEFINED_AS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setDefinedAs(DefinedAsEnum definedAs) {
this.definedAs = definedAs;
}
public InlineResponse2002DataFactors id(String id) {
this.id = id;
return this;
}
/**
* Factor id
* @return id
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "Factor id")
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getId() {
return id;
}
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setId(String id) {
this.id = id;
}
public InlineResponse2002DataFactors name(String name) {
this.name = name;
return this;
}
/**
* Factor name
* @return name
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "Factor name")
@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;
}
/**
* Return true if this inline_response_200_2_data_factors object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
InlineResponse2002DataFactors inlineResponse2002DataFactors = (InlineResponse2002DataFactors) o;
return Objects.equals(this.definedAs, inlineResponse2002DataFactors.definedAs) &&
Objects.equals(this.id, inlineResponse2002DataFactors.id) &&
Objects.equals(this.name, inlineResponse2002DataFactors.name);
}
@Override
public int hashCode() {
return Objects.hash(definedAs, id, name);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class InlineResponse2002DataFactors {\n");
sb.append(" definedAs: ").append(toIndentedString(definedAs)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).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 ");
}
}