com.factset.sdk.FactSetTickHistory.models.Level1RequestBody Maven / Gradle / Ivy
/*
* Tick History
* Tick History provides dynamic access to historical tick data for a specific security for specific dates or date range.
*
* The version of the OpenAPI document: 2.3.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.FactSetTickHistory.models;
import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
import com.factset.sdk.FactSetTickHistory.models.DateTimePeriod;
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.FactSetTickHistory.JSON;
/**
* Level1 request body elements
*/
@ApiModel(description = "Level1 request body elements")
@JsonPropertyOrder({
Level1RequestBody.JSON_PROPERTY_TICKERS,
Level1RequestBody.JSON_PROPERTY_FACTSET_EXCHANGE_CODE,
Level1RequestBody.JSON_PROPERTY_DATE_TIME_RANGE,
Level1RequestBody.JSON_PROPERTY_FIELDS,
Level1RequestBody.JSON_PROPERTY_SINGLE
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Level1RequestBody implements Serializable {
private static final long serialVersionUID = 1L;
public static final String JSON_PROPERTY_TICKERS = "tickers";
private java.util.List tickers = new java.util.ArrayList<>();
public static final String JSON_PROPERTY_FACTSET_EXCHANGE_CODE = "factsetExchangeCode";
private String factsetExchangeCode;
public static final String JSON_PROPERTY_DATE_TIME_RANGE = "dateTimeRange";
private DateTimePeriod dateTimeRange;
/**
* Gets or Sets fields
*/
public enum FieldsEnum {
TICKER("TICKER"),
ISO_CODE("ISO_CODE"),
DATE("DATE"),
TIME("TIME"),
MSG_TYPE("MSG_TYPE"),
SEQUENCE("SEQUENCE"),
PRODUCT("PRODUCT"),
BID("BID"),
BID_TIME("BID_TIME"),
BID_VOL("BID_VOL"),
BID_EXCH("BID_EXCH"),
ASK("ASK"),
ASK_TIME("ASK_TIME"),
ASK_VOL("ASK_VOL"),
ASK_EXCH("ASK_EXCH"),
LAST_PRICE("LAST_PRICE"),
LAST_DATE("LAST_DATE"),
LAST_TIME("LAST_TIME"),
LAST_VOL("LAST_VOL"),
LAST_EXCH("LAST_EXCH"),
MID("MID"),
MID_TIME("MID_TIME"),
CVOL("CVOL"),
CCVOL("CCVOL"),
VWAP("VWAP"),
YIELD_PRICE("YIELD_PRICE"),
BENCHMARK_YIELD("BENCHMARK_YIELD"),
BENCHMARK_SPREAD("BENCHMARK_SPREAD"),
CURRENT_YIELD("CURRENT_YIELD"),
TRADE_CONDITION("TRADE_CONDITION"),
REPORTING_SIDE("REPORTING_SIDE"),
ASK_YIELD("ASK_YIELD"),
BID_YIELD("BID_YIELD"),
VENUE("VENUE"),
BUY_ID("BUY_ID"),
MID_YIELD("MID_YIELD"),
ORDER_CODE("ORDER_CODE"),
SELL_ID("SELL_ID"),
TRADED_PRICE("TRADED_PRICE"),
TRADED_VOL("TRADED_VOL"),
TRADED_CONDITION("TRADED_CONDITION"),
TRADED_YIELD("TRADED_YIELD"),
ORIG_SEQUENCE("ORIG_SEQUENCE"),
SECURITY_TYPE("SECURITY_TYPE"),
SECURITY_STATUS("SECURITY_STATUS"),
MSG_BITMASK("MSG_BITMASK"),
ORDER_NUM("ORDER_NUM"),
ISO("ISO");
private String value;
FieldsEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static FieldsEnum fromValue(String value) {
for (FieldsEnum b : FieldsEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_FIELDS = "fields";
private java.util.List fields = null;
public static final String JSON_PROPERTY_SINGLE = "single";
private Boolean single = false;
public Level1RequestBody() {
}
@JsonCreator
public Level1RequestBody(
@JsonProperty(value=JSON_PROPERTY_TICKERS, required=true) java.util.List tickers,
@JsonProperty(value=JSON_PROPERTY_FACTSET_EXCHANGE_CODE, required=true) String factsetExchangeCode,
@JsonProperty(value=JSON_PROPERTY_DATE_TIME_RANGE, required=true) DateTimePeriod dateTimeRange
) {
this();
this.tickers = tickers;
this.factsetExchangeCode = factsetExchangeCode;
this.dateTimeRange = dateTimeRange;
}
public Level1RequestBody tickers(java.util.List tickers) {
this.tickers = tickers;
return this;
}
public Level1RequestBody addTickersItem(String tickersItem) {
this.tickers.add(tickersItem);
return this;
}
/**
* The requested list of one or more tickers. <p> NOTE: Maximum 500 tickers per request.</p>.
* @return tickers
**/
@jakarta.annotation.Nonnull
@ApiModelProperty(example = "[\"FDS\"]", required = true, value = "The requested list of one or more tickers. NOTE: Maximum 500 tickers per request.
. ")
@JsonProperty(JSON_PROPERTY_TICKERS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public java.util.List getTickers() {
return tickers;
}
@JsonProperty(JSON_PROPERTY_TICKERS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setTickers(java.util.List tickers) {
this.tickers = tickers;
}
public Level1RequestBody factsetExchangeCode(String factsetExchangeCode) {
this.factsetExchangeCode = factsetExchangeCode;
return this;
}
/**
* FactSet specific regional or composite exchange code and last exchange code. <p> NOTE:Does not support multiple factsetExchangeCodes</p>.
* @return factsetExchangeCode
**/
@jakarta.annotation.Nonnull
@ApiModelProperty(example = "USA", required = true, value = "FactSet specific regional or composite exchange code and last exchange code. NOTE:Does not support multiple factsetExchangeCodes
. ")
@JsonProperty(JSON_PROPERTY_FACTSET_EXCHANGE_CODE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getFactsetExchangeCode() {
return factsetExchangeCode;
}
@JsonProperty(JSON_PROPERTY_FACTSET_EXCHANGE_CODE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setFactsetExchangeCode(String factsetExchangeCode) {
this.factsetExchangeCode = factsetExchangeCode;
}
public Level1RequestBody dateTimeRange(DateTimePeriod dateTimeRange) {
this.dateTimeRange = dateTimeRange;
return this;
}
/**
* Get dateTimeRange
* @return dateTimeRange
**/
@jakarta.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_DATE_TIME_RANGE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public DateTimePeriod getDateTimeRange() {
return dateTimeRange;
}
@JsonProperty(JSON_PROPERTY_DATE_TIME_RANGE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setDateTimeRange(DateTimePeriod dateTimeRange) {
this.dateTimeRange = dateTimeRange;
}
public Level1RequestBody fields(java.util.List fields) {
this.fields = fields;
return this;
}
public Level1RequestBody addFieldsItem(FieldsEnum fieldsItem) {
if (this.fields == null) {
this.fields = new java.util.ArrayList<>();
}
this.fields.add(fieldsItem);
return this;
}
/**
* Fields for which data is requested
* @return fields
**/
@jakarta.annotation.Nullable
@ApiModelProperty(example = "[\"ASK\"]", value = "Fields for which data is requested ")
@JsonProperty(JSON_PROPERTY_FIELDS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public java.util.List getFields() {
return fields;
}
@JsonProperty(JSON_PROPERTY_FIELDS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setFields(java.util.List fields) {
this.fields = fields;
}
public Level1RequestBody single(Boolean single) {
this.single = single;
return this;
}
/**
* <p> This parameter only works for smaller date/time requests where the file size is upto 128MB.</P> single=true Returns data in a single file. single=false Returns data in multiple files. <p> Note: If parameter is not used it take default value as false and returns data in multiple files.</p>
* @return single
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = " This parameter only works for smaller date/time requests where the file size is upto 128MB.
single=true Returns data in a single file. single=false Returns data in multiple files. Note: If parameter is not used it take default value as false and returns data in multiple files.
")
@JsonProperty(JSON_PROPERTY_SINGLE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getSingle() {
return single;
}
@JsonProperty(JSON_PROPERTY_SINGLE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSingle(Boolean single) {
this.single = single;
}
/**
* Return true if this level1RequestBody object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Level1RequestBody level1RequestBody = (Level1RequestBody) o;
return Objects.equals(this.tickers, level1RequestBody.tickers) &&
Objects.equals(this.factsetExchangeCode, level1RequestBody.factsetExchangeCode) &&
Objects.equals(this.dateTimeRange, level1RequestBody.dateTimeRange) &&
Objects.equals(this.fields, level1RequestBody.fields) &&
Objects.equals(this.single, level1RequestBody.single);
}
@Override
public int hashCode() {
return Objects.hash(tickers, factsetExchangeCode, dateTimeRange, fields, single);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Level1RequestBody {\n");
sb.append(" tickers: ").append(toIndentedString(tickers)).append("\n");
sb.append(" factsetExchangeCode: ").append(toIndentedString(factsetExchangeCode)).append("\n");
sb.append(" dateTimeRange: ").append(toIndentedString(dateTimeRange)).append("\n");
sb.append(" fields: ").append(toIndentedString(fields)).append("\n");
sb.append(" single: ").append(toIndentedString(single)).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 ");
}
}