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 ChannelDraftBuilderbuilder()builder factory method for ChannelDraftstatic ChannelDraftBuilderbuilder(ChannelDraft template) create builder for ChannelDraft instancecopyDeep()static ChannelDraftdeepCopy(ChannelDraft template) factory method to create a deep copy of ChannelDraft@Valid BaseAddressAddress where the Channel is located.@Valid CustomFieldsDraftCustom fields defined for the Channel.@Valid LocalizedStringDescription of the Channel.@Valid GeoJsonGeoJSON geometry object encoding the geo location of the Channel.@NotNull StringgetKey()User-defined unique identifier for the Channel.@Valid LocalizedStringgetName()Name of the Channel.getRoles()Roles of the Channel.static ChannelDraftof()factory methodstatic ChannelDraftof(ChannelDraft template) factory method to create a shallow copy ChannelDraftvoidsetAddress(BaseAddress address) Address where the Channel is located.voidsetCustom(CustomFieldsDraft custom) Custom fields defined for the Channel.voidsetDescription(LocalizedString description) Description of the Channel.voidsetGeoLocation(GeoJson geoLocation) GeoJSON geometry object encoding the geo location of the Channel.voidUser-defined unique identifier for the Channel.voidsetName(LocalizedString name) Name of the Channel.voidsetRoles(ChannelRoleEnum... roles) Roles of the Channel.voidsetRoles(List<ChannelRoleEnum> roles) Roles of the Channel.static com.fasterxml.jackson.core.type.TypeReference<ChannelDraft>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithChannelDraft(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
InventorySupplyis 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:
getCustomin 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
InventorySupplyis 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
InventorySupplyis 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:
setCustomin 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
-
copyDeep
ChannelDraft copyDeep() -
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
-