Interface Zone

All Superinterfaces:
BaseResource, DomainResource<Zone>, Identifiable<Zone>, Referencable<Zone>, ResourceIdentifiable<Zone>, Versioned<Zone>, WithKey, ZoneMixin

Zone
Example to create an instance using the builder pattern

     Zone zone = Zone.builder()
             .id("{id}")
             .version(0.3)
             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .name("{name}")
             .plusLocations(locationsBuilder -> locationsBuilder)
             .build()
 
  • Method Details

    • getId

      @NotNull @NotNull String getId()

      Unique identifier of the Zone.

      Specified by:
      getId in interface BaseResource
      Specified by:
      getId in interface DomainResource<Zone>
      Specified by:
      getId in interface Identifiable<Zone>
      Specified by:
      getId in interface Versioned<Zone>
      Returns:
      id
    • getVersion

      @NotNull @NotNull Long getVersion()

      Current version of the Zone.

      Specified by:
      getVersion in interface BaseResource
      Specified by:
      getVersion in interface DomainResource<Zone>
      Specified by:
      getVersion in interface Versioned<Zone>
      Returns:
      version
    • getCreatedAt

      @NotNull @NotNull ZonedDateTime getCreatedAt()

      Date and time (UTC) the Zone was initially created.

      Specified by:
      getCreatedAt in interface BaseResource
      Returns:
      createdAt
    • getLastModifiedAt

      @NotNull @NotNull ZonedDateTime getLastModifiedAt()

      Date and time (UTC) the Zone was last updated.

      Specified by:
      getLastModifiedAt in interface BaseResource
      Returns:
      lastModifiedAt
    • getLastModifiedBy

      @Valid @Valid LastModifiedBy getLastModifiedBy()

      IDs and references that last modified the Zone.

      Returns:
      lastModifiedBy
    • getCreatedBy

      @Valid @Valid CreatedBy getCreatedBy()

      IDs and references that created the Zone.

      Returns:
      createdBy
    • getKey

      String getKey()

      User-defined unique identifier of 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

      @NotNull @Valid @NotNull @Valid List<Location> getLocations()

      List of locations that belong to the Zone.

      Specified by:
      getLocations in interface ZoneMixin
      Returns:
      locations
    • setId

      void setId(String id)

      Unique identifier of the Zone.

      Specified by:
      setId in interface BaseResource
      Parameters:
      id - value to be set
    • setVersion

      void setVersion(Long version)

      Current version of the Zone.

      Specified by:
      setVersion in interface BaseResource
      Parameters:
      version - value to be set
    • setCreatedAt

      void setCreatedAt(ZonedDateTime createdAt)

      Date and time (UTC) the Zone was initially created.

      Specified by:
      setCreatedAt in interface BaseResource
      Parameters:
      createdAt - value to be set
    • setLastModifiedAt

      void setLastModifiedAt(ZonedDateTime lastModifiedAt)

      Date and time (UTC) the Zone was last updated.

      Specified by:
      setLastModifiedAt in interface BaseResource
      Parameters:
      lastModifiedAt - value to be set
    • setLastModifiedBy

      void setLastModifiedBy(LastModifiedBy lastModifiedBy)

      IDs and references that last modified the Zone.

      Parameters:
      lastModifiedBy - value to be set
    • setCreatedBy

      void setCreatedBy(CreatedBy createdBy)

      IDs and references that created the Zone.

      Parameters:
      createdBy - value to be set
    • setKey

      void setKey(String key)

      User-defined unique identifier of 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 Zone of()
      factory method
      Returns:
      instance of Zone
    • of

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

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

      static ZoneBuilder builder()
      builder factory method for Zone
      Returns:
      builder
    • builder

      static ZoneBuilder builder(Zone template)
      create builder for Zone instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withZone

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

      static ReferenceTypeId referenceTypeId()
    • typeReference

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