Interface ChannelDraft
- All Superinterfaces:
CustomizableDraft<ChannelDraft>
,Draft<ChannelDraft>
,WithKey
Example to create an instance using the builder pattern
ChannelDraft channelDraft = ChannelDraft.builder()
.key("{key}")
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ChannelDraftBuilder
builder()
builder factory method for ChannelDraftstatic ChannelDraftBuilder
builder
(ChannelDraft template) create builder for ChannelDraft instancestatic ChannelDraft
deepCopy
(ChannelDraft template) factory method to create a deep copy of ChannelDraft@Valid BaseAddress
Address where the Channel is located.@Valid CustomFieldsDraft
Custom fields defined for the Channel.@Valid LocalizedString
Description of the Channel.@Valid GeoJson
GeoJSON geometry object encoding the geo location of the Channel.@NotNull String
getKey()
User-defined unique identifier for the Channel.@Valid LocalizedString
getName()
Name of the Channel.getRoles()
Roles of the Channel.static ChannelDraft
of()
factory methodstatic ChannelDraft
of
(ChannelDraft template) factory method to create a shallow copy ChannelDraftvoid
setAddress
(BaseAddress address) Address where the Channel is located.void
setCustom
(CustomFieldsDraft custom) Custom fields defined for the Channel.void
setDescription
(LocalizedString description) Description of the Channel.void
setGeoLocation
(GeoJson geoLocation) GeoJSON geometry object encoding the geo location of the Channel.void
User-defined unique identifier for the Channel.void
setName
(LocalizedString name) Name of the Channel.void
setRoles
(ChannelRoleEnum... roles) Roles of the Channel.void
setRoles
(List<ChannelRoleEnum> roles) Roles of the Channel.static com.fasterxml.jackson.core.type.TypeReference<ChannelDraft>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withChannelDraft
(Function<ChannelDraft, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.CustomizableDraft
unwrapCustomizableDraft
-
Method Details
-
getKey
User-defined unique identifier for the Channel.
-
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
Name of the Channel.
- Returns:
- name
-
getDescription
Description of the Channel.
- Returns:
- description
-
getAddress
Address where the Channel is located.
- Returns:
- address
-
getCustom
Custom fields defined for the Channel.
- Specified by:
getCustom
in interfaceCustomizableDraft<ChannelDraft>
- Returns:
- custom
-
getGeoLocation
GeoJSON geometry object encoding the geo location of the Channel. Currently, only the Point type is supported.
- Returns:
- geoLocation
-
setKey
User-defined unique identifier for the Channel.
- Parameters:
key
- value to be set
-
setRoles
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
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
Name of the Channel.
- Parameters:
name
- value to be set
-
setDescription
Description of the Channel.
- Parameters:
description
- value to be set
-
setAddress
Address where the Channel is located.
- Parameters:
address
- value to be set
-
setCustom
Custom fields defined for the Channel.
- Specified by:
setCustom
in interfaceCustomizableDraft<ChannelDraft>
- Parameters:
custom
- value to be set
-
setGeoLocation
GeoJSON geometry object encoding the geo location of the Channel. Currently, only the Point type is supported.
- Parameters:
geoLocation
- value to be set
-
of
factory method- Returns:
- instance of ChannelDraft
-
of
factory method to create a shallow copy ChannelDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of ChannelDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ChannelDraft- Returns:
- builder
-
builder
create builder for ChannelDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withChannelDraft
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-