Interface ChannelDraft

All Superinterfaces:
CustomizableDraft<ChannelDraft>, Draft<ChannelDraft>, WithKey

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

     ChannelDraft channelDraft = ChannelDraft.builder()
             .key("{key}")
             .build()
 
  • Method Details

    • getKey

      @NotNull @NotNull String getKey()

      User-defined unique identifier for the Channel.

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

      List<ChannelRoleEnum> getRoles()

      Roles of the Channel. Each channel must have at least one role. If not specified, then InventorySupply is assigned by default.

      Returns:
      roles
    • getName

      @Valid @Valid LocalizedString getName()

      Name of the Channel.

      Returns:
      name
    • getDescription

      @Valid @Valid LocalizedString getDescription()

      Description of the Channel.

      Returns:
      description
    • getAddress

      @Valid @Valid BaseAddress getAddress()

      Address where the Channel is located.

      Returns:
      address
    • getCustom

      @Valid @Valid CustomFieldsDraft getCustom()

      Custom fields defined for the Channel.

      Specified by:
      getCustom in interface CustomizableDraft<ChannelDraft>
      Returns:
      custom
    • getGeoLocation

      @Valid @Valid GeoJson getGeoLocation()

      GeoJSON geometry object encoding the geo location of the Channel. Currently, only the Point type is supported.

      Returns:
      geoLocation
    • setKey

      void setKey(String key)

      User-defined unique identifier for the Channel.

      Parameters:
      key - value to be set
    • setRoles

      void setRoles(ChannelRoleEnum... roles)

      Roles of the Channel. Each channel must have at least one role. If not specified, then InventorySupply is assigned by default.

      Parameters:
      roles - values to be set
    • setRoles

      void setRoles(List<ChannelRoleEnum> roles)

      Roles of the Channel. Each channel must have at least one role. If not specified, then InventorySupply is assigned by default.

      Parameters:
      roles - values to be set
    • setName

      void setName(LocalizedString name)

      Name of the Channel.

      Parameters:
      name - value to be set
    • setDescription

      void setDescription(LocalizedString description)

      Description of the Channel.

      Parameters:
      description - value to be set
    • setAddress

      void setAddress(BaseAddress address)

      Address where the Channel is located.

      Parameters:
      address - value to be set
    • setCustom

      void setCustom(CustomFieldsDraft custom)

      Custom fields defined for the Channel.

      Specified by:
      setCustom in interface CustomizableDraft<ChannelDraft>
      Parameters:
      custom - value to be set
    • setGeoLocation

      void setGeoLocation(GeoJson geoLocation)

      GeoJSON geometry object encoding the geo location of the Channel. Currently, only the Point type is supported.

      Parameters:
      geoLocation - value to be set
    • of

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

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

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

      static ChannelDraftBuilder builder()
      builder factory method for ChannelDraft
      Returns:
      builder
    • builder

      static ChannelDraftBuilder builder(ChannelDraft template)
      create builder for ChannelDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withChannelDraft

      default <T> T withChannelDraft(Function<ChannelDraft,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<ChannelDraft> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference