com.factset.sdk.FactSetBenchmarks.models.BenchmarkConstituentsRequest Maven / Gradle / Ivy
/*
* 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.io.Serializable;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.factset.sdk.FactSetBenchmarks.JSON;
/**
* BenchmarkConstituentsRequest
*/
@JsonPropertyOrder({
BenchmarkConstituentsRequest.JSON_PROPERTY_IDS,
BenchmarkConstituentsRequest.JSON_PROPERTY_DATE,
BenchmarkConstituentsRequest.JSON_PROPERTY_CURRENCY,
BenchmarkConstituentsRequest.JSON_PROPERTY_CALENDAR
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class BenchmarkConstituentsRequest implements Serializable {
private static final long serialVersionUID = 1L;
public static final String JSON_PROPERTY_IDS = "ids";
private java.util.List ids = new java.util.ArrayList<>();
public static final String JSON_PROPERTY_DATE = "date";
private String date;
public static final String JSON_PROPERTY_CURRENCY = "currency";
private String currency;
public static final String JSON_PROPERTY_CALENDAR = "calendar";
private String calendar = "FIVEDAY";
public BenchmarkConstituentsRequest() {
}
@JsonCreator
public BenchmarkConstituentsRequest(
@JsonProperty(value=JSON_PROPERTY_IDS, required=true) java.util.List ids
) {
this();
this.ids = ids;
}
public BenchmarkConstituentsRequest ids(java.util.List ids) {
this.ids = ids;
return this;
}
public BenchmarkConstituentsRequest addIdsItem(String idsItem) {
this.ids.add(idsItem);
return this;
}
/**
* Benchmark Identifiers. Reference the helper endpoint **_/id-list** to get a sample list of valid identifiers. You must be authorized for the `ids` requested, otherwise you will receive an error.
* @return ids
**/
@jakarta.annotation.Nonnull
@ApiModelProperty(example = "[\"SP50\"]", required = true, value = "Benchmark Identifiers. Reference the helper endpoint **_/id-list** to get a sample list of valid identifiers. You must be authorized for the `ids` requested, otherwise you will receive an error.")
@JsonProperty(JSON_PROPERTY_IDS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public java.util.List getIds() {
return ids;
}
@JsonProperty(JSON_PROPERTY_IDS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setIds(java.util.List ids) {
this.ids = ids;
}
public BenchmarkConstituentsRequest date(String date) {
this.date = date;
return this;
}
/**
* Date of holding expressed in YYYY-MM-DD format.
* @return date
**/
@jakarta.annotation.Nullable
@ApiModelProperty(example = "2020-08-06", value = "Date of holding expressed in YYYY-MM-DD format.")
@JsonProperty(JSON_PROPERTY_DATE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getDate() {
return date;
}
@JsonProperty(JSON_PROPERTY_DATE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDate(String date) {
this.date = date;
}
public BenchmarkConstituentsRequest currency(String currency) {
this.currency = currency;
return this;
}
/**
* Currency for response.
* @return currency
**/
@jakarta.annotation.Nullable
@ApiModelProperty(example = "USD", value = "Currency for response.")
@JsonProperty(JSON_PROPERTY_CURRENCY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCurrency() {
return currency;
}
@JsonProperty(JSON_PROPERTY_CURRENCY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCurrency(String currency) {
this.currency = currency;
}
public BenchmarkConstituentsRequest calendar(String calendar) {
this.calendar = calendar;
return this;
}
/**
* Calendar of data returned.
* @return calendar
**/
@jakarta.annotation.Nullable
@ApiModelProperty(example = "FIVEDAY", value = "Calendar of data returned.")
@JsonProperty(JSON_PROPERTY_CALENDAR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCalendar() {
return calendar;
}
@JsonProperty(JSON_PROPERTY_CALENDAR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCalendar(String calendar) {
this.calendar = calendar;
}
/**
* Return true if this benchmarkConstituentsRequest object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BenchmarkConstituentsRequest benchmarkConstituentsRequest = (BenchmarkConstituentsRequest) o;
return Objects.equals(this.ids, benchmarkConstituentsRequest.ids) &&
Objects.equals(this.date, benchmarkConstituentsRequest.date) &&
Objects.equals(this.currency, benchmarkConstituentsRequest.currency) &&
Objects.equals(this.calendar, benchmarkConstituentsRequest.calendar);
}
@Override
public int hashCode() {
return Objects.hash(ids, date, currency, calendar);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class BenchmarkConstituentsRequest {\n");
sb.append(" ids: ").append(toIndentedString(ids)).append("\n");
sb.append(" date: ").append(toIndentedString(date)).append("\n");
sb.append(" currency: ").append(toIndentedString(currency)).append("\n");
sb.append(" calendar: ").append(toIndentedString(calendar)).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 ");
}
}