Class InboundBulkContentMessage.Builder
- java.lang.Object
-
- com.courier.api.resources.bulk.types.InboundBulkContentMessage.Builder
-
- All Implemented Interfaces:
InboundBulkContentMessage._FinalStage,InboundBulkContentMessage.ContentStage
- Enclosing class:
- InboundBulkContentMessage
public static final class InboundBulkContentMessage.Builder extends java.lang.Object implements InboundBulkContentMessage.ContentStage, InboundBulkContentMessage._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InboundBulkContentMessage._FinalStagebrandId(java.lang.String brandId)InboundBulkContentMessage._FinalStagebrandId(java.util.Optional<java.lang.String> brandId)InboundBulkContentMessagebuild()InboundBulkContentMessage._FinalStagechannels(java.util.Map<java.lang.String,Channel> channels)"Define run-time configuration for one or more channels.InboundBulkContentMessage._FinalStagechannels(java.util.Optional<java.util.Map<java.lang.String,Channel>> channels)InboundBulkContentMessage._FinalStagecontent(Content content)Describes the content of the message in a way that will work for email, push, chat, or any channel.InboundBulkContentMessage._FinalStagecontext(MessageContext context)Context to load with this recipient.InboundBulkContentMessage._FinalStagecontext(java.util.Optional<MessageContext> context)InboundBulkContentMessage._FinalStagedata(java.util.Map<java.lang.String,java.lang.Object> data)An arbitrary object that includes any data you want to pass to the message.InboundBulkContentMessage._FinalStagedata(java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>> data)InboundBulkContentMessage._FinalStagedelay(Delay delay)Defines the time to wait before delivering the message.InboundBulkContentMessage._FinalStagedelay(java.util.Optional<Delay> delay)InboundBulkContentMessage._FinalStageexpiry(Expiry expiry)"Expiry allows you to set an absolute or relative time in which a message expires.InboundBulkContentMessage._FinalStageexpiry(java.util.Optional<Expiry> expiry)InboundBulkContentMessage.Builderfrom(InboundBulkContentMessage other)InboundBulkContentMessage._FinalStagemetadata(MessageMetadata metadata)Metadata such as utm tracking attached with the notification through this channel.InboundBulkContentMessage._FinalStagemetadata(java.util.Optional<MessageMetadata> metadata)InboundBulkContentMessage._FinalStageproviders(java.util.Map<java.lang.String,MessageProvidersType> providers)An object whose keys are valid provider identifiers which map to an object.InboundBulkContentMessage._FinalStageproviders(java.util.Optional<java.util.Map<java.lang.String,MessageProvidersType>> providers)InboundBulkContentMessage._FinalStagerouting(Routing routing)InboundBulkContentMessage._FinalStagerouting(java.util.Optional<Routing> routing)InboundBulkContentMessage._FinalStagetimeout(Timeout timeout)Time in ms to attempt the channel before failing over to the next available channel.InboundBulkContentMessage._FinalStagetimeout(java.util.Optional<Timeout> timeout)
-
-
-
Method Detail
-
from
public InboundBulkContentMessage.Builder from(InboundBulkContentMessage other)
- Specified by:
fromin interfaceInboundBulkContentMessage.ContentStage
-
content
public InboundBulkContentMessage._FinalStage content(Content content)
Describes the content of the message in a way that will work for email, push, chat, or any channel. Either this or template must be specified.
- Specified by:
contentin interfaceInboundBulkContentMessage.ContentStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
expiry
public InboundBulkContentMessage._FinalStage expiry(Expiry expiry)
"Expiry allows you to set an absolute or relative time in which a message expires. Note: This is only valid for the Courier Inbox channel as of 12-08-2022."
- Specified by:
expiryin interfaceInboundBulkContentMessage._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
expiry
public InboundBulkContentMessage._FinalStage expiry(java.util.Optional<Expiry> expiry)
- Specified by:
expiryin interfaceInboundBulkContentMessage._FinalStage
-
delay
public InboundBulkContentMessage._FinalStage delay(Delay delay)
Defines the time to wait before delivering the message.
- Specified by:
delayin interfaceInboundBulkContentMessage._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
delay
public InboundBulkContentMessage._FinalStage delay(java.util.Optional<Delay> delay)
- Specified by:
delayin interfaceInboundBulkContentMessage._FinalStage
-
timeout
public InboundBulkContentMessage._FinalStage timeout(Timeout timeout)
Time in ms to attempt the channel before failing over to the next available channel.
- Specified by:
timeoutin interfaceInboundBulkContentMessage._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
timeout
public InboundBulkContentMessage._FinalStage timeout(java.util.Optional<Timeout> timeout)
- Specified by:
timeoutin interfaceInboundBulkContentMessage._FinalStage
-
routing
public InboundBulkContentMessage._FinalStage routing(Routing routing)
- Specified by:
routingin interfaceInboundBulkContentMessage._FinalStage
-
routing
public InboundBulkContentMessage._FinalStage routing(java.util.Optional<Routing> routing)
- Specified by:
routingin interfaceInboundBulkContentMessage._FinalStage
-
providers
public InboundBulkContentMessage._FinalStage providers(java.util.Map<java.lang.String,MessageProvidersType> providers)
An object whose keys are valid provider identifiers which map to an object.
- Specified by:
providersin interfaceInboundBulkContentMessage._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
providers
public InboundBulkContentMessage._FinalStage providers(java.util.Optional<java.util.Map<java.lang.String,MessageProvidersType>> providers)
- Specified by:
providersin interfaceInboundBulkContentMessage._FinalStage
-
metadata
public InboundBulkContentMessage._FinalStage metadata(MessageMetadata metadata)
Metadata such as utm tracking attached with the notification through this channel.
- Specified by:
metadatain interfaceInboundBulkContentMessage._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
metadata
public InboundBulkContentMessage._FinalStage metadata(java.util.Optional<MessageMetadata> metadata)
- Specified by:
metadatain interfaceInboundBulkContentMessage._FinalStage
-
context
public InboundBulkContentMessage._FinalStage context(MessageContext context)
Context to load with this recipient. Will override any context set on message.context.
- Specified by:
contextin interfaceInboundBulkContentMessage._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
context
public InboundBulkContentMessage._FinalStage context(java.util.Optional<MessageContext> context)
- Specified by:
contextin interfaceInboundBulkContentMessage._FinalStage
-
channels
public InboundBulkContentMessage._FinalStage channels(java.util.Map<java.lang.String,Channel> channels)
"Define run-time configuration for one or more channels. If you don't specify channels, the default configuration for each channel will be used. Valid ChannelId's are: email, sms, push, inbox, direct_message, banner, and webhook."
- Specified by:
channelsin interfaceInboundBulkContentMessage._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
channels
public InboundBulkContentMessage._FinalStage channels(java.util.Optional<java.util.Map<java.lang.String,Channel>> channels)
- Specified by:
channelsin interfaceInboundBulkContentMessage._FinalStage
-
brandId
public InboundBulkContentMessage._FinalStage brandId(java.lang.String brandId)
- Specified by:
brandIdin interfaceInboundBulkContentMessage._FinalStage
-
brandId
public InboundBulkContentMessage._FinalStage brandId(java.util.Optional<java.lang.String> brandId)
- Specified by:
brandIdin interfaceInboundBulkContentMessage._FinalStage
-
data
public InboundBulkContentMessage._FinalStage data(java.util.Map<java.lang.String,java.lang.Object> data)
An arbitrary object that includes any data you want to pass to the message. The data will populate the corresponding template or elements variables.
- Specified by:
datain interfaceInboundBulkContentMessage._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
data
public InboundBulkContentMessage._FinalStage data(java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>> data)
- Specified by:
datain interfaceInboundBulkContentMessage._FinalStage
-
build
public InboundBulkContentMessage build()
- Specified by:
buildin interfaceInboundBulkContentMessage._FinalStage
-
-