Class PortfolioRun

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

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

  • Constructor Details

    • PortfolioRun

      public PortfolioRun()
  • Method Details

    • accountId

      public PortfolioRun accountId(@Nullable String accountId)
    • getAccountId

      @Nullable public String getAccountId()
      Account ID for given run
      Returns:
      accountId
    • setAccountId

      public void setAccountId(@Nullable String accountId)
    • canceledAt

      public PortfolioRun canceledAt(@Nullable String canceledAt)
    • getCanceledAt

      @Nullable public String getCanceledAt()
      RFC3339 format
      Returns:
      canceledAt
    • setCanceledAt

      public void setCanceledAt(@Nullable String canceledAt)
    • completedAt

      public PortfolioRun completedAt(@Nullable String completedAt)
    • getCompletedAt

      @Nullable public String getCompletedAt()
      RFC3339 format
      Returns:
      completedAt
    • setCompletedAt

      public void setCompletedAt(@Nullable String completedAt)
    • failedOrders

      public PortfolioRun failedOrders(@Nullable List<Order> failedOrders)
    • addFailedOrdersItem

      public PortfolioRun addFailedOrdersItem(Order failedOrdersItem)
    • getFailedOrders

      @Nullable public List<Order> getFailedOrders()
      Array of failed orders for this run
      Returns:
      failedOrders
    • setFailedOrders

      public void setFailedOrders(@Nullable List<Order> failedOrders)
    • id

      public PortfolioRun id(@Nullable String id)
    • getId

      @Nullable public String getId()
      Run ID
      Returns:
      id
    • setId

      public void setId(@Nullable String id)
    • initiatedFrom

      public PortfolioRun initiatedFrom(@Nullable PortfolioRun.InitiatedFromEnum initiatedFrom)
    • getInitiatedFrom

      @Nullable public PortfolioRun.InitiatedFromEnum getInitiatedFrom()
      system or api
      Returns:
      initiatedFrom
    • setInitiatedFrom

      public void setInitiatedFrom(@Nullable PortfolioRun.InitiatedFromEnum initiatedFrom)
    • orders

      public PortfolioRun orders(@Nullable List<Order> orders)
    • addOrdersItem

      public PortfolioRun addOrdersItem(Order ordersItem)
    • getOrders

      @Nullable public List<Order> getOrders()
      Array of executed orders for this run
      Returns:
      orders
    • setOrders

      public void setOrders(@Nullable List<Order> orders)
    • portfolioId

      public PortfolioRun portfolioId(@Nullable String portfolioId)
    • getPortfolioId

      @Nullable public String getPortfolioId()
      Portfolio ID for given run
      Returns:
      portfolioId
    • setPortfolioId

      public void setPortfolioId(@Nullable String portfolioId)
    • reason

      public PortfolioRun reason(@Nullable String reason)
    • getReason

      @Nullable public String getReason()
      Explainer text in case of failed runs
      Returns:
      reason
    • setReason

      public void setReason(@Nullable String reason)
    • skippedOrders

      public PortfolioRun skippedOrders(@Nullable List<SkippedOrder> skippedOrders)
    • addSkippedOrdersItem

      public PortfolioRun addSkippedOrdersItem(SkippedOrder skippedOrdersItem)
    • getSkippedOrders

      @Nullable public List<SkippedOrder> getSkippedOrders()
      Array of skipped order for this run
      Returns:
      skippedOrders
    • setSkippedOrders

      public void setSkippedOrders(@Nullable List<SkippedOrder> skippedOrders)
    • status

      public PortfolioRun status(@Nullable PortfolioRunStatus status)
    • getStatus

      @Nullable public PortfolioRunStatus getStatus()
      Get status
      Returns:
      status
    • setStatus

      public void setStatus(@Nullable PortfolioRunStatus status)
    • type

      public PortfolioRun type(@Nullable PortfolioRun.TypeEnum type)
    • getType

      @Nullable public PortfolioRun.TypeEnum getType()
      full_rebalance or invest_cash
      Returns:
      type
    • setType

      public void setType(@Nullable PortfolioRun.TypeEnum type)
    • updatedAt

      public PortfolioRun updatedAt(@Nullable String updatedAt)
    • getUpdatedAt

      @Nullable public String getUpdatedAt()
      RFC3339 format
      Returns:
      updatedAt
    • setUpdatedAt

      public void setUpdatedAt(@Nullable String updatedAt)
    • weights

      public PortfolioRun weights(@Nullable List<PortfolioWeights> weights)
    • addWeightsItem

      public PortfolioRun addWeightsItem(PortfolioWeights weightsItem)
    • getWeights

      @Nullable public List<PortfolioWeights> getWeights()
      Considered weighting for this run
      Returns:
      weights
    • setWeights

      public void setWeights(@Nullable List<PortfolioWeights> weights)
    • putAdditionalProperty

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

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

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