com.factset.sdk.DirectStreamingofTransactionMessages.models.OrderParameters 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.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.DirectStreamingofTransactionMessages.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 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;
/**
* OrderParameters
*/
@JsonPropertyOrder({
OrderParameters.JSON_PROPERTY_ORDERID,
OrderParameters.JSON_PROPERTY_PORTFOLIO,
OrderParameters.JSON_PROPERTY_TRANSACTIONID,
OrderParameters.JSON_PROPERTY_SYMBOL,
OrderParameters.JSON_PROPERTY_DESCRIPTION,
OrderParameters.JSON_PROPERTY_TRADETYPE,
OrderParameters.JSON_PROPERTY_STATUS,
OrderParameters.JSON_PROPERTY_TRADEDATE,
OrderParameters.JSON_PROPERTY_TRANSACTIONLEAVES,
OrderParameters.JSON_PROPERTY_AMOUNT,
OrderParameters.JSON_PROPERTY_CURRENCYISO,
OrderParameters.JSON_PROPERTY_FOREIGNEXCHANGERATE
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class OrderParameters implements Serializable {
private static final long serialVersionUID = 1L;
public static final String JSON_PROPERTY_ORDERID = "orderid";
private JsonNullable orderid = JsonNullable.undefined();
public static final String JSON_PROPERTY_PORTFOLIO = "portfolio";
private String portfolio;
public static final String JSON_PROPERTY_TRANSACTIONID = "transactionid";
private String transactionid;
public static final String JSON_PROPERTY_SYMBOL = "symbol";
private String symbol;
public static final String JSON_PROPERTY_DESCRIPTION = "description";
private String description;
public static final String JSON_PROPERTY_TRADETYPE = "tradetype";
private String tradetype;
public static final String JSON_PROPERTY_STATUS = "status";
private String status;
public static final String JSON_PROPERTY_TRADEDATE = "tradedate";
private String tradedate;
public static final String JSON_PROPERTY_TRANSACTIONLEAVES = "transactionleaves";
private Double transactionleaves;
public static final String JSON_PROPERTY_AMOUNT = "amount";
private Double amount;
public static final String JSON_PROPERTY_CURRENCYISO = "currencyiso";
private String currencyiso;
public static final String JSON_PROPERTY_FOREIGNEXCHANGERATE = "foreignexchangerate";
private Float foreignexchangerate;
public OrderParameters() {
}
@JsonCreator
public OrderParameters(
@JsonProperty(value=JSON_PROPERTY_PORTFOLIO, required=true) String portfolio,
@JsonProperty(value=JSON_PROPERTY_TRANSACTIONID, required=true) String transactionid,
@JsonProperty(value=JSON_PROPERTY_SYMBOL, required=true) String symbol,
@JsonProperty(value=JSON_PROPERTY_DESCRIPTION, required=true) String description,
@JsonProperty(value=JSON_PROPERTY_TRADETYPE, required=true) String tradetype,
@JsonProperty(value=JSON_PROPERTY_STATUS, required=true) String status,
@JsonProperty(value=JSON_PROPERTY_TRADEDATE, required=true) String tradedate,
@JsonProperty(value=JSON_PROPERTY_AMOUNT, required=true) Double amount,
@JsonProperty(value=JSON_PROPERTY_CURRENCYISO, required=true) String currencyiso
) {
this();
this.portfolio = portfolio;
this.transactionid = transactionid;
this.symbol = symbol;
this.description = description;
this.tradetype = tradetype;
this.status = status;
this.tradedate = tradedate;
this.amount = amount;
this.currencyiso = currencyiso;
}
public OrderParameters orderid(String orderid) {
this.orderid = JsonNullable.of(orderid);
return this;
}
/**
* Unique ID of the order which originated the record
* @return orderid
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Unique ID of the order which originated the record")
@JsonIgnore
public String getOrderid() {
return orderid.orElse(null);
}
@JsonProperty(JSON_PROPERTY_ORDERID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getOrderid_JsonNullable() {
return orderid;
}
@JsonProperty(JSON_PROPERTY_ORDERID)
public void setOrderid_JsonNullable(JsonNullable orderid) {
this.orderid = orderid;
}
public void setOrderid(String orderid) {
this.orderid = JsonNullable.of(orderid);
}
public OrderParameters portfolio(String portfolio) {
this.portfolio = portfolio;
return this;
}
/**
* Path of the portfolio (Ex: Client:/folder1/testing.ofdb)
* @return portfolio
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "Path of the portfolio (Ex: Client:/folder1/testing.ofdb)")
@JsonProperty(JSON_PROPERTY_PORTFOLIO)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getPortfolio() {
return portfolio;
}
@JsonProperty(JSON_PROPERTY_PORTFOLIO)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setPortfolio(String portfolio) {
this.portfolio = portfolio;
}
public OrderParameters transactionid(String transactionid) {
this.transactionid = transactionid;
return this;
}
/**
* Unique id for the transaction
* @return transactionid
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "Unique id for the transaction")
@JsonProperty(JSON_PROPERTY_TRANSACTIONID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getTransactionid() {
return transactionid;
}
@JsonProperty(JSON_PROPERTY_TRANSACTIONID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setTransactionid(String transactionid) {
this.transactionid = transactionid;
}
public OrderParameters symbol(String symbol) {
this.symbol = symbol;
return this;
}
/**
* Symbol corresponding to the traded instrument.
* @return symbol
**/
@javax.annotation.Nonnull
@ApiModelProperty(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 OrderParameters description(String description) {
this.description = description;
return this;
}
/**
* Description
* @return description
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "Description")
@JsonProperty(JSON_PROPERTY_DESCRIPTION)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getDescription() {
return description;
}
@JsonProperty(JSON_PROPERTY_DESCRIPTION)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setDescription(String description) {
this.description = description;
}
public OrderParameters tradetype(String tradetype) {
this.tradetype = tradetype;
return this;
}
/**
* Trade type could be any of the following values BL, BC, SL, SS. which stands for Buy Long, Buy to cover, Sell Long and Sell Short respectively.
* @return tradetype
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "Trade type could be any of the following values BL, BC, SL, SS. which stands for Buy Long, Buy to cover, Sell Long and Sell Short respectively.")
@JsonProperty(JSON_PROPERTY_TRADETYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getTradetype() {
return tradetype;
}
@JsonProperty(JSON_PROPERTY_TRADETYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setTradetype(String tradetype) {
this.tradetype = tradetype;
}
public OrderParameters status(String status) {
this.status = status;
return this;
}
/**
* Status could be any of the following value: ACCT or CNCL. which stands for Accounted and Cancelled respectively.
* @return status
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "Status could be any of the following value: ACCT or CNCL. which stands for Accounted and Cancelled respectively.")
@JsonProperty(JSON_PROPERTY_STATUS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getStatus() {
return status;
}
@JsonProperty(JSON_PROPERTY_STATUS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setStatus(String status) {
this.status = status;
}
public OrderParameters tradedate(String tradedate) {
this.tradedate = tradedate;
return this;
}
/**
* Transaction date which is in the format YYYYMMDD
* @return tradedate
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "Transaction date which is in the format YYYYMMDD")
@JsonProperty(JSON_PROPERTY_TRADEDATE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getTradedate() {
return tradedate;
}
@JsonProperty(JSON_PROPERTY_TRADEDATE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setTradedate(String tradedate) {
this.tradedate = tradedate;
}
public OrderParameters transactionleaves(Double transactionleaves) {
this.transactionleaves = transactionleaves;
return this;
}
/**
* Shares that have been ordered and not executed
* @return transactionleaves
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Shares that have been ordered and not executed")
@JsonProperty(JSON_PROPERTY_TRANSACTIONLEAVES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Double getTransactionleaves() {
return transactionleaves;
}
@JsonProperty(JSON_PROPERTY_TRANSACTIONLEAVES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTransactionleaves(Double transactionleaves) {
this.transactionleaves = transactionleaves;
}
public OrderParameters amount(Double amount) {
this.amount = amount;
return this;
}
/**
* Quantity of the instrument traded.
* @return amount
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "Quantity of the instrument traded.")
@JsonProperty(JSON_PROPERTY_AMOUNT)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Double getAmount() {
return amount;
}
@JsonProperty(JSON_PROPERTY_AMOUNT)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setAmount(Double amount) {
this.amount = amount;
}
public OrderParameters currencyiso(String currencyiso) {
this.currencyiso = currencyiso;
return this;
}
/**
* The currency code of cash valued fields, Net Amount and Gross Amount.
* @return currencyiso
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "The currency code of cash valued fields, Net Amount and Gross Amount.")
@JsonProperty(JSON_PROPERTY_CURRENCYISO)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getCurrencyiso() {
return currencyiso;
}
@JsonProperty(JSON_PROPERTY_CURRENCYISO)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setCurrencyiso(String currencyiso) {
this.currencyiso = currencyiso;
}
public OrderParameters foreignexchangerate(Float foreignexchangerate) {
this.foreignexchangerate = foreignexchangerate;
return this;
}
/**
* FX rate that can be picked up by PA, multiplied with the cash valued fields, Net, Gross, to allow PA to show transactions in reporting currency.
* @return foreignexchangerate
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "FX rate that can be picked up by PA, multiplied with the cash valued fields, Net, Gross, to allow PA to show transactions in reporting currency.")
@JsonProperty(JSON_PROPERTY_FOREIGNEXCHANGERATE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Float getForeignexchangerate() {
return foreignexchangerate;
}
@JsonProperty(JSON_PROPERTY_FOREIGNEXCHANGERATE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setForeignexchangerate(Float foreignexchangerate) {
this.foreignexchangerate = foreignexchangerate;
}
/**
* Return true if this OrderParameters object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
OrderParameters orderParameters = (OrderParameters) o;
return equalsNullable(this.orderid, orderParameters.orderid) &&
Objects.equals(this.portfolio, orderParameters.portfolio) &&
Objects.equals(this.transactionid, orderParameters.transactionid) &&
Objects.equals(this.symbol, orderParameters.symbol) &&
Objects.equals(this.description, orderParameters.description) &&
Objects.equals(this.tradetype, orderParameters.tradetype) &&
Objects.equals(this.status, orderParameters.status) &&
Objects.equals(this.tradedate, orderParameters.tradedate) &&
Objects.equals(this.transactionleaves, orderParameters.transactionleaves) &&
Objects.equals(this.amount, orderParameters.amount) &&
Objects.equals(this.currencyiso, orderParameters.currencyiso) &&
Objects.equals(this.foreignexchangerate, orderParameters.foreignexchangerate);
}
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(orderid), portfolio, transactionid, symbol, description, tradetype, status, tradedate, transactionleaves, amount, currencyiso, foreignexchangerate);
}
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 OrderParameters {\n");
sb.append(" orderid: ").append(toIndentedString(orderid)).append("\n");
sb.append(" portfolio: ").append(toIndentedString(portfolio)).append("\n");
sb.append(" transactionid: ").append(toIndentedString(transactionid)).append("\n");
sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" tradetype: ").append(toIndentedString(tradetype)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" tradedate: ").append(toIndentedString(tradedate)).append("\n");
sb.append(" transactionleaves: ").append(toIndentedString(transactionleaves)).append("\n");
sb.append(" amount: ").append(toIndentedString(amount)).append("\n");
sb.append(" currencyiso: ").append(toIndentedString(currencyiso)).append("\n");
sb.append(" foreignexchangerate: ").append(toIndentedString(foreignexchangerate)).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 ");
}
}