Class Demand

java.lang.Object
com.veeroute.lss.universal.model.Demand

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2026-11-23T13:48:07.156941043+03:00[Europe/Moscow]", comments="Generator version: 7.17.0") public class Demand extends Object
Request for a single action with a cargo (pickup / drop) or work at a location.
  • Field Details

  • Constructor Details

    • Demand

      public Demand()
  • Method Details

    • key

      public Demand key(@Nonnull String key)
    • getKey

      @Nonnull public String getKey()
      Demand key, unique identifier.
      Returns:
      key
    • setKey

      public void setKey(@Nonnull String key)
    • demandType

      public Demand demandType(@Nonnull DemandType demandType)
    • getDemandType

      @Nonnull public DemandType getDemandType()
      Get demandType
      Returns:
      demandType
    • setDemandType

      public void setDemandType(@Nonnull DemandType demandType)
    • targetCargos

      public Demand targetCargos(@Nullable Set<String> targetCargos)
    • addTargetCargosItem

      public Demand addTargetCargosItem(String targetCargosItem)
    • getTargetCargos

      @Nullable public Set<String> getTargetCargos()
      The list of cargo keys depends on the type of order in which the cargoes are located: * `PICKUP` - list of keys * `DROP` - one key * `WORK` - empty list * `PICKUP_TO_BOX` - one key * `DROP_FROM_BOX` - one key
      Returns:
      targetCargos
    • setTargetCargos

      public void setTargetCargos(@Nullable Set<String> targetCargos)
    • precedenceInTrip

      public Demand precedenceInTrip(@Nullable Integer precedenceInTrip)
    • getPrecedenceInTrip

      @Nullable public Integer getPrecedenceInTrip()
      Precedence within a trip, 0 - the precedence is not taken into account. minimum: 0 maximum: 15001
      Returns:
      precedenceInTrip
    • setPrecedenceInTrip

      public void setPrecedenceInTrip(@Nullable Integer precedenceInTrip)
    • precedenceInOrder

      public Demand precedenceInOrder(@Nullable Integer precedenceInOrder)
    • getPrecedenceInOrder

      @Nullable public Integer getPrecedenceInOrder()
      Precedence within an order, 0 - the precedence is not taken into account. minimum: 0 maximum: 15001
      Returns:
      precedenceInOrder
    • setPrecedenceInOrder

      public void setPrecedenceInOrder(@Nullable Integer precedenceInOrder)
    • possibleEvents

      public Demand possibleEvents(@Nonnull Set<PossibleEvent> possibleEvents)
    • addPossibleEventsItem

      public Demand addPossibleEventsItem(PossibleEvent possibleEventsItem)
    • getPossibleEvents

      @Nonnull public Set<PossibleEvent> getPossibleEvents()
      List of possible time windows and location keys to fulfil an order.
      Returns:
      possibleEvents
    • setPossibleEvents

      public void setPossibleEvents(@Nonnull Set<PossibleEvent> possibleEvents)
    • name

      public Demand name(@Nullable String name)
    • getName

      @Nullable public String getName()
      Name, information field.
      Returns:
      name
    • setName

      public void setName(@Nullable String name)
    • attributes

      public Demand attributes(@Nullable Set<Attribute> attributes)
    • addAttributesItem

      public Demand addAttributesItem(Attribute attributesItem)
    • getAttributes

      @Nullable public Set<Attribute> getAttributes()
      Attributes. Used to add service information.
      Returns:
      attributes
    • setAttributes

      public void setAttributes(@Nullable Set<Attribute> attributes)
    • putAdditionalProperty

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

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

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