Interface ZoneDraft

All Superinterfaces:
Draft<ZoneDraft>, WithKey

public interface ZoneDraft extends WithKey, Draft<ZoneDraft>
ZoneDraft
Example to create an instance using the builder pattern

     ZoneDraft zoneDraft = ZoneDraft.builder()
             .name("{name}")
             .build()
 
  • Method Details

    • getKey

      String getKey()

      User-defined unique identifier for the Zone.

      Specified by:
      getKey in interface WithKey
      Returns:
      key
    • getName

      @NotNull @NotNull String getName()

      Name of the Zone.

      Returns:
      name
    • getDescription

      String getDescription()

      Description of the Zone.

      Returns:
      description
    • getLocations

      @Valid @Valid List<Location> getLocations()

      List of locations that belong to the Zone.

      Returns:
      locations
    • setKey

      void setKey(String key)

      User-defined unique identifier for the Zone.

      Parameters:
      key - value to be set
    • setName

      void setName(String name)

      Name of the Zone.

      Parameters:
      name - value to be set
    • setDescription

      void setDescription(String description)

      Description of the Zone.

      Parameters:
      description - value to be set
    • setLocations

      void setLocations(Location... locations)

      List of locations that belong to the Zone.

      Parameters:
      locations - values to be set
    • setLocations

      void setLocations(List<Location> locations)

      List of locations that belong to the Zone.

      Parameters:
      locations - values to be set
    • of

      static ZoneDraft of()
      factory method
      Returns:
      instance of ZoneDraft
    • of

      static ZoneDraft of(ZoneDraft template)
      factory method to create a shallow copy ZoneDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static ZoneDraft deepCopy(@Nullable ZoneDraft template)
      factory method to create a deep copy of ZoneDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static ZoneDraftBuilder builder()
      builder factory method for ZoneDraft
      Returns:
      builder
    • builder

      static ZoneDraftBuilder builder(ZoneDraft template)
      create builder for ZoneDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withZoneDraft

      default <T> T withZoneDraft(Function<ZoneDraft,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<ZoneDraft> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference