All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.factset.sdk.DirectStreamingofTransactionMessages.models.Placement Maven / Gradle / Ivy

The newest version!
/*
 * 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;


/**
 * Placement transaction attributes
 */
@ApiModel(description = "Placement transaction attributes")
@JsonPropertyOrder({
  Placement.JSON_PROPERTY_PLACEMENT_DATE,
  Placement.JSON_PROPERTY_TRANSACTION_ID,
  Placement.JSON_PROPERTY_PARENT_ID,
  Placement.JSON_PROPERTY_ORDER_ID,
  Placement.JSON_PROPERTY_TRANSACTION_STATUS,
  Placement.JSON_PROPERTY_ORDER_TYPE,
  Placement.JSON_PROPERTY_LIMIT_PRICE,
  Placement.JSON_PROPERTY_STOP_PRICE,
  Placement.JSON_PROPERTY_TIF,
  Placement.JSON_PROPERTY_TIF_DATE,
  Placement.JSON_PROPERTY_SETTLEMENT_TYPE,
  Placement.JSON_PROPERTY_SETTLEMENT_DATE,
  Placement.JSON_PROPERTY_ACCOUNT,
  Placement.JSON_PROPERTY_SYMBOL,
  Placement.JSON_PROPERTY_INSTRUMENT_NAME,
  Placement.JSON_PROPERTY_SIDE,
  Placement.JSON_PROPERTY_UNIT_TYPE,
  Placement.JSON_PROPERTY_TRANSACTION_LEAVES,
  Placement.JSON_PROPERTY_QUANTITY,
  Placement.JSON_PROPERTY_GROSS,
  Placement.JSON_PROPERTY_PRICE,
  Placement.JSON_PROPERTY_CURRENCY,
  Placement.JSON_PROPERTY_COMPLIANCE_STATUS,
  Placement.JSON_PROPERTY_ADDED_DATE_TIME,
  Placement.JSON_PROPERTY_UPDATED_DATE_TIME,
  Placement.JSON_PROPERTY_ADDITIONAL_FIELDS
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")

public class Placement implements Serializable {
  private static final long serialVersionUID = 1L;

  public static final String JSON_PROPERTY_PLACEMENT_DATE = "placementDate";
  private String placementDate;

  public static final String JSON_PROPERTY_TRANSACTION_ID = "transactionId";
  private String transactionId;

  public static final String JSON_PROPERTY_PARENT_ID = "parentId";
  private JsonNullable parentId = JsonNullable.undefined();

  public static final String JSON_PROPERTY_ORDER_ID = "orderId";
  private JsonNullable orderId = JsonNullable.undefined();

  /**
   * Status of the Placement
   */
  public enum TransactionStatusEnum {
    PLACED("placed"),
    
    PARTIALFILLED("partialFilled"),
    
    FILLED("filled"),
    
    EXPIRED("expired"),
    
    CANCELLED("cancelled"),
    
    REJECTED("rejected");

    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 Placement
   */
  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 Placement
   */
  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 placement 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_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 Placement() { 
  }

  @JsonCreator
  public Placement(
    @JsonProperty(value=JSON_PROPERTY_PLACEMENT_DATE, required=true) String placementDate, 
    @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.placementDate = placementDate;
    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 Placement placementDate(String placementDate) {
    this.placementDate = placementDate;
    return this;
  }

   /**
   * Placement date which is in the format YYYY-MM-DD
   * @return placementDate
  **/
  @jakarta.annotation.Nonnull
  @ApiModelProperty(example = "2024-01-25", required = true, value = "Placement date which is in the format YYYY-MM-DD")
  @JsonProperty(JSON_PROPERTY_PLACEMENT_DATE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getPlacementDate() {
    return placementDate;
  }


  @JsonProperty(JSON_PROPERTY_PLACEMENT_DATE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setPlacementDate(String placementDate) {
    this.placementDate = placementDate;
  }


  public Placement transactionId(String transactionId) {
    this.transactionId = transactionId;
    return this;
  }

   /**
   * Unique Id of the placement
   * @return transactionId
  **/
  @jakarta.annotation.Nonnull
  @ApiModelProperty(example = "P123", required = true, value = "Unique Id of the placement")
  @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 Placement parentId(String parentId) {
    this.parentId = JsonNullable.of(parentId);
    return this;
  }

   /**
   * transactionId of the order which spawned this placement
   * @return parentId
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "O_FDS_012424_113", value = "transactionId of the order which spawned this placement")
  @JsonIgnore

  public String getParentId() {
        return parentId.orElse(null);
  }

  @JsonProperty(JSON_PROPERTY_PARENT_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public JsonNullable getParentId_JsonNullable() {
    return parentId;
  }
  
  @JsonProperty(JSON_PROPERTY_PARENT_ID)
  public void setParentId_JsonNullable(JsonNullable parentId) {
    this.parentId = parentId;
  }

  public void setParentId(String parentId) {
    this.parentId = JsonNullable.of(parentId);
  }


  public Placement orderId(String orderId) {
    this.orderId = JsonNullable.of(orderId);
    return this;
  }

   /**
   * orderId of the order related to this placement
   * @return orderId
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "O123", value = "orderId of the order related to this placement")
  @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 Placement transactionStatus(TransactionStatusEnum transactionStatus) {
    this.transactionStatus = transactionStatus;
    return this;
  }

   /**
   * Status of the Placement
   * @return transactionStatus
  **/
  @jakarta.annotation.Nonnull
  @ApiModelProperty(required = true, value = "Status of the Placement")
  @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 Placement orderType(OrderTypeEnum orderType) {
    this.orderType = orderType;
    return this;
  }

   /**
   * Order type indicating the price type of the Placement
   * @return orderType
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(value = "Order type indicating the price type of the Placement")
  @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 Placement limitPrice(Double limitPrice) {
    this.limitPrice = limitPrice;
    return this;
  }

   /**
   * Price related to limit and stopLimit order types
   * @return limitPrice
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(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 Placement stopPrice(Double stopPrice) {
    this.stopPrice = stopPrice;
    return this;
  }

   /**
   * Price related to stop and stopLimit order types
   * @return stopPrice
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(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 Placement tif(TifEnum tif) {
    this.tif = tif;
    return this;
  }

   /**
   * Time In Force of the Placement
   * @return tif
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(value = "Time In Force of the Placement")
  @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 Placement tifDate(String tifDate) {
    this.tifDate = JsonNullable.of(tifDate);
    return this;
  }

   /**
   * Time In Force date for goodTilDate placements in YYYY-MM-DD format
   * @return tifDate
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "2024-02-21", value = "Time In Force date for goodTilDate placements 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 Placement settlementType(SettlementTypeEnum settlementType) {
    this.settlementType = settlementType;
    return this;
  }

   /**
   * Indicates placement settlement period
   * @return settlementType
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(value = "Indicates placement 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 Placement 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 Placement 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 Placement 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 Placement 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 Placement side(SideEnum side) {
    this.side = side;
    return this;
  }

   /**
   * Side of the order
   * @return side
  **/
  @jakarta.annotation.Nonnull
  @ApiModelProperty(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 Placement 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(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 Placement transactionLeaves(Double transactionLeaves) {
    this.transactionLeaves = JsonNullable.of(transactionLeaves);
    return this;
  }

   /**
   * Shares that have been ordered and not executed
   * @return transactionLeaves
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(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 Placement quantity(Double quantity) {
    this.quantity = quantity;
    return this;
  }

   /**
   * Quantity of the instrument traded
   * @return quantity
  **/
  @jakarta.annotation.Nonnull
  @ApiModelProperty(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 Placement gross(Double gross) {
    this.gross = gross;
    return this;
  }

   /**
   * Cash value of the transaction
   * @return gross
  **/
  @jakarta.annotation.Nonnull
  @ApiModelProperty(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 Placement price(Double price) {
    this.price = JsonNullable.of(price);
    return this;
  }

   /**
   * The transaction price
   * @return price
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(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 Placement 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 Placement complianceStatus(ComplianceStatusEnum complianceStatus) {
    this.complianceStatus = complianceStatus;
    return this;
  }

   /**
   * Compliance check status
   * @return complianceStatus
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(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 Placement 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 Placement 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 Placement additionalFields(java.util.List additionalFields) {
    this.additionalFields = JsonNullable.>of(additionalFields);
    return this;
  }

  public Placement 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 Placement object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Placement placement = (Placement) o;
    return Objects.equals(this.placementDate, placement.placementDate) &&
        Objects.equals(this.transactionId, placement.transactionId) &&
        equalsNullable(this.parentId, placement.parentId) &&
        equalsNullable(this.orderId, placement.orderId) &&
        Objects.equals(this.transactionStatus, placement.transactionStatus) &&
        Objects.equals(this.orderType, placement.orderType) &&
        Objects.equals(this.limitPrice, placement.limitPrice) &&
        Objects.equals(this.stopPrice, placement.stopPrice) &&
        Objects.equals(this.tif, placement.tif) &&
        equalsNullable(this.tifDate, placement.tifDate) &&
        Objects.equals(this.settlementType, placement.settlementType) &&
        equalsNullable(this.settlementDate, placement.settlementDate) &&
        Objects.equals(this.account, placement.account) &&
        Objects.equals(this.symbol, placement.symbol) &&
        Objects.equals(this.instrumentName, placement.instrumentName) &&
        Objects.equals(this.side, placement.side) &&
        Objects.equals(this.unitType, placement.unitType) &&
        equalsNullable(this.transactionLeaves, placement.transactionLeaves) &&
        Objects.equals(this.quantity, placement.quantity) &&
        Objects.equals(this.gross, placement.gross) &&
        equalsNullable(this.price, placement.price) &&
        Objects.equals(this.currency, placement.currency) &&
        Objects.equals(this.complianceStatus, placement.complianceStatus) &&
        equalsNullable(this.addedDateTime, placement.addedDateTime) &&
        equalsNullable(this.updatedDateTime, placement.updatedDateTime) &&
        equalsNullable(this.additionalFields, placement.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(placementDate, transactionId, hashCodeNullable(parentId), hashCodeNullable(orderId), transactionStatus, orderType, limitPrice, stopPrice, tif, hashCodeNullable(tifDate), settlementType, hashCodeNullable(settlementDate), 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 Placement {\n");
    sb.append("    placementDate: ").append(toIndentedString(placementDate)).append("\n");
    sb.append("    transactionId: ").append(toIndentedString(transactionId)).append("\n");
    sb.append("    parentId: ").append(toIndentedString(parentId)).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("    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    ");
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy