com.factset.sdk.DirectStreamingofTransactionMessages.models.Order Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of directstreamingoftransactionmessages Show documentation
Show all versions of directstreamingoftransactionmessages Show documentation
FactSet SDK for Java - directstreamingoftransactionmessages
/*
* dsotm API
* Allow clients to send transactions data to FactSet.
*
* The version of the OpenAPI document: 1.6.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.DirectStreamingofTransactionMessages.models;
import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
import com.factset.sdk.DirectStreamingofTransactionMessages.models.AdditionalField;
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 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.DirectStreamingofTransactionMessages.JSON;
/**
* Order transaction attributes
*/
@ApiModel(description = "Order transaction attributes")
@JsonPropertyOrder({
Order.JSON_PROPERTY_ORDER_DATE,
Order.JSON_PROPERTY_TRANSACTION_ID,
Order.JSON_PROPERTY_ORDER_ID,
Order.JSON_PROPERTY_TRANSACTION_STATUS,
Order.JSON_PROPERTY_ORDER_TYPE,
Order.JSON_PROPERTY_LIMIT_PRICE,
Order.JSON_PROPERTY_STOP_PRICE,
Order.JSON_PROPERTY_TIF,
Order.JSON_PROPERTY_TIF_DATE,
Order.JSON_PROPERTY_SETTLEMENT_TYPE,
Order.JSON_PROPERTY_SETTLEMENT_DATE,
Order.JSON_PROPERTY_FUND_TEAM,
Order.JSON_PROPERTY_TRADING_TEAM,
Order.JSON_PROPERTY_TRADER,
Order.JSON_PROPERTY_ACCOUNT,
Order.JSON_PROPERTY_SYMBOL,
Order.JSON_PROPERTY_INSTRUMENT_NAME,
Order.JSON_PROPERTY_SIDE,
Order.JSON_PROPERTY_UNIT_TYPE,
Order.JSON_PROPERTY_TRANSACTION_LEAVES,
Order.JSON_PROPERTY_QUANTITY,
Order.JSON_PROPERTY_GROSS,
Order.JSON_PROPERTY_PRICE,
Order.JSON_PROPERTY_CURRENCY,
Order.JSON_PROPERTY_COMPLIANCE_STATUS,
Order.JSON_PROPERTY_ADDED_DATE_TIME,
Order.JSON_PROPERTY_UPDATED_DATE_TIME,
Order.JSON_PROPERTY_ADDITIONAL_FIELDS
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Order implements Serializable {
private static final long serialVersionUID = 1L;
public static final String JSON_PROPERTY_ORDER_DATE = "orderDate";
private String orderDate;
public static final String JSON_PROPERTY_TRANSACTION_ID = "transactionId";
private String transactionId;
public static final String JSON_PROPERTY_ORDER_ID = "orderId";
private JsonNullable orderId = JsonNullable.undefined();
/**
* Status of the Order
*/
public enum TransactionStatusEnum {
PENDINGAPPROVAL("pendingApproval"),
OPEN("open"),
PLACED("placed"),
PARTIALFILLED("partialFilled"),
FILLED("filled"),
EXPIRED("expired"),
CANCELLED("cancelled"),
REJECTED("rejected"),
BOOKED("booked");
private String value;
TransactionStatusEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static TransactionStatusEnum fromValue(String value) {
for (TransactionStatusEnum b : TransactionStatusEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_TRANSACTION_STATUS = "transactionStatus";
private TransactionStatusEnum transactionStatus;
/**
* Order type indicating the price type of the Order
*/
public enum OrderTypeEnum {
MARKET("market"),
LIMIT("limit"),
STOPLIMIT("stopLimit"),
STOP("stop");
private String value;
OrderTypeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static OrderTypeEnum fromValue(String value) {
for (OrderTypeEnum b : OrderTypeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_ORDER_TYPE = "orderType";
private OrderTypeEnum orderType;
public static final String JSON_PROPERTY_LIMIT_PRICE = "limitPrice";
private Double limitPrice;
public static final String JSON_PROPERTY_STOP_PRICE = "stopPrice";
private Double stopPrice;
/**
* Time In Force of the Order
*/
public enum TifEnum {
GOODTILCANCEL("goodTilCancel"),
GOODTILDATE("goodTilDate"),
DAY("day"),
WEEK("week");
private String value;
TifEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static TifEnum fromValue(String value) {
for (TifEnum b : TifEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_TIF = "tif";
private TifEnum tif;
public static final String JSON_PROPERTY_TIF_DATE = "tifDate";
private JsonNullable tifDate = JsonNullable.undefined();
/**
* Indicates order settlement period
*/
public enum SettlementTypeEnum {
REGULAR("regular"),
CASH("cash"),
NEXTDAY("nextDay"),
TPLUS2("tPlus2"),
TPLUS3("tPlus3"),
TPLUS4("tPlus4"),
FUTURE("future"),
WHENISSUED("whenIssued"),
SELLERSOPTION("sellersOption"),
TPLUS5("tPlus5");
private String value;
SettlementTypeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static SettlementTypeEnum fromValue(String value) {
for (SettlementTypeEnum b : SettlementTypeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_SETTLEMENT_TYPE = "settlementType";
private SettlementTypeEnum settlementType;
public static final String JSON_PROPERTY_SETTLEMENT_DATE = "settlementDate";
private JsonNullable settlementDate = JsonNullable.undefined();
public static final String JSON_PROPERTY_FUND_TEAM = "fundTeam";
private JsonNullable fundTeam = JsonNullable.undefined();
public static final String JSON_PROPERTY_TRADING_TEAM = "tradingTeam";
private JsonNullable tradingTeam = JsonNullable.undefined();
public static final String JSON_PROPERTY_TRADER = "trader";
private JsonNullable trader = JsonNullable.undefined();
public static final String JSON_PROPERTY_ACCOUNT = "account";
private String account;
public static final String JSON_PROPERTY_SYMBOL = "symbol";
private String symbol;
public static final String JSON_PROPERTY_INSTRUMENT_NAME = "instrumentName";
private String instrumentName;
/**
* Side of the order
*/
public enum SideEnum {
BUY("buy"),
BUYCOVER("buyCover"),
SELL("sell"),
SELLSHORT("sellShort");
private String value;
SideEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static SideEnum fromValue(String value) {
for (SideEnum b : SideEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_SIDE = "side";
private SideEnum side;
/**
* Unit type of the order. Indicates if the trade is driven by quantity or value
*/
public enum UnitTypeEnum {
QUANTITY("quantity"),
VALUE("value");
private String value;
UnitTypeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static UnitTypeEnum fromValue(String value) {
for (UnitTypeEnum b : UnitTypeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_UNIT_TYPE = "unitType";
private UnitTypeEnum unitType;
public static final String JSON_PROPERTY_TRANSACTION_LEAVES = "transactionLeaves";
private JsonNullable transactionLeaves = JsonNullable.undefined();
public static final String JSON_PROPERTY_QUANTITY = "quantity";
private Double quantity;
public static final String JSON_PROPERTY_GROSS = "gross";
private Double gross;
public static final String JSON_PROPERTY_PRICE = "price";
private JsonNullable price = JsonNullable.undefined();
public static final String JSON_PROPERTY_CURRENCY = "currency";
private String currency;
/**
* Compliance check status
*/
public enum ComplianceStatusEnum {
UNCHECKED("unchecked"),
PASS("pass"),
FAIL("fail");
private String value;
ComplianceStatusEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static ComplianceStatusEnum fromValue(String value) {
for (ComplianceStatusEnum b : ComplianceStatusEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_COMPLIANCE_STATUS = "complianceStatus";
private ComplianceStatusEnum complianceStatus;
public static final String JSON_PROPERTY_ADDED_DATE_TIME = "addedDateTime";
private JsonNullable addedDateTime = JsonNullable.undefined();
public static final String JSON_PROPERTY_UPDATED_DATE_TIME = "updatedDateTime";
private JsonNullable updatedDateTime = JsonNullable.undefined();
public static final String JSON_PROPERTY_ADDITIONAL_FIELDS = "additionalFields";
private JsonNullable> additionalFields = JsonNullable.>undefined();
public Order() {
}
@JsonCreator
public Order(
@JsonProperty(value=JSON_PROPERTY_ORDER_DATE, required=true) String orderDate,
@JsonProperty(value=JSON_PROPERTY_TRANSACTION_ID, required=true) String transactionId,
@JsonProperty(value=JSON_PROPERTY_TRANSACTION_STATUS, required=true) TransactionStatusEnum transactionStatus,
@JsonProperty(value=JSON_PROPERTY_ACCOUNT, required=true) String account,
@JsonProperty(value=JSON_PROPERTY_SYMBOL, required=true) String symbol,
@JsonProperty(value=JSON_PROPERTY_INSTRUMENT_NAME, required=true) String instrumentName,
@JsonProperty(value=JSON_PROPERTY_SIDE, required=true) SideEnum side,
@JsonProperty(value=JSON_PROPERTY_UNIT_TYPE, required=true) UnitTypeEnum unitType,
@JsonProperty(value=JSON_PROPERTY_QUANTITY, required=true) Double quantity,
@JsonProperty(value=JSON_PROPERTY_GROSS, required=true) Double gross,
@JsonProperty(value=JSON_PROPERTY_CURRENCY, required=true) String currency
) {
this();
this.orderDate = orderDate;
this.transactionId = transactionId;
this.transactionStatus = transactionStatus;
this.account = account;
this.symbol = symbol;
this.instrumentName = instrumentName;
this.side = side;
this.unitType = unitType;
this.quantity = quantity;
this.gross = gross;
this.currency = currency;
}
public Order orderDate(String orderDate) {
this.orderDate = orderDate;
return this;
}
/**
* Order date which is in the format YYYY-MM-DD
* @return orderDate
**/
@jakarta.annotation.Nonnull
@ApiModelProperty(example = "2024-01-25", required = true, value = "Order date which is in the format YYYY-MM-DD")
@JsonProperty(JSON_PROPERTY_ORDER_DATE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getOrderDate() {
return orderDate;
}
@JsonProperty(JSON_PROPERTY_ORDER_DATE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setOrderDate(String orderDate) {
this.orderDate = orderDate;
}
public Order transactionId(String transactionId) {
this.transactionId = transactionId;
return this;
}
/**
* Unique Id of the order
* @return transactionId
**/
@jakarta.annotation.Nonnull
@ApiModelProperty(example = "O_FDS_012424_113", required = true, value = "Unique Id of the order")
@JsonProperty(JSON_PROPERTY_TRANSACTION_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getTransactionId() {
return transactionId;
}
@JsonProperty(JSON_PROPERTY_TRANSACTION_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setTransactionId(String transactionId) {
this.transactionId = transactionId;
}
public Order orderId(String orderId) {
this.orderId = JsonNullable.of(orderId);
return this;
}
/**
* Id of the order as assigned by the OMS. If not specified then transactionId is used.
* @return orderId
**/
@jakarta.annotation.Nullable
@ApiModelProperty(example = "O123", value = "Id of the order as assigned by the OMS. If not specified then transactionId is used.")
@JsonIgnore
public String getOrderId() {
return orderId.orElse(null);
}
@JsonProperty(JSON_PROPERTY_ORDER_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getOrderId_JsonNullable() {
return orderId;
}
@JsonProperty(JSON_PROPERTY_ORDER_ID)
public void setOrderId_JsonNullable(JsonNullable orderId) {
this.orderId = orderId;
}
public void setOrderId(String orderId) {
this.orderId = JsonNullable.of(orderId);
}
public Order transactionStatus(TransactionStatusEnum transactionStatus) {
this.transactionStatus = transactionStatus;
return this;
}
/**
* Status of the Order
* @return transactionStatus
**/
@jakarta.annotation.Nonnull
@ApiModelProperty(example = "pendingApproval", required = true, value = "Status of the Order")
@JsonProperty(JSON_PROPERTY_TRANSACTION_STATUS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public TransactionStatusEnum getTransactionStatus() {
return transactionStatus;
}
@JsonProperty(JSON_PROPERTY_TRANSACTION_STATUS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setTransactionStatus(TransactionStatusEnum transactionStatus) {
this.transactionStatus = transactionStatus;
}
public Order orderType(OrderTypeEnum orderType) {
this.orderType = orderType;
return this;
}
/**
* Order type indicating the price type of the Order
* @return orderType
**/
@jakarta.annotation.Nullable
@ApiModelProperty(example = "market", value = "Order type indicating the price type of the Order")
@JsonProperty(JSON_PROPERTY_ORDER_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OrderTypeEnum getOrderType() {
return orderType;
}
@JsonProperty(JSON_PROPERTY_ORDER_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setOrderType(OrderTypeEnum orderType) {
this.orderType = orderType;
}
public Order limitPrice(Double limitPrice) {
this.limitPrice = limitPrice;
return this;
}
/**
* Price related to limit and stopLimit order types
* @return limitPrice
**/
@jakarta.annotation.Nullable
@ApiModelProperty(example = "420.25", value = "Price related to limit and stopLimit order types")
@JsonProperty(JSON_PROPERTY_LIMIT_PRICE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Double getLimitPrice() {
return limitPrice;
}
@JsonProperty(JSON_PROPERTY_LIMIT_PRICE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setLimitPrice(Double limitPrice) {
this.limitPrice = limitPrice;
}
public Order stopPrice(Double stopPrice) {
this.stopPrice = stopPrice;
return this;
}
/**
* Price related to stop and stopLimit order types
* @return stopPrice
**/
@jakarta.annotation.Nullable
@ApiModelProperty(example = "421.25", value = "Price related to stop and stopLimit order types")
@JsonProperty(JSON_PROPERTY_STOP_PRICE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Double getStopPrice() {
return stopPrice;
}
@JsonProperty(JSON_PROPERTY_STOP_PRICE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setStopPrice(Double stopPrice) {
this.stopPrice = stopPrice;
}
public Order tif(TifEnum tif) {
this.tif = tif;
return this;
}
/**
* Time In Force of the Order
* @return tif
**/
@jakarta.annotation.Nullable
@ApiModelProperty(example = "goodTilCancel", value = "Time In Force of the Order")
@JsonProperty(JSON_PROPERTY_TIF)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public TifEnum getTif() {
return tif;
}
@JsonProperty(JSON_PROPERTY_TIF)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTif(TifEnum tif) {
this.tif = tif;
}
public Order tifDate(String tifDate) {
this.tifDate = JsonNullable.of(tifDate);
return this;
}
/**
* Time In Force date for goodTilDate orders in YYYY-MM-DD format
* @return tifDate
**/
@jakarta.annotation.Nullable
@ApiModelProperty(example = "2024-02-21", value = "Time In Force date for goodTilDate orders in YYYY-MM-DD format")
@JsonIgnore
public String getTifDate() {
return tifDate.orElse(null);
}
@JsonProperty(JSON_PROPERTY_TIF_DATE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getTifDate_JsonNullable() {
return tifDate;
}
@JsonProperty(JSON_PROPERTY_TIF_DATE)
public void setTifDate_JsonNullable(JsonNullable tifDate) {
this.tifDate = tifDate;
}
public void setTifDate(String tifDate) {
this.tifDate = JsonNullable.of(tifDate);
}
public Order settlementType(SettlementTypeEnum settlementType) {
this.settlementType = settlementType;
return this;
}
/**
* Indicates order settlement period
* @return settlementType
**/
@jakarta.annotation.Nullable
@ApiModelProperty(example = "regular", value = "Indicates order settlement period")
@JsonProperty(JSON_PROPERTY_SETTLEMENT_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public SettlementTypeEnum getSettlementType() {
return settlementType;
}
@JsonProperty(JSON_PROPERTY_SETTLEMENT_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSettlementType(SettlementTypeEnum settlementType) {
this.settlementType = settlementType;
}
public Order settlementDate(String settlementDate) {
this.settlementDate = JsonNullable.of(settlementDate);
return this;
}
/**
* Settlement date in YYYY-MM-DD format
* @return settlementDate
**/
@jakarta.annotation.Nullable
@ApiModelProperty(example = "2024-03-11", value = "Settlement date in YYYY-MM-DD format")
@JsonIgnore
public String getSettlementDate() {
return settlementDate.orElse(null);
}
@JsonProperty(JSON_PROPERTY_SETTLEMENT_DATE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getSettlementDate_JsonNullable() {
return settlementDate;
}
@JsonProperty(JSON_PROPERTY_SETTLEMENT_DATE)
public void setSettlementDate_JsonNullable(JsonNullable settlementDate) {
this.settlementDate = settlementDate;
}
public void setSettlementDate(String settlementDate) {
this.settlementDate = JsonNullable.of(settlementDate);
}
public Order fundTeam(String fundTeam) {
this.fundTeam = JsonNullable.of(fundTeam);
return this;
}
/**
* Fund Team Id of the Order
* @return fundTeam
**/
@jakarta.annotation.Nullable
@ApiModelProperty(example = "T1", value = "Fund Team Id of the Order")
@JsonIgnore
public String getFundTeam() {
return fundTeam.orElse(null);
}
@JsonProperty(JSON_PROPERTY_FUND_TEAM)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getFundTeam_JsonNullable() {
return fundTeam;
}
@JsonProperty(JSON_PROPERTY_FUND_TEAM)
public void setFundTeam_JsonNullable(JsonNullable fundTeam) {
this.fundTeam = fundTeam;
}
public void setFundTeam(String fundTeam) {
this.fundTeam = JsonNullable.of(fundTeam);
}
public Order tradingTeam(String tradingTeam) {
this.tradingTeam = JsonNullable.of(tradingTeam);
return this;
}
/**
* Trading Team Id of the Order
* @return tradingTeam
**/
@jakarta.annotation.Nullable
@ApiModelProperty(example = "T2", value = "Trading Team Id of the Order")
@JsonIgnore
public String getTradingTeam() {
return tradingTeam.orElse(null);
}
@JsonProperty(JSON_PROPERTY_TRADING_TEAM)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getTradingTeam_JsonNullable() {
return tradingTeam;
}
@JsonProperty(JSON_PROPERTY_TRADING_TEAM)
public void setTradingTeam_JsonNullable(JsonNullable tradingTeam) {
this.tradingTeam = tradingTeam;
}
public void setTradingTeam(String tradingTeam) {
this.tradingTeam = JsonNullable.of(tradingTeam);
}
public Order trader(String trader) {
this.trader = JsonNullable.of(trader);
return this;
}
/**
* User Id of assigned trader.
* @return trader
**/
@jakarta.annotation.Nullable
@ApiModelProperty(example = "msmith", value = "User Id of assigned trader.")
@JsonIgnore
public String getTrader() {
return trader.orElse(null);
}
@JsonProperty(JSON_PROPERTY_TRADER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getTrader_JsonNullable() {
return trader;
}
@JsonProperty(JSON_PROPERTY_TRADER)
public void setTrader_JsonNullable(JsonNullable trader) {
this.trader = trader;
}
public void setTrader(String trader) {
this.trader = JsonNullable.of(trader);
}
public Order account(String account) {
this.account = account;
return this;
}
/**
* Path of the account
* @return account
**/
@jakarta.annotation.Nonnull
@ApiModelProperty(example = "Client:/folder1/testing.acct", required = true, value = "Path of the account")
@JsonProperty(JSON_PROPERTY_ACCOUNT)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getAccount() {
return account;
}
@JsonProperty(JSON_PROPERTY_ACCOUNT)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setAccount(String account) {
this.account = account;
}
public Order symbol(String symbol) {
this.symbol = symbol;
return this;
}
/**
* Symbol corresponding to the traded instrument
* @return symbol
**/
@jakarta.annotation.Nonnull
@ApiModelProperty(example = "FDS-USA", required = true, value = "Symbol corresponding to the traded instrument")
@JsonProperty(JSON_PROPERTY_SYMBOL)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getSymbol() {
return symbol;
}
@JsonProperty(JSON_PROPERTY_SYMBOL)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setSymbol(String symbol) {
this.symbol = symbol;
}
public Order instrumentName(String instrumentName) {
this.instrumentName = instrumentName;
return this;
}
/**
* Name or description of the traded instrument
* @return instrumentName
**/
@jakarta.annotation.Nonnull
@ApiModelProperty(example = "FactSet Research Systems", required = true, value = "Name or description of the traded instrument")
@JsonProperty(JSON_PROPERTY_INSTRUMENT_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getInstrumentName() {
return instrumentName;
}
@JsonProperty(JSON_PROPERTY_INSTRUMENT_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setInstrumentName(String instrumentName) {
this.instrumentName = instrumentName;
}
public Order side(SideEnum side) {
this.side = side;
return this;
}
/**
* Side of the order
* @return side
**/
@jakarta.annotation.Nonnull
@ApiModelProperty(example = "buy", required = true, value = "Side of the order")
@JsonProperty(JSON_PROPERTY_SIDE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public SideEnum getSide() {
return side;
}
@JsonProperty(JSON_PROPERTY_SIDE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setSide(SideEnum side) {
this.side = side;
}
public Order unitType(UnitTypeEnum unitType) {
this.unitType = unitType;
return this;
}
/**
* Unit type of the order. Indicates if the trade is driven by quantity or value
* @return unitType
**/
@jakarta.annotation.Nonnull
@ApiModelProperty(example = "quantity", required = true, value = "Unit type of the order. Indicates if the trade is driven by quantity or value")
@JsonProperty(JSON_PROPERTY_UNIT_TYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public UnitTypeEnum getUnitType() {
return unitType;
}
@JsonProperty(JSON_PROPERTY_UNIT_TYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setUnitType(UnitTypeEnum unitType) {
this.unitType = unitType;
}
public Order transactionLeaves(Double transactionLeaves) {
this.transactionLeaves = JsonNullable.of(transactionLeaves);
return this;
}
/**
* Shares that have been ordered and not executed
* @return transactionLeaves
**/
@jakarta.annotation.Nullable
@ApiModelProperty(example = "0.01", value = "Shares that have been ordered and not executed")
@JsonIgnore
public Double getTransactionLeaves() {
return transactionLeaves.orElse(null);
}
@JsonProperty(JSON_PROPERTY_TRANSACTION_LEAVES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getTransactionLeaves_JsonNullable() {
return transactionLeaves;
}
@JsonProperty(JSON_PROPERTY_TRANSACTION_LEAVES)
public void setTransactionLeaves_JsonNullable(JsonNullable transactionLeaves) {
this.transactionLeaves = transactionLeaves;
}
public void setTransactionLeaves(Double transactionLeaves) {
this.transactionLeaves = JsonNullable.of(transactionLeaves);
}
public Order quantity(Double quantity) {
this.quantity = quantity;
return this;
}
/**
* Quantity of the instrument traded
* @return quantity
**/
@jakarta.annotation.Nonnull
@ApiModelProperty(example = "1000.01", required = true, value = "Quantity of the instrument traded")
@JsonProperty(JSON_PROPERTY_QUANTITY)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Double getQuantity() {
return quantity;
}
@JsonProperty(JSON_PROPERTY_QUANTITY)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setQuantity(Double quantity) {
this.quantity = quantity;
}
public Order gross(Double gross) {
this.gross = gross;
return this;
}
/**
* Cash value of the transaction
* @return gross
**/
@jakarta.annotation.Nonnull
@ApiModelProperty(example = "0.01", required = true, value = "Cash value of the transaction")
@JsonProperty(JSON_PROPERTY_GROSS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Double getGross() {
return gross;
}
@JsonProperty(JSON_PROPERTY_GROSS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setGross(Double gross) {
this.gross = gross;
}
public Order price(Double price) {
this.price = JsonNullable.of(price);
return this;
}
/**
* The transaction price
* @return price
**/
@jakarta.annotation.Nullable
@ApiModelProperty(example = "420.25", value = "The transaction 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 Order currency(String currency) {
this.currency = currency;
return this;
}
/**
* The iso currency code of cash valued fields, Net Amount and Gross Amount
* @return currency
**/
@jakarta.annotation.Nonnull
@ApiModelProperty(example = "USD", required = true, value = "The iso currency code of cash valued fields, Net Amount and Gross Amount")
@JsonProperty(JSON_PROPERTY_CURRENCY)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getCurrency() {
return currency;
}
@JsonProperty(JSON_PROPERTY_CURRENCY)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setCurrency(String currency) {
this.currency = currency;
}
public Order complianceStatus(ComplianceStatusEnum complianceStatus) {
this.complianceStatus = complianceStatus;
return this;
}
/**
* Compliance check status
* @return complianceStatus
**/
@jakarta.annotation.Nullable
@ApiModelProperty(example = "unchecked", value = "Compliance check status")
@JsonProperty(JSON_PROPERTY_COMPLIANCE_STATUS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ComplianceStatusEnum getComplianceStatus() {
return complianceStatus;
}
@JsonProperty(JSON_PROPERTY_COMPLIANCE_STATUS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setComplianceStatus(ComplianceStatusEnum complianceStatus) {
this.complianceStatus = complianceStatus;
}
public Order addedDateTime(String addedDateTime) {
this.addedDateTime = JsonNullable.of(addedDateTime);
return this;
}
/**
* Date and time expressed in UTC when the transaction was first added in the format YYYY-MM-DDTHH:MM:SS.FFF
* @return addedDateTime
**/
@jakarta.annotation.Nullable
@ApiModelProperty(example = "2024-01-25T09:30:23.235", value = "Date and time expressed in UTC when the transaction was first added in the format YYYY-MM-DDTHH:MM:SS.FFF")
@JsonIgnore
public String getAddedDateTime() {
return addedDateTime.orElse(null);
}
@JsonProperty(JSON_PROPERTY_ADDED_DATE_TIME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getAddedDateTime_JsonNullable() {
return addedDateTime;
}
@JsonProperty(JSON_PROPERTY_ADDED_DATE_TIME)
public void setAddedDateTime_JsonNullable(JsonNullable addedDateTime) {
this.addedDateTime = addedDateTime;
}
public void setAddedDateTime(String addedDateTime) {
this.addedDateTime = JsonNullable.of(addedDateTime);
}
public Order updatedDateTime(String updatedDateTime) {
this.updatedDateTime = JsonNullable.of(updatedDateTime);
return this;
}
/**
* Date and time expressed in UTC when the transaction was last updated in the format YYYY-MM-DDTHH:MM:SS.FFF
* @return updatedDateTime
**/
@jakarta.annotation.Nullable
@ApiModelProperty(example = "2024-01-25T09:30:23.235", value = "Date and time expressed in UTC when the transaction was last updated in the format YYYY-MM-DDTHH:MM:SS.FFF")
@JsonIgnore
public String getUpdatedDateTime() {
return updatedDateTime.orElse(null);
}
@JsonProperty(JSON_PROPERTY_UPDATED_DATE_TIME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getUpdatedDateTime_JsonNullable() {
return updatedDateTime;
}
@JsonProperty(JSON_PROPERTY_UPDATED_DATE_TIME)
public void setUpdatedDateTime_JsonNullable(JsonNullable updatedDateTime) {
this.updatedDateTime = updatedDateTime;
}
public void setUpdatedDateTime(String updatedDateTime) {
this.updatedDateTime = JsonNullable.of(updatedDateTime);
}
public Order additionalFields(java.util.List additionalFields) {
this.additionalFields = JsonNullable.>of(additionalFields);
return this;
}
public Order addAdditionalFieldsItem(AdditionalField additionalFieldsItem) {
if (this.additionalFields == null || !this.additionalFields.isPresent()) {
this.additionalFields = JsonNullable.>of(new java.util.ArrayList<>());
}
try {
this.additionalFields.get().add(additionalFieldsItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* List of additional fields which can be used for dynamically populating other ofdb fields
* @return additionalFields
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "List of additional fields which can be used for dynamically populating other ofdb fields")
@JsonIgnore
public java.util.List getAdditionalFields() {
return additionalFields.orElse(null);
}
@JsonProperty(JSON_PROPERTY_ADDITIONAL_FIELDS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable> getAdditionalFields_JsonNullable() {
return additionalFields;
}
@JsonProperty(JSON_PROPERTY_ADDITIONAL_FIELDS)
public void setAdditionalFields_JsonNullable(JsonNullable> additionalFields) {
this.additionalFields = additionalFields;
}
public void setAdditionalFields(java.util.List additionalFields) {
this.additionalFields = JsonNullable.>of(additionalFields);
}
/**
* Return true if this Order object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Order order = (Order) o;
return Objects.equals(this.orderDate, order.orderDate) &&
Objects.equals(this.transactionId, order.transactionId) &&
equalsNullable(this.orderId, order.orderId) &&
Objects.equals(this.transactionStatus, order.transactionStatus) &&
Objects.equals(this.orderType, order.orderType) &&
Objects.equals(this.limitPrice, order.limitPrice) &&
Objects.equals(this.stopPrice, order.stopPrice) &&
Objects.equals(this.tif, order.tif) &&
equalsNullable(this.tifDate, order.tifDate) &&
Objects.equals(this.settlementType, order.settlementType) &&
equalsNullable(this.settlementDate, order.settlementDate) &&
equalsNullable(this.fundTeam, order.fundTeam) &&
equalsNullable(this.tradingTeam, order.tradingTeam) &&
equalsNullable(this.trader, order.trader) &&
Objects.equals(this.account, order.account) &&
Objects.equals(this.symbol, order.symbol) &&
Objects.equals(this.instrumentName, order.instrumentName) &&
Objects.equals(this.side, order.side) &&
Objects.equals(this.unitType, order.unitType) &&
equalsNullable(this.transactionLeaves, order.transactionLeaves) &&
Objects.equals(this.quantity, order.quantity) &&
Objects.equals(this.gross, order.gross) &&
equalsNullable(this.price, order.price) &&
Objects.equals(this.currency, order.currency) &&
Objects.equals(this.complianceStatus, order.complianceStatus) &&
equalsNullable(this.addedDateTime, order.addedDateTime) &&
equalsNullable(this.updatedDateTime, order.updatedDateTime) &&
equalsNullable(this.additionalFields, order.additionalFields);
}
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(orderDate, transactionId, hashCodeNullable(orderId), transactionStatus, orderType, limitPrice, stopPrice, tif, hashCodeNullable(tifDate), settlementType, hashCodeNullable(settlementDate), hashCodeNullable(fundTeam), hashCodeNullable(tradingTeam), hashCodeNullable(trader), account, symbol, instrumentName, side, unitType, hashCodeNullable(transactionLeaves), quantity, gross, hashCodeNullable(price), currency, complianceStatus, hashCodeNullable(addedDateTime), hashCodeNullable(updatedDateTime), hashCodeNullable(additionalFields));
}
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 Order {\n");
sb.append(" orderDate: ").append(toIndentedString(orderDate)).append("\n");
sb.append(" transactionId: ").append(toIndentedString(transactionId)).append("\n");
sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n");
sb.append(" transactionStatus: ").append(toIndentedString(transactionStatus)).append("\n");
sb.append(" orderType: ").append(toIndentedString(orderType)).append("\n");
sb.append(" limitPrice: ").append(toIndentedString(limitPrice)).append("\n");
sb.append(" stopPrice: ").append(toIndentedString(stopPrice)).append("\n");
sb.append(" tif: ").append(toIndentedString(tif)).append("\n");
sb.append(" tifDate: ").append(toIndentedString(tifDate)).append("\n");
sb.append(" settlementType: ").append(toIndentedString(settlementType)).append("\n");
sb.append(" settlementDate: ").append(toIndentedString(settlementDate)).append("\n");
sb.append(" fundTeam: ").append(toIndentedString(fundTeam)).append("\n");
sb.append(" tradingTeam: ").append(toIndentedString(tradingTeam)).append("\n");
sb.append(" trader: ").append(toIndentedString(trader)).append("\n");
sb.append(" account: ").append(toIndentedString(account)).append("\n");
sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n");
sb.append(" instrumentName: ").append(toIndentedString(instrumentName)).append("\n");
sb.append(" side: ").append(toIndentedString(side)).append("\n");
sb.append(" unitType: ").append(toIndentedString(unitType)).append("\n");
sb.append(" transactionLeaves: ").append(toIndentedString(transactionLeaves)).append("\n");
sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n");
sb.append(" gross: ").append(toIndentedString(gross)).append("\n");
sb.append(" price: ").append(toIndentedString(price)).append("\n");
sb.append(" currency: ").append(toIndentedString(currency)).append("\n");
sb.append(" complianceStatus: ").append(toIndentedString(complianceStatus)).append("\n");
sb.append(" addedDateTime: ").append(toIndentedString(addedDateTime)).append("\n");
sb.append(" updatedDateTime: ").append(toIndentedString(updatedDateTime)).append("\n");
sb.append(" additionalFields: ").append(toIndentedString(additionalFields)).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 ");
}
}