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

com.factset.sdk.FactSetBenchmarks.models.IndexSnapshot 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;


/**
 * IndexSnapshot
 */
@JsonPropertyOrder({
  IndexSnapshot.JSON_PROPERTY_FSYM_ID,
  IndexSnapshot.JSON_PROPERTY_DATE,
  IndexSnapshot.JSON_PROPERTY_NAME,
  IndexSnapshot.JSON_PROPERTY_CONSTITUENT_NUMBER,
  IndexSnapshot.JSON_PROPERTY_CURRENCY,
  IndexSnapshot.JSON_PROPERTY_MARKET_VALUE,
  IndexSnapshot.JSON_PROPERTY_PRICE,
  IndexSnapshot.JSON_PROPERTY_PRICE_RETURN_PERCENT1_D,
  IndexSnapshot.JSON_PROPERTY_PRICE_RETURN_PERCENT_Q_T_D,
  IndexSnapshot.JSON_PROPERTY_PRICE_RETURN_PERCENT_Y_T_D,
  IndexSnapshot.JSON_PROPERTY_TOTAL_RETURN_LEVEL,
  IndexSnapshot.JSON_PROPERTY_TOTAL_RETURN_PERCENT1_D,
  IndexSnapshot.JSON_PROPERTY_TOTAL_RETURN_PERCENT_Q_T_D,
  IndexSnapshot.JSON_PROPERTY_TOTAL_RETURN_PERCENT_Y_T_D,
  IndexSnapshot.JSON_PROPERTY_RETURN_TYPE,
  IndexSnapshot.JSON_PROPERTY_REQUEST_ID
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")

public class IndexSnapshot 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_PERCENT1_D = "priceReturnPercent1D";
  private JsonNullable priceReturnPercent1D = JsonNullable.undefined();

  public static final String JSON_PROPERTY_PRICE_RETURN_PERCENT_Q_T_D = "priceReturnPercentQTD";
  private JsonNullable priceReturnPercentQTD = JsonNullable.undefined();

  public static final String JSON_PROPERTY_PRICE_RETURN_PERCENT_Y_T_D = "priceReturnPercentYTD";
  private JsonNullable priceReturnPercentYTD = 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_PERCENT1_D = "totalReturnPercent1D";
  private JsonNullable totalReturnPercent1D = JsonNullable.undefined();

  public static final String JSON_PROPERTY_TOTAL_RETURN_PERCENT_Q_T_D = "totalReturnPercentQTD";
  private JsonNullable totalReturnPercentQTD = JsonNullable.undefined();

  public static final String JSON_PROPERTY_TOTAL_RETURN_PERCENT_Y_T_D = "totalReturnPercentYTD";
  private JsonNullable totalReturnPercentYTD = JsonNullable.undefined();

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

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

  public IndexSnapshot() { 
  }

  public IndexSnapshot 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 IndexSnapshot 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 IndexSnapshot 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 IndexSnapshot 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 IndexSnapshot 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 the local Calendar.
   * @return currency
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "USD", value = "Currency Code used in adjustments. If no Currency was requested, the service will default to the local Calendar.")
  @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 IndexSnapshot 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 IndexSnapshot 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 IndexSnapshot priceReturnPercent1D(Double priceReturnPercent1D) {
    this.priceReturnPercent1D = JsonNullable.of(priceReturnPercent1D);
    return this;
  }

   /**
   * Index Level Price - 1 Day percent change
   * @return priceReturnPercent1D
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "0.642620385795123", value = "Index Level Price - 1 Day percent change")
  @JsonIgnore

  public Double getPriceReturnPercent1D() {
        return priceReturnPercent1D.orElse(null);
  }

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

  public JsonNullable getPriceReturnPercent1D_JsonNullable() {
    return priceReturnPercent1D;
  }
  
  @JsonProperty(JSON_PROPERTY_PRICE_RETURN_PERCENT1_D)
  public void setPriceReturnPercent1D_JsonNullable(JsonNullable priceReturnPercent1D) {
    this.priceReturnPercent1D = priceReturnPercent1D;
  }

  public void setPriceReturnPercent1D(Double priceReturnPercent1D) {
    this.priceReturnPercent1D = JsonNullable.of(priceReturnPercent1D);
  }


  public IndexSnapshot priceReturnPercentQTD(Double priceReturnPercentQTD) {
    this.priceReturnPercentQTD = JsonNullable.of(priceReturnPercentQTD);
    return this;
  }

   /**
   * Index Level Price - Quarter-to-Date percent change
   * @return priceReturnPercentQTD
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "8.02735451465131", value = "Index Level Price - Quarter-to-Date percent change")
  @JsonIgnore

  public Double getPriceReturnPercentQTD() {
        return priceReturnPercentQTD.orElse(null);
  }

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

  public JsonNullable getPriceReturnPercentQTD_JsonNullable() {
    return priceReturnPercentQTD;
  }
  
  @JsonProperty(JSON_PROPERTY_PRICE_RETURN_PERCENT_Q_T_D)
  public void setPriceReturnPercentQTD_JsonNullable(JsonNullable priceReturnPercentQTD) {
    this.priceReturnPercentQTD = priceReturnPercentQTD;
  }

  public void setPriceReturnPercentQTD(Double priceReturnPercentQTD) {
    this.priceReturnPercentQTD = JsonNullable.of(priceReturnPercentQTD);
  }


  public IndexSnapshot priceReturnPercentYTD(Double priceReturnPercentYTD) {
    this.priceReturnPercentYTD = JsonNullable.of(priceReturnPercentYTD);
    return this;
  }

   /**
   * Index Level Price - Year-to-Date percent change
   * @return priceReturnPercentYTD
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "3.66394447660916", value = "Index Level Price - Year-to-Date percent change")
  @JsonIgnore

  public Double getPriceReturnPercentYTD() {
        return priceReturnPercentYTD.orElse(null);
  }

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

  public JsonNullable getPriceReturnPercentYTD_JsonNullable() {
    return priceReturnPercentYTD;
  }
  
  @JsonProperty(JSON_PROPERTY_PRICE_RETURN_PERCENT_Y_T_D)
  public void setPriceReturnPercentYTD_JsonNullable(JsonNullable priceReturnPercentYTD) {
    this.priceReturnPercentYTD = priceReturnPercentYTD;
  }

  public void setPriceReturnPercentYTD(Double priceReturnPercentYTD) {
    this.priceReturnPercentYTD = JsonNullable.of(priceReturnPercentYTD);
  }


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

   /**
   * Index Level Total Return Amount. (Gross or Net depends on requested returnType)
   * @return totalReturnLevel
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "6870.86168040129", value = "Index Level Total Return Amount. (Gross or Net depends on requested returnType)")
  @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 IndexSnapshot totalReturnPercent1D(Double totalReturnPercent1D) {
    this.totalReturnPercent1D = JsonNullable.of(totalReturnPercent1D);
    return this;
  }

   /**
   * Index Level Total Return - 1 Day percent change. (Gross or Net depends on requested returnType)
   * @return totalReturnPercent1D
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "0.653957589855003", value = "Index Level Total Return - 1 Day percent change. (Gross or Net depends on requested returnType)")
  @JsonIgnore

  public Double getTotalReturnPercent1D() {
        return totalReturnPercent1D.orElse(null);
  }

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

  public JsonNullable getTotalReturnPercent1D_JsonNullable() {
    return totalReturnPercent1D;
  }
  
  @JsonProperty(JSON_PROPERTY_TOTAL_RETURN_PERCENT1_D)
  public void setTotalReturnPercent1D_JsonNullable(JsonNullable totalReturnPercent1D) {
    this.totalReturnPercent1D = totalReturnPercent1D;
  }

  public void setTotalReturnPercent1D(Double totalReturnPercent1D) {
    this.totalReturnPercent1D = JsonNullable.of(totalReturnPercent1D);
  }


  public IndexSnapshot totalReturnPercentQTD(Double totalReturnPercentQTD) {
    this.totalReturnPercentQTD = JsonNullable.of(totalReturnPercentQTD);
    return this;
  }

   /**
   * Index Level Total Return - Quarter-to-Date percent change. (Gross or Net depends on requested returnType)
   * @return totalReturnPercentQTD
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "8.17415047623613", value = "Index Level Total Return - Quarter-to-Date percent change. (Gross or Net depends on requested returnType)")
  @JsonIgnore

  public Double getTotalReturnPercentQTD() {
        return totalReturnPercentQTD.orElse(null);
  }

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

  public JsonNullable getTotalReturnPercentQTD_JsonNullable() {
    return totalReturnPercentQTD;
  }
  
  @JsonProperty(JSON_PROPERTY_TOTAL_RETURN_PERCENT_Q_T_D)
  public void setTotalReturnPercentQTD_JsonNullable(JsonNullable totalReturnPercentQTD) {
    this.totalReturnPercentQTD = totalReturnPercentQTD;
  }

  public void setTotalReturnPercentQTD(Double totalReturnPercentQTD) {
    this.totalReturnPercentQTD = JsonNullable.of(totalReturnPercentQTD);
  }


  public IndexSnapshot totalReturnPercentYTD(Double totalReturnPercentYTD) {
    this.totalReturnPercentYTD = JsonNullable.of(totalReturnPercentYTD);
    return this;
  }

   /**
   * Index Level Total Return - Year-to-Date percent change. (Gross or Net depends on requested returnType)
   * @return totalReturnPercentYTD
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "4.84152796547426", value = "Index Level Total Return - Year-to-Date percent change. (Gross or Net depends on requested returnType)")
  @JsonIgnore

  public Double getTotalReturnPercentYTD() {
        return totalReturnPercentYTD.orElse(null);
  }

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

  public JsonNullable getTotalReturnPercentYTD_JsonNullable() {
    return totalReturnPercentYTD;
  }
  
  @JsonProperty(JSON_PROPERTY_TOTAL_RETURN_PERCENT_Y_T_D)
  public void setTotalReturnPercentYTD_JsonNullable(JsonNullable totalReturnPercentYTD) {
    this.totalReturnPercentYTD = totalReturnPercentYTD;
  }

  public void setTotalReturnPercentYTD(Double totalReturnPercentYTD) {
    this.totalReturnPercentYTD = JsonNullable.of(totalReturnPercentYTD);
  }


  public IndexSnapshot 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 IndexSnapshot 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;
  }


  /**
   * Return true if this indexSnapshot object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    IndexSnapshot indexSnapshot = (IndexSnapshot) o;
    return equalsNullable(this.fsymId, indexSnapshot.fsymId) &&
        equalsNullable(this.date, indexSnapshot.date) &&
        equalsNullable(this.name, indexSnapshot.name) &&
        equalsNullable(this.constituentNumber, indexSnapshot.constituentNumber) &&
        equalsNullable(this.currency, indexSnapshot.currency) &&
        equalsNullable(this.marketValue, indexSnapshot.marketValue) &&
        equalsNullable(this.price, indexSnapshot.price) &&
        equalsNullable(this.priceReturnPercent1D, indexSnapshot.priceReturnPercent1D) &&
        equalsNullable(this.priceReturnPercentQTD, indexSnapshot.priceReturnPercentQTD) &&
        equalsNullable(this.priceReturnPercentYTD, indexSnapshot.priceReturnPercentYTD) &&
        equalsNullable(this.totalReturnLevel, indexSnapshot.totalReturnLevel) &&
        equalsNullable(this.totalReturnPercent1D, indexSnapshot.totalReturnPercent1D) &&
        equalsNullable(this.totalReturnPercentQTD, indexSnapshot.totalReturnPercentQTD) &&
        equalsNullable(this.totalReturnPercentYTD, indexSnapshot.totalReturnPercentYTD) &&
        equalsNullable(this.returnType, indexSnapshot.returnType) &&
        Objects.equals(this.requestId, indexSnapshot.requestId);
  }

  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(priceReturnPercent1D), hashCodeNullable(priceReturnPercentQTD), hashCodeNullable(priceReturnPercentYTD), hashCodeNullable(totalReturnLevel), hashCodeNullable(totalReturnPercent1D), hashCodeNullable(totalReturnPercentQTD), hashCodeNullable(totalReturnPercentYTD), hashCodeNullable(returnType), requestId);
  }

  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 IndexSnapshot {\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("    priceReturnPercent1D: ").append(toIndentedString(priceReturnPercent1D)).append("\n");
    sb.append("    priceReturnPercentQTD: ").append(toIndentedString(priceReturnPercentQTD)).append("\n");
    sb.append("    priceReturnPercentYTD: ").append(toIndentedString(priceReturnPercentYTD)).append("\n");
    sb.append("    totalReturnLevel: ").append(toIndentedString(totalReturnLevel)).append("\n");
    sb.append("    totalReturnPercent1D: ").append(toIndentedString(totalReturnPercent1D)).append("\n");
    sb.append("    totalReturnPercentQTD: ").append(toIndentedString(totalReturnPercentQTD)).append("\n");
    sb.append("    totalReturnPercentYTD: ").append(toIndentedString(totalReturnPercentYTD)).append("\n");
    sb.append("    returnType: ").append(toIndentedString(returnType)).append("\n");
    sb.append("    requestId: ").append(toIndentedString(requestId)).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