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

com.factset.sdk.FactSetTrading.models.EMSOrderMetadata Maven / Gradle / Ivy

/*
 * EMS API
 * Allow clients to trade orders.
 *
 * The version of the OpenAPI document: 1
 * 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.FactSetTrading.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 java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.factset.sdk.FactSetTrading.JSON;


/**
 * EMSOrderMetadata
 */
@JsonPropertyOrder({
  EMSOrderMetadata.JSON_PROPERTY_SYMBOL,
  EMSOrderMetadata.JSON_PROPERTY_SIDE,
  EMSOrderMetadata.JSON_PROPERTY_ORDER_TYPE,
  EMSOrderMetadata.JSON_PROPERTY_ORDER_QUANTITY,
  EMSOrderMetadata.JSON_PROPERTY_ERROR,
  EMSOrderMetadata.JSON_PROPERTY_INFO,
  EMSOrderMetadata.JSON_PROPERTY_ORDER_ID
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class EMSOrderMetadata implements Serializable {
  private static final long serialVersionUID = 1L;

  public static final String JSON_PROPERTY_SYMBOL = "symbol";
  private String symbol;

  /**
   * Side
   */
  public enum SideEnum {
    BUY("buy"),
    
    SELL("sell");

    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;

  /**
   * Order Type
   */
  public enum OrderTypeEnum {
    MARKET("market"),
    
    LIMIT("limit"),
    
    STOP("stop"),
    
    STOP_LIMIT("stop_limit"),
    
    MARKET_ON_CLOSE("market_on_close"),
    
    LIMIT_OR_BETTER("limit_or_better");

    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_ORDER_QUANTITY = "orderQuantity";
  private Double orderQuantity;

  public static final String JSON_PROPERTY_ERROR = "error";
  private String error;

  public static final String JSON_PROPERTY_INFO = "info";
  private String info;

  public static final String JSON_PROPERTY_ORDER_ID = "orderId";
  private String orderId;

  public EMSOrderMetadata() { 
  }

  public EMSOrderMetadata symbol(String symbol) {
    this.symbol = symbol;
    return this;
  }

   /**
   * Symbol
   * @return symbol
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Symbol")
  @JsonProperty(JSON_PROPERTY_SYMBOL)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getSymbol() {
    return symbol;
  }


  @JsonProperty(JSON_PROPERTY_SYMBOL)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSymbol(String symbol) {
    this.symbol = symbol;
  }


  public EMSOrderMetadata side(SideEnum side) {
    this.side = side;
    return this;
  }

   /**
   * Side
   * @return side
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Side")
  @JsonProperty(JSON_PROPERTY_SIDE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public SideEnum getSide() {
    return side;
  }


  @JsonProperty(JSON_PROPERTY_SIDE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSide(SideEnum side) {
    this.side = side;
  }


  public EMSOrderMetadata orderType(OrderTypeEnum orderType) {
    this.orderType = orderType;
    return this;
  }

   /**
   * Order Type
   * @return orderType
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Order Type")
  @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 EMSOrderMetadata orderQuantity(Double orderQuantity) {
    this.orderQuantity = orderQuantity;
    return this;
  }

   /**
   * Order Quantity
   * @return orderQuantity
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Order Quantity")
  @JsonProperty(JSON_PROPERTY_ORDER_QUANTITY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Double getOrderQuantity() {
    return orderQuantity;
  }


  @JsonProperty(JSON_PROPERTY_ORDER_QUANTITY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setOrderQuantity(Double orderQuantity) {
    this.orderQuantity = orderQuantity;
  }


  public EMSOrderMetadata error(String error) {
    this.error = error;
    return this;
  }

   /**
   * Error message
   * @return error
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Error message")
  @JsonProperty(JSON_PROPERTY_ERROR)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getError() {
    return error;
  }


  @JsonProperty(JSON_PROPERTY_ERROR)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setError(String error) {
    this.error = error;
  }


  public EMSOrderMetadata info(String info) {
    this.info = info;
    return this;
  }

   /**
   * information
   * @return info
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "information")
  @JsonProperty(JSON_PROPERTY_INFO)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getInfo() {
    return info;
  }


  @JsonProperty(JSON_PROPERTY_INFO)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setInfo(String info) {
    this.info = info;
  }


  public EMSOrderMetadata orderId(String orderId) {
    this.orderId = orderId;
    return this;
  }

   /**
   * Order Id
   * @return orderId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Order Id")
  @JsonProperty(JSON_PROPERTY_ORDER_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getOrderId() {
    return orderId;
  }


  @JsonProperty(JSON_PROPERTY_ORDER_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setOrderId(String orderId) {
    this.orderId = orderId;
  }


  /**
   * Return true if this EMSOrderMetadata object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    EMSOrderMetadata emSOrderMetadata = (EMSOrderMetadata) o;
    return Objects.equals(this.symbol, emSOrderMetadata.symbol) &&
        Objects.equals(this.side, emSOrderMetadata.side) &&
        Objects.equals(this.orderType, emSOrderMetadata.orderType) &&
        Objects.equals(this.orderQuantity, emSOrderMetadata.orderQuantity) &&
        Objects.equals(this.error, emSOrderMetadata.error) &&
        Objects.equals(this.info, emSOrderMetadata.info) &&
        Objects.equals(this.orderId, emSOrderMetadata.orderId);
  }

  @Override
  public int hashCode() {
    return Objects.hash(symbol, side, orderType, orderQuantity, error, info, orderId);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class EMSOrderMetadata {\n");
    sb.append("    symbol: ").append(toIndentedString(symbol)).append("\n");
    sb.append("    side: ").append(toIndentedString(side)).append("\n");
    sb.append("    orderType: ").append(toIndentedString(orderType)).append("\n");
    sb.append("    orderQuantity: ").append(toIndentedString(orderQuantity)).append("\n");
    sb.append("    error: ").append(toIndentedString(error)).append("\n");
    sb.append("    info: ").append(toIndentedString(info)).append("\n");
    sb.append("    orderId: ").append(toIndentedString(orderId)).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