All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.factset.sdk.OpenRisk.models.RiskModelFactorDetails Maven / Gradle / Ivy

There is a newer version: 5.0.2
Show newest version
/*
 * Open:Risk API
 * Service to calculate parametric linear risk statistics and generate risk model asset identifier mappings.
 *
 * The version of the OpenAPI document: 1.26.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;


/**
 * Details about a factor in a risk model
 */
@ApiModel(description = "Details about a factor in a risk model")
@JsonPropertyOrder({
  RiskModelFactorDetails.JSON_PROPERTY_DEFINED_AS,
  RiskModelFactorDetails.JSON_PROPERTY_ID,
  RiskModelFactorDetails.JSON_PROPERTY_NAME
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")

public class RiskModelFactorDetails 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 RiskModelFactorDetails() { 
  }

  @JsonCreator
  public RiskModelFactorDetails(
    @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 RiskModelFactorDetails 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
  **/
  @jakarta.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 RiskModelFactorDetails id(String id) {
    this.id = id;
    return this;
  }

   /**
   * Factor id
   * @return id
  **/
  @jakarta.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 RiskModelFactorDetails name(String name) {
    this.name = name;
    return this;
  }

   /**
   * Factor name
   * @return name
  **/
  @jakarta.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 RiskModelFactorDetails object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    RiskModelFactorDetails riskModelFactorDetails = (RiskModelFactorDetails) o;
    return Objects.equals(this.definedAs, riskModelFactorDetails.definedAs) &&
        Objects.equals(this.id, riskModelFactorDetails.id) &&
        Objects.equals(this.name, riskModelFactorDetails.name);
  }

  @Override
  public int hashCode() {
    return Objects.hash(definedAs, id, name);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class RiskModelFactorDetails {\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    ");
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy