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

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

There is a newer version: 3.1.1
Show 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;


/**
 * BenchmarkConstituent
 */
@JsonPropertyOrder({
  BenchmarkConstituent.JSON_PROPERTY_FSYM_ID,
  BenchmarkConstituent.JSON_PROPERTY_DATE,
  BenchmarkConstituent.JSON_PROPERTY_FSYM_SECURITY_ID,
  BenchmarkConstituent.JSON_PROPERTY_FSYM_REGIONAL_ID,
  BenchmarkConstituent.JSON_PROPERTY_CURRENCY,
  BenchmarkConstituent.JSON_PROPERTY_WEIGHT_CLOSE,
  BenchmarkConstituent.JSON_PROPERTY_ADJ_HOLDING,
  BenchmarkConstituent.JSON_PROPERTY_UNADJ_HOLDING,
  BenchmarkConstituent.JSON_PROPERTY_PRICE,
  BenchmarkConstituent.JSON_PROPERTY_ADJ_MARKET_VALUE,
  BenchmarkConstituent.JSON_PROPERTY_REQUEST_ID
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")

public class BenchmarkConstituent 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_FSYM_SECURITY_ID = "fsymSecurityId";
  private JsonNullable fsymSecurityId = JsonNullable.undefined();

  public static final String JSON_PROPERTY_FSYM_REGIONAL_ID = "fsymRegionalId";
  private JsonNullable fsymRegionalId = JsonNullable.undefined();

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

  public static final String JSON_PROPERTY_WEIGHT_CLOSE = "weightClose";
  private JsonNullable weightClose = JsonNullable.undefined();

  public static final String JSON_PROPERTY_ADJ_HOLDING = "adjHolding";
  private JsonNullable adjHolding = JsonNullable.undefined();

  public static final String JSON_PROPERTY_UNADJ_HOLDING = "unadjHolding";
  private JsonNullable unadjHolding = JsonNullable.undefined();

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

  public static final String JSON_PROPERTY_ADJ_MARKET_VALUE = "adjMarketValue";
  private JsonNullable adjMarketValue = JsonNullable.undefined();

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

  public BenchmarkConstituent() { 
  }

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

   /**
   * Benchmark Id
   * @return fsymId
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "SPY-US", value = "Benchmark Id")
  @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 BenchmarkConstituent date(LocalDate date) {
    this.date = JsonNullable.of(date);
    return this;
  }

   /**
   * Date of weight and shares.
   * @return date
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "Wed Jul 01 00:00:00 UTC 2020", value = "Date of weight and shares.")
  @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 BenchmarkConstituent fsymSecurityId(String fsymSecurityId) {
    this.fsymSecurityId = JsonNullable.of(fsymSecurityId);
    return this;
  }

   /**
   * FactSet Security Identifier (-S). If Cash or Generic Id holding, response will just pass through generic id (e.g. CASH_USD).
   * @return fsymSecurityId
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "TKPJVY-S", value = "FactSet Security Identifier (-S). If Cash or Generic Id holding, response will just pass through generic id (e.g. CASH_USD).")
  @JsonIgnore

  public String getFsymSecurityId() {
        return fsymSecurityId.orElse(null);
  }

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

  public JsonNullable getFsymSecurityId_JsonNullable() {
    return fsymSecurityId;
  }
  
  @JsonProperty(JSON_PROPERTY_FSYM_SECURITY_ID)
  public void setFsymSecurityId_JsonNullable(JsonNullable fsymSecurityId) {
    this.fsymSecurityId = fsymSecurityId;
  }

  public void setFsymSecurityId(String fsymSecurityId) {
    this.fsymSecurityId = JsonNullable.of(fsymSecurityId);
  }


  public BenchmarkConstituent fsymRegionalId(String fsymRegionalId) {
    this.fsymRegionalId = JsonNullable.of(fsymRegionalId);
    return this;
  }

   /**
   * FactSet Regional Identifier (-R). If Cash or Generic Id holding, response will just pass through generic id (e.g. CASH_USD).
   * @return fsymRegionalId
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "F07Q7W-R", value = "FactSet Regional Identifier (-R). If Cash or Generic Id holding, response will just pass through generic id (e.g. CASH_USD).")
  @JsonIgnore

  public String getFsymRegionalId() {
        return fsymRegionalId.orElse(null);
  }

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

  public JsonNullable getFsymRegionalId_JsonNullable() {
    return fsymRegionalId;
  }
  
  @JsonProperty(JSON_PROPERTY_FSYM_REGIONAL_ID)
  public void setFsymRegionalId_JsonNullable(JsonNullable fsymRegionalId) {
    this.fsymRegionalId = fsymRegionalId;
  }

  public void setFsymRegionalId(String fsymRegionalId) {
    this.fsymRegionalId = JsonNullable.of(fsymRegionalId);
  }


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

   /**
   * Currency code for prices.
   * @return currency
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "USD", value = "Currency code for prices.")
  @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 BenchmarkConstituent weightClose(Double weightClose) {
    this.weightClose = JsonNullable.of(weightClose);
    return this;
  }

   /**
   * Weight of Security in benchmark (percent).
   * @return weightClose
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "0.085717610340781", value = "Weight of Security in benchmark (percent).")
  @JsonIgnore

  public Double getWeightClose() {
        return weightClose.orElse(null);
  }

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

  public JsonNullable getWeightClose_JsonNullable() {
    return weightClose;
  }
  
  @JsonProperty(JSON_PROPERTY_WEIGHT_CLOSE)
  public void setWeightClose_JsonNullable(JsonNullable weightClose) {
    this.weightClose = weightClose;
  }

  public void setWeightClose(Double weightClose) {
    this.weightClose = JsonNullable.of(weightClose);
  }


  public BenchmarkConstituent adjHolding(Double adjHolding) {
    this.adjHolding = JsonNullable.of(adjHolding);
    return this;
  }

   /**
   * Shares held adjusted. Units in Millions.
   * @return adjHolding
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "0.884722", value = "Shares held adjusted. Units in Millions.")
  @JsonIgnore

  public Double getAdjHolding() {
        return adjHolding.orElse(null);
  }

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

  public JsonNullable getAdjHolding_JsonNullable() {
    return adjHolding;
  }
  
  @JsonProperty(JSON_PROPERTY_ADJ_HOLDING)
  public void setAdjHolding_JsonNullable(JsonNullable adjHolding) {
    this.adjHolding = adjHolding;
  }

  public void setAdjHolding(Double adjHolding) {
    this.adjHolding = JsonNullable.of(adjHolding);
  }


  public BenchmarkConstituent unadjHolding(Double unadjHolding) {
    this.unadjHolding = JsonNullable.of(unadjHolding);
    return this;
  }

   /**
   * Shares held unadjusted. Units in Millions.
   * @return unadjHolding
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "0.884722", value = "Shares held unadjusted. Units in Millions.")
  @JsonIgnore

  public Double getUnadjHolding() {
        return unadjHolding.orElse(null);
  }

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

  public JsonNullable getUnadjHolding_JsonNullable() {
    return unadjHolding;
  }
  
  @JsonProperty(JSON_PROPERTY_UNADJ_HOLDING)
  public void setUnadjHolding_JsonNullable(JsonNullable unadjHolding) {
    this.unadjHolding = unadjHolding;
  }

  public void setUnadjHolding(Double unadjHolding) {
    this.unadjHolding = JsonNullable.of(unadjHolding);
  }


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

   /**
   * Price of shares held.
   * @return price
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "267.97", value = "Price of shares held.")
  @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 BenchmarkConstituent adjMarketValue(Double adjMarketValue) {
    this.adjMarketValue = JsonNullable.of(adjMarketValue);
    return this;
  }

   /**
   * Market value adjusted. Market Value represented in Millions.
   * @return adjMarketValue
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "237.07895434", value = "Market value adjusted. Market Value represented in Millions.")
  @JsonIgnore

  public Double getAdjMarketValue() {
        return adjMarketValue.orElse(null);
  }

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

  public JsonNullable getAdjMarketValue_JsonNullable() {
    return adjMarketValue;
  }
  
  @JsonProperty(JSON_PROPERTY_ADJ_MARKET_VALUE)
  public void setAdjMarketValue_JsonNullable(JsonNullable adjMarketValue) {
    this.adjMarketValue = adjMarketValue;
  }

  public void setAdjMarketValue(Double adjMarketValue) {
    this.adjMarketValue = JsonNullable.of(adjMarketValue);
  }


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

   /**
   * Identifier specified in the request
   * @return requestId
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "SPY-US", value = "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 benchmarkConstituent object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    BenchmarkConstituent benchmarkConstituent = (BenchmarkConstituent) o;
    return equalsNullable(this.fsymId, benchmarkConstituent.fsymId) &&
        equalsNullable(this.date, benchmarkConstituent.date) &&
        equalsNullable(this.fsymSecurityId, benchmarkConstituent.fsymSecurityId) &&
        equalsNullable(this.fsymRegionalId, benchmarkConstituent.fsymRegionalId) &&
        equalsNullable(this.currency, benchmarkConstituent.currency) &&
        equalsNullable(this.weightClose, benchmarkConstituent.weightClose) &&
        equalsNullable(this.adjHolding, benchmarkConstituent.adjHolding) &&
        equalsNullable(this.unadjHolding, benchmarkConstituent.unadjHolding) &&
        equalsNullable(this.price, benchmarkConstituent.price) &&
        equalsNullable(this.adjMarketValue, benchmarkConstituent.adjMarketValue) &&
        Objects.equals(this.requestId, benchmarkConstituent.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(fsymSecurityId), hashCodeNullable(fsymRegionalId), hashCodeNullable(currency), hashCodeNullable(weightClose), hashCodeNullable(adjHolding), hashCodeNullable(unadjHolding), hashCodeNullable(price), hashCodeNullable(adjMarketValue), 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 BenchmarkConstituent {\n");
    sb.append("    fsymId: ").append(toIndentedString(fsymId)).append("\n");
    sb.append("    date: ").append(toIndentedString(date)).append("\n");
    sb.append("    fsymSecurityId: ").append(toIndentedString(fsymSecurityId)).append("\n");
    sb.append("    fsymRegionalId: ").append(toIndentedString(fsymRegionalId)).append("\n");
    sb.append("    currency: ").append(toIndentedString(currency)).append("\n");
    sb.append("    weightClose: ").append(toIndentedString(weightClose)).append("\n");
    sb.append("    adjHolding: ").append(toIndentedString(adjHolding)).append("\n");
    sb.append("    unadjHolding: ").append(toIndentedString(unadjHolding)).append("\n");
    sb.append("    price: ").append(toIndentedString(price)).append("\n");
    sb.append("    adjMarketValue: ").append(toIndentedString(adjMarketValue)).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