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

com.factset.sdk.FactSetBenchmarks.models.IndexHistory Maven / Gradle / Ivy

The newest version!
/*
 * FactSet Benchmarks API
 * FactSet Benchmarks API gives access to Index Constituents, Prices, Returns, and Ratios. For a sample list of identifiers, use the /metrics endpoint. Equity Only - Fixed Income Benchmark support coming soon. 
 *
 * The version of the OpenAPI document: 1.8.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.FactSetBenchmarks.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.time.LocalDate;
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.FactSetBenchmarks.JSON;


/**
 * IndexHistory
 */
@JsonPropertyOrder({
  IndexHistory.JSON_PROPERTY_FSYM_ID,
  IndexHistory.JSON_PROPERTY_DATE,
  IndexHistory.JSON_PROPERTY_NAME,
  IndexHistory.JSON_PROPERTY_CONSTITUENT_NUMBER,
  IndexHistory.JSON_PROPERTY_CURRENCY,
  IndexHistory.JSON_PROPERTY_MARKET_VALUE,
  IndexHistory.JSON_PROPERTY_PRICE,
  IndexHistory.JSON_PROPERTY_PRICE_RETURN_PERCENT,
  IndexHistory.JSON_PROPERTY_TOTAL_RETURN_LEVEL,
  IndexHistory.JSON_PROPERTY_TOTAL_RETURN_PERCENT,
  IndexHistory.JSON_PROPERTY_RETURN_TYPE,
  IndexHistory.JSON_PROPERTY_HEDGE_TYPE,
  IndexHistory.JSON_PROPERTY_REQUEST_ID,
  IndexHistory.JSON_PROPERTY_OBSERVATION_DATE
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")

public class IndexHistory implements Serializable {
  private static final long serialVersionUID = 1L;

  public static final String JSON_PROPERTY_FSYM_ID = "fsymId";
  private JsonNullable fsymId = JsonNullable.undefined();

  public static final String JSON_PROPERTY_DATE = "date";
  private JsonNullable date = JsonNullable.undefined();

  public static final String JSON_PROPERTY_NAME = "name";
  private JsonNullable name = JsonNullable.undefined();

  public static final String JSON_PROPERTY_CONSTITUENT_NUMBER = "constituentNumber";
  private JsonNullable constituentNumber = JsonNullable.undefined();

  public static final String JSON_PROPERTY_CURRENCY = "currency";
  private JsonNullable currency = JsonNullable.undefined();

  public static final String JSON_PROPERTY_MARKET_VALUE = "marketValue";
  private JsonNullable marketValue = JsonNullable.undefined();

  public static final String JSON_PROPERTY_PRICE = "price";
  private JsonNullable price = JsonNullable.undefined();

  public static final String JSON_PROPERTY_PRICE_RETURN_PERCENT = "priceReturnPercent";
  private JsonNullable priceReturnPercent = JsonNullable.undefined();

  public static final String JSON_PROPERTY_TOTAL_RETURN_LEVEL = "totalReturnLevel";
  private JsonNullable totalReturnLevel = JsonNullable.undefined();

  public static final String JSON_PROPERTY_TOTAL_RETURN_PERCENT = "totalReturnPercent";
  private JsonNullable totalReturnPercent = JsonNullable.undefined();

  public static final String JSON_PROPERTY_RETURN_TYPE = "returnType";
  private JsonNullable returnType = JsonNullable.undefined();

  public static final String JSON_PROPERTY_HEDGE_TYPE = "hedgeType";
  private JsonNullable hedgeType = JsonNullable.undefined();

  public static final String JSON_PROPERTY_REQUEST_ID = "requestId";
  private String requestId;

  public static final String JSON_PROPERTY_OBSERVATION_DATE = "observationDate";
  private JsonNullable observationDate = JsonNullable.undefined();

  public IndexHistory() { 
  }

  public IndexHistory fsymId(String fsymId) {
    this.fsymId = JsonNullable.of(fsymId);
    return this;
  }

   /**
   * Requested Identifier. Must be a valid Benchmark Identifier recognized by FactSet.
   * @return fsymId
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "SP50", value = "Requested Identifier. Must be a valid Benchmark Identifier recognized by FactSet.")
  @JsonIgnore

  public String getFsymId() {
        return fsymId.orElse(null);
  }

  @JsonProperty(JSON_PROPERTY_FSYM_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public JsonNullable getFsymId_JsonNullable() {
    return fsymId;
  }
  
  @JsonProperty(JSON_PROPERTY_FSYM_ID)
  public void setFsymId_JsonNullable(JsonNullable fsymId) {
    this.fsymId = fsymId;
  }

  public void setFsymId(String fsymId) {
    this.fsymId = JsonNullable.of(fsymId);
  }


  public IndexHistory date(LocalDate date) {
    this.date = JsonNullable.of(date);
    return this;
  }

   /**
   * The respective date for values as of the date requested in YYYY-MM-DD format.
   * @return date
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "Wed Jul 01 00:00:00 UTC 2020", value = "The respective date for values as of the date requested in YYYY-MM-DD format.")
  @JsonIgnore

  public LocalDate getDate() {
        return date.orElse(null);
  }

  @JsonProperty(JSON_PROPERTY_DATE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public JsonNullable getDate_JsonNullable() {
    return date;
  }
  
  @JsonProperty(JSON_PROPERTY_DATE)
  public void setDate_JsonNullable(JsonNullable date) {
    this.date = date;
  }

  public void setDate(LocalDate date) {
    this.date = JsonNullable.of(date);
  }


  public IndexHistory name(String name) {
    this.name = JsonNullable.of(name);
    return this;
  }

   /**
   * Proper Name of Index.
   * @return name
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "S&P 500", value = "Proper Name of Index.")
  @JsonIgnore

  public String getName() {
        return name.orElse(null);
  }

  @JsonProperty(JSON_PROPERTY_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public JsonNullable getName_JsonNullable() {
    return name;
  }
  
  @JsonProperty(JSON_PROPERTY_NAME)
  public void setName_JsonNullable(JsonNullable name) {
    this.name = name;
  }

  public void setName(String name) {
    this.name = JsonNullable.of(name);
  }


  public IndexHistory constituentNumber(Integer constituentNumber) {
    this.constituentNumber = JsonNullable.of(constituentNumber);
    return this;
  }

   /**
   * The total number of constituents as of the date requested.
   * @return constituentNumber
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "502", value = "The total number of constituents as of the date requested.")
  @JsonIgnore

  public Integer getConstituentNumber() {
        return constituentNumber.orElse(null);
  }

  @JsonProperty(JSON_PROPERTY_CONSTITUENT_NUMBER)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public JsonNullable getConstituentNumber_JsonNullable() {
    return constituentNumber;
  }
  
  @JsonProperty(JSON_PROPERTY_CONSTITUENT_NUMBER)
  public void setConstituentNumber_JsonNullable(JsonNullable constituentNumber) {
    this.constituentNumber = constituentNumber;
  }

  public void setConstituentNumber(Integer constituentNumber) {
    this.constituentNumber = JsonNullable.of(constituentNumber);
  }


  public IndexHistory currency(String currency) {
    this.currency = JsonNullable.of(currency);
    return this;
  }

   /**
   * Currency Code used in adjustments. If no Currency was requested, the service will default to LOCAL ('LOC').
   * @return currency
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "USD", value = "Currency Code used in adjustments. If no Currency was requested, the service will default to LOCAL ('LOC').")
  @JsonIgnore

  public String getCurrency() {
        return currency.orElse(null);
  }

  @JsonProperty(JSON_PROPERTY_CURRENCY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public JsonNullable getCurrency_JsonNullable() {
    return currency;
  }
  
  @JsonProperty(JSON_PROPERTY_CURRENCY)
  public void setCurrency_JsonNullable(JsonNullable currency) {
    this.currency = currency;
  }

  public void setCurrency(String currency) {
    this.currency = JsonNullable.of(currency);
  }


  public IndexHistory marketValue(Double marketValue) {
    this.marketValue = JsonNullable.of(marketValue);
    return this;
  }

   /**
   * Index Level Market Capitalization as of the date requested expressed in millions.
   * @return marketValue
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "27696158.012077", value = "Index Level Market Capitalization as of the date requested expressed in millions.")
  @JsonIgnore

  public Double getMarketValue() {
        return marketValue.orElse(null);
  }

  @JsonProperty(JSON_PROPERTY_MARKET_VALUE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public JsonNullable getMarketValue_JsonNullable() {
    return marketValue;
  }
  
  @JsonProperty(JSON_PROPERTY_MARKET_VALUE)
  public void setMarketValue_JsonNullable(JsonNullable marketValue) {
    this.marketValue = marketValue;
  }

  public void setMarketValue(Double marketValue) {
    this.marketValue = JsonNullable.of(marketValue);
  }


  public IndexHistory price(Double price) {
    this.price = JsonNullable.of(price);
    return this;
  }

   /**
   * Index Level Price
   * @return price
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "3349.15600690205", value = "Index Level Price")
  @JsonIgnore

  public Double getPrice() {
        return price.orElse(null);
  }

  @JsonProperty(JSON_PROPERTY_PRICE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public JsonNullable getPrice_JsonNullable() {
    return price;
  }
  
  @JsonProperty(JSON_PROPERTY_PRICE)
  public void setPrice_JsonNullable(JsonNullable price) {
    this.price = price;
  }

  public void setPrice(Double price) {
    this.price = JsonNullable.of(price);
  }


  public IndexHistory priceReturnPercent(Double priceReturnPercent) {
    this.priceReturnPercent = JsonNullable.of(priceReturnPercent);
    return this;
  }

   /**
   * Index Level Price Percent Change
   * @return priceReturnPercent
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "0.642620385795123", value = "Index Level Price Percent Change")
  @JsonIgnore

  public Double getPriceReturnPercent() {
        return priceReturnPercent.orElse(null);
  }

  @JsonProperty(JSON_PROPERTY_PRICE_RETURN_PERCENT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public JsonNullable getPriceReturnPercent_JsonNullable() {
    return priceReturnPercent;
  }
  
  @JsonProperty(JSON_PROPERTY_PRICE_RETURN_PERCENT)
  public void setPriceReturnPercent_JsonNullable(JsonNullable priceReturnPercent) {
    this.priceReturnPercent = priceReturnPercent;
  }

  public void setPriceReturnPercent(Double priceReturnPercent) {
    this.priceReturnPercent = JsonNullable.of(priceReturnPercent);
  }


  public IndexHistory totalReturnLevel(Double totalReturnLevel) {
    this.totalReturnLevel = JsonNullable.of(totalReturnLevel);
    return this;
  }

   /**
   * Index Level Total Return Amount
   * @return totalReturnLevel
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "6870.86168040129", value = "Index Level Total Return Amount")
  @JsonIgnore

  public Double getTotalReturnLevel() {
        return totalReturnLevel.orElse(null);
  }

  @JsonProperty(JSON_PROPERTY_TOTAL_RETURN_LEVEL)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public JsonNullable getTotalReturnLevel_JsonNullable() {
    return totalReturnLevel;
  }
  
  @JsonProperty(JSON_PROPERTY_TOTAL_RETURN_LEVEL)
  public void setTotalReturnLevel_JsonNullable(JsonNullable totalReturnLevel) {
    this.totalReturnLevel = totalReturnLevel;
  }

  public void setTotalReturnLevel(Double totalReturnLevel) {
    this.totalReturnLevel = JsonNullable.of(totalReturnLevel);
  }


  public IndexHistory totalReturnPercent(Double totalReturnPercent) {
    this.totalReturnPercent = JsonNullable.of(totalReturnPercent);
    return this;
  }

   /**
   * Index Level Total Return Percent Change
   * @return totalReturnPercent
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "0.653957589855003", value = "Index Level Total Return Percent Change")
  @JsonIgnore

  public Double getTotalReturnPercent() {
        return totalReturnPercent.orElse(null);
  }

  @JsonProperty(JSON_PROPERTY_TOTAL_RETURN_PERCENT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public JsonNullable getTotalReturnPercent_JsonNullable() {
    return totalReturnPercent;
  }
  
  @JsonProperty(JSON_PROPERTY_TOTAL_RETURN_PERCENT)
  public void setTotalReturnPercent_JsonNullable(JsonNullable totalReturnPercent) {
    this.totalReturnPercent = totalReturnPercent;
  }

  public void setTotalReturnPercent(Double totalReturnPercent) {
    this.totalReturnPercent = JsonNullable.of(totalReturnPercent);
  }


  public IndexHistory returnType(String returnType) {
    this.returnType = JsonNullable.of(returnType);
    return this;
  }

   /**
   * The requested Return Type - GROSS or NET
   * @return returnType
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "GROSS", value = "The requested Return Type - GROSS or NET")
  @JsonIgnore

  public String getReturnType() {
        return returnType.orElse(null);
  }

  @JsonProperty(JSON_PROPERTY_RETURN_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public JsonNullable getReturnType_JsonNullable() {
    return returnType;
  }
  
  @JsonProperty(JSON_PROPERTY_RETURN_TYPE)
  public void setReturnType_JsonNullable(JsonNullable returnType) {
    this.returnType = returnType;
  }

  public void setReturnType(String returnType) {
    this.returnType = JsonNullable.of(returnType);
  }


  public IndexHistory hedgeType(String hedgeType) {
    this.hedgeType = JsonNullable.of(hedgeType);
    return this;
  }

   /**
   * The requested Hedge Type - HEDGED or UNHEDGED
   * @return hedgeType
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "UNHEDGED", value = "The requested Hedge Type - HEDGED or UNHEDGED")
  @JsonIgnore

  public String getHedgeType() {
        return hedgeType.orElse(null);
  }

  @JsonProperty(JSON_PROPERTY_HEDGE_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public JsonNullable getHedgeType_JsonNullable() {
    return hedgeType;
  }
  
  @JsonProperty(JSON_PROPERTY_HEDGE_TYPE)
  public void setHedgeType_JsonNullable(JsonNullable hedgeType) {
    this.hedgeType = hedgeType;
  }

  public void setHedgeType(String hedgeType) {
    this.hedgeType = JsonNullable.of(hedgeType);
  }


  public IndexHistory requestId(String requestId) {
    this.requestId = requestId;
    return this;
  }

   /**
   * Benchmark Identifier specified in the request
   * @return requestId
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "SP50", value = "Benchmark Identifier specified in the request")
  @JsonProperty(JSON_PROPERTY_REQUEST_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getRequestId() {
    return requestId;
  }


  @JsonProperty(JSON_PROPERTY_REQUEST_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setRequestId(String requestId) {
    this.requestId = requestId;
  }


  public IndexHistory observationDate(String observationDate) {
    this.observationDate = JsonNullable.of(observationDate);
    return this;
  }

   /**
   * This field will always return the date of the data that was actually returned.
   * @return observationDate
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "2020-07-21", value = "This field will always return the date of the data that was actually returned.")
  @JsonIgnore

  public String getObservationDate() {
        return observationDate.orElse(null);
  }

  @JsonProperty(JSON_PROPERTY_OBSERVATION_DATE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public JsonNullable getObservationDate_JsonNullable() {
    return observationDate;
  }
  
  @JsonProperty(JSON_PROPERTY_OBSERVATION_DATE)
  public void setObservationDate_JsonNullable(JsonNullable observationDate) {
    this.observationDate = observationDate;
  }

  public void setObservationDate(String observationDate) {
    this.observationDate = JsonNullable.of(observationDate);
  }


  /**
   * Return true if this indexHistory object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    IndexHistory indexHistory = (IndexHistory) o;
    return equalsNullable(this.fsymId, indexHistory.fsymId) &&
        equalsNullable(this.date, indexHistory.date) &&
        equalsNullable(this.name, indexHistory.name) &&
        equalsNullable(this.constituentNumber, indexHistory.constituentNumber) &&
        equalsNullable(this.currency, indexHistory.currency) &&
        equalsNullable(this.marketValue, indexHistory.marketValue) &&
        equalsNullable(this.price, indexHistory.price) &&
        equalsNullable(this.priceReturnPercent, indexHistory.priceReturnPercent) &&
        equalsNullable(this.totalReturnLevel, indexHistory.totalReturnLevel) &&
        equalsNullable(this.totalReturnPercent, indexHistory.totalReturnPercent) &&
        equalsNullable(this.returnType, indexHistory.returnType) &&
        equalsNullable(this.hedgeType, indexHistory.hedgeType) &&
        Objects.equals(this.requestId, indexHistory.requestId) &&
        equalsNullable(this.observationDate, indexHistory.observationDate);
  }

  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(fsymId), hashCodeNullable(date), hashCodeNullable(name), hashCodeNullable(constituentNumber), hashCodeNullable(currency), hashCodeNullable(marketValue), hashCodeNullable(price), hashCodeNullable(priceReturnPercent), hashCodeNullable(totalReturnLevel), hashCodeNullable(totalReturnPercent), hashCodeNullable(returnType), hashCodeNullable(hedgeType), requestId, hashCodeNullable(observationDate));
  }

  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 IndexHistory {\n");
    sb.append("    fsymId: ").append(toIndentedString(fsymId)).append("\n");
    sb.append("    date: ").append(toIndentedString(date)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    constituentNumber: ").append(toIndentedString(constituentNumber)).append("\n");
    sb.append("    currency: ").append(toIndentedString(currency)).append("\n");
    sb.append("    marketValue: ").append(toIndentedString(marketValue)).append("\n");
    sb.append("    price: ").append(toIndentedString(price)).append("\n");
    sb.append("    priceReturnPercent: ").append(toIndentedString(priceReturnPercent)).append("\n");
    sb.append("    totalReturnLevel: ").append(toIndentedString(totalReturnLevel)).append("\n");
    sb.append("    totalReturnPercent: ").append(toIndentedString(totalReturnPercent)).append("\n");
    sb.append("    returnType: ").append(toIndentedString(returnType)).append("\n");
    sb.append("    hedgeType: ").append(toIndentedString(hedgeType)).append("\n");
    sb.append("    requestId: ").append(toIndentedString(requestId)).append("\n");
    sb.append("    observationDate: ").append(toIndentedString(observationDate)).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