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

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

  • Constructor Details

    • Clock

      public Clock()
  • Method Details

    • isMarketDay

      public Clock isMarketDay(@Nonnull Boolean isMarketDay)
    • getIsMarketDay

      @Nonnull public Boolean getIsMarketDay()
      Whether the clock is on a market day.
      Returns:
      isMarketDay
    • setIsMarketDay

      public void setIsMarketDay(@Nonnull Boolean isMarketDay)
    • market

      public Clock market(@Nonnull PublicMarket market)
    • getMarket

      @Nonnull public PublicMarket getMarket()
      Get market
      Returns:
      market
    • setMarket

      public void setMarket(@Nonnull PublicMarket market)
    • nextMarketClose

      public Clock nextMarketClose(@Nonnull OffsetDateTime nextMarketClose)
    • getNextMarketClose

      @Nonnull public OffsetDateTime getNextMarketClose()
      Next market close timestamp
      Returns:
      nextMarketClose
    • setNextMarketClose

      public void setNextMarketClose(@Nonnull OffsetDateTime nextMarketClose)
    • nextMarketOpen

      public Clock nextMarketOpen(@Nonnull OffsetDateTime nextMarketOpen)
    • getNextMarketOpen

      @Nonnull public OffsetDateTime getNextMarketOpen()
      Next market open timestamp
      Returns:
      nextMarketOpen
    • setNextMarketOpen

      public void setNextMarketOpen(@Nonnull OffsetDateTime nextMarketOpen)
    • phase

      public Clock phase(@Nonnull Phase phase)
    • getPhase

      @Nonnull public Phase getPhase()
      Get phase
      Returns:
      phase
    • setPhase

      public void setPhase(@Nonnull Phase phase)
    • phaseUntil

      public Clock phaseUntil(@Nonnull OffsetDateTime phaseUntil)
    • getPhaseUntil

      @Nonnull public OffsetDateTime getPhaseUntil()
      The end of the current phase.
      Returns:
      phaseUntil
    • setPhaseUntil

      public void setPhaseUntil(@Nonnull OffsetDateTime phaseUntil)
    • timestamp

      public Clock timestamp(@Nonnull OffsetDateTime timestamp)
    • getTimestamp

      @Nonnull public OffsetDateTime getTimestamp()
      The time on the clock.
      Returns:
      timestamp
    • setTimestamp

      public void setTimestamp(@Nonnull OffsetDateTime timestamp)
    • putAdditionalProperty

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

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

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