Class RebalancingConditionsResponse

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.28.0") public class RebalancingConditionsResponse extends Object implements Serializable
A rebalancing condition as returned on a portfolio. type, sub_type, percent, and day are always present. percent and day are null when they do not apply.
See Also:
  • Field Details

  • Constructor Details

    • RebalancingConditionsResponse

      public RebalancingConditionsResponse()
  • Method Details

    • day

      public RebalancingConditionsResponse day(@Nullable String day)
    • getDay

      @Nullable public String getDay()
      Calendar day. For weekly: monday-friday. For monthly and quarterly: a day of the month from 1 to 31. For annually: MM-DD. null when the condition is not a calendar. Always present.
      Returns:
      day
    • setDay

      public void setDay(@Nullable String day)
    • percent

      public RebalancingConditionsResponse percent(@Nullable String percent)
    • getPercent

      @Nullable public String getPercent()
      Drift band threshold as a decimal string, up to two decimal places. null when the condition is not a drift band. Always present.
      Returns:
      percent
    • setPercent

      public void setPercent(@Nullable String percent)
    • subType

      public RebalancingConditionsResponse subType(@Nonnull String subType)
    • getSubType

      @Nonnull public String getSubType()
      For drift_band: absolute or relative. For calendar: weekly, monthly, quarterly, or annually. Empty string for on_portfolio_update, which has no sub-type. Always present.
      Returns:
      subType
    • setSubType

      public void setSubType(@Nonnull String subType)
    • type

    • getType

      @Nonnull public RebalancingConditionsResponse.TypeEnum getType()
      Condition that triggers automatic rebalancing.
      Returns:
      type
    • setType

      public void setType(@Nonnull RebalancingConditionsResponse.TypeEnum type)
    • putAdditionalProperty

      public RebalancingConditionsResponse 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 RebalancingConditionsResponse 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 RebalancingConditionsResponse
    • fromJson

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

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