Class RebalancingConditions

java.lang.Object
markets.alpaca.client.openapi.broker.model.RebalancingConditions
All Implemented Interfaces:
Serializable

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class RebalancingConditions extends Object implements Serializable
RebalancingConditions
See Also:
  • Field Details

  • Constructor Details

    • RebalancingConditions

      public RebalancingConditions()
  • Method Details

    • day

      public RebalancingConditions day(@Nullable String day)
    • getDay

      @Nullable public String getDay()
      Used to specify the rebalancing day for conditions of type = calendar. Only permitted and required for type = calendar. In scenarios when the specified day aligns to a non-trading day, the rebalance will be triggered on the preceding trading day. For type= annually, the value must be passed in MM-DD format. If 02-29 is specified and the current year is not a leap year, the rebalance will occur on the trading day preceding 2/29. For type= quarterly and monthly the value must be an integer between 1 and 31 inclusive. This represents the day of month. For quarterly, rebalancing will trigger on this day in January, March, June, and December. If the specified day is non-existent for the month then the rebalancing will trigger on the preceding trading day. For type = weekly, permitted values are Monday, Tuesday, Wednesday, Thursday, Friday.
      Returns:
      day
    • setDay

      public void setDay(@Nullable String day)
    • percent

      public RebalancingConditions percent(@Nullable String percent)
    • getPercent

      @Nullable public String getPercent()
      Must be a positive value, up to two decimal places. Only permitted and required for type = drift_band. This is the max allowable drift percent from any target weight (+/-)
      Returns:
      percent
    • setPercent

      public void setPercent(@Nullable String percent)
    • subType

      public RebalancingConditions subType(@Nullable String subType)
    • getSubType

      @Nullable public String getSubType()
      For type = drift_band: absolute or relative. For type = calendar: weekly,monthly, quarterly or annually. For type = on_portfolio_update: there is no subtype
      Returns:
      subType
    • setSubType

      public void setSubType(@Nullable String subType)
    • type

      public RebalancingConditions type(@Nullable String type)
    • getType

      @Nullable public String getType()
      Possible values of drift_band, calendar or on_portfolio_update
      Returns:
      type
    • setType

      public void setType(@Nullable String type)
    • putAdditionalProperty

      public RebalancingConditions putAdditionalProperty(String key, Object value)
      Set the additional (undeclared) property with the specified name and value. If the property does not already exist, create it otherwise replace it.
      Parameters:
      key - name of the property
      value - value of the property
      Returns:
      the RebalancingConditions instance itself
    • getAdditionalProperties

      public Map<String,Object> getAdditionalProperties()
      Return the additional (undeclared) property.
      Returns:
      a map of objects
    • getAdditionalProperty

      public Object getAdditionalProperty(String key)
      Return the additional (undeclared) property with the specified name.
      Parameters:
      key - name of the property
      Returns:
      an object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      Validates the JSON Element and throws an exception if issues found
      Parameters:
      jsonElement - JSON Element
      Throws:
      IOException - if the JSON Element is invalid with respect to RebalancingConditions
    • fromJson

      public static RebalancingConditions fromJson(String jsonString) throws IOException
      Create an instance of RebalancingConditions given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of RebalancingConditions
      Throws:
      IOException - if the JSON string is invalid with respect to RebalancingConditions
    • toJson

      public String toJson()
      Convert an instance of RebalancingConditions to an JSON string
      Returns:
      JSON string