com.factset.sdk.FactSetBenchmarks.models.IndexSnapshotRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of factsetbenchmarks Show documentation
Show all versions of factsetbenchmarks Show documentation
FactSet SDK for Java - factsetbenchmarks
/*
* 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.5.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.factset.sdk.FactSetBenchmarks.models.Calendar;
import com.factset.sdk.FactSetBenchmarks.models.ReturnType;
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;
/**
* IndexSnapshotRequest
*/
@JsonPropertyOrder({
IndexSnapshotRequest.JSON_PROPERTY_IDS,
IndexSnapshotRequest.JSON_PROPERTY_DATE,
IndexSnapshotRequest.JSON_PROPERTY_RETURN_TYPE,
IndexSnapshotRequest.JSON_PROPERTY_CURRENCY,
IndexSnapshotRequest.JSON_PROPERTY_CALENDAR
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class IndexSnapshotRequest 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_RETURN_TYPE = "returnType";
private ReturnType returnType = ReturnType.GROSS;
public static final String JSON_PROPERTY_CURRENCY = "currency";
private String currency;
public static final String JSON_PROPERTY_CALENDAR = "calendar";
private Calendar calendar = Calendar.FIVEDAY;
public IndexSnapshotRequest() {
}
@JsonCreator
public IndexSnapshotRequest(
@JsonProperty(value=JSON_PROPERTY_IDS, required=true) java.util.List ids
) {
this();
this.ids = ids;
}
public IndexSnapshotRequest ids(java.util.List ids) {
this.ids = ids;
return this;
}
public IndexSnapshotRequest 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.
* @return ids
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "[\"SP50\"]", required = true, value = "Benchmark Identifiers. Reference the helper endpoint **_/id-list** to get a sample list of valid identifiers.")
@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 IndexSnapshotRequest date(String date) {
this.date = date;
return this;
}
/**
* Date of holding expressed in YYYY-MM-DD format.
* @return date
**/
@javax.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 IndexSnapshotRequest returnType(ReturnType returnType) {
this.returnType = returnType;
return this;
}
/**
* Get returnType
* @return returnType
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_RETURN_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ReturnType getReturnType() {
return returnType;
}
@JsonProperty(JSON_PROPERTY_RETURN_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setReturnType(ReturnType returnType) {
this.returnType = returnType;
}
public IndexSnapshotRequest currency(String currency) {
this.currency = currency;
return this;
}
/**
* Currency for response.
* @return currency
**/
@javax.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 IndexSnapshotRequest calendar(Calendar calendar) {
this.calendar = calendar;
return this;
}
/**
* Get calendar
* @return calendar
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_CALENDAR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Calendar getCalendar() {
return calendar;
}
@JsonProperty(JSON_PROPERTY_CALENDAR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCalendar(Calendar calendar) {
this.calendar = calendar;
}
/**
* Return true if this indexSnapshotRequest object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
IndexSnapshotRequest indexSnapshotRequest = (IndexSnapshotRequest) o;
return Objects.equals(this.ids, indexSnapshotRequest.ids) &&
Objects.equals(this.date, indexSnapshotRequest.date) &&
Objects.equals(this.returnType, indexSnapshotRequest.returnType) &&
Objects.equals(this.currency, indexSnapshotRequest.currency) &&
Objects.equals(this.calendar, indexSnapshotRequest.calendar);
}
@Override
public int hashCode() {
return Objects.hash(ids, date, returnType, currency, calendar);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class IndexSnapshotRequest {\n");
sb.append(" ids: ").append(toIndentedString(ids)).append("\n");
sb.append(" date: ").append(toIndentedString(date)).append("\n");
sb.append(" returnType: ").append(toIndentedString(returnType)).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 ");
}
}