Class CfnCampaignProps.Builder
java.lang.Object
software.amazon.awscdk.services.pinpoint.CfnCampaignProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnCampaignProps>
- Enclosing interface:
CfnCampaignProps
@Stability(Stable)
public static final class CfnCampaignProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnCampaignProps>
A builder for
CfnCampaignProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadditionalTreatments
(List<? extends Object> additionalTreatments) Sets the value ofCfnCampaignProps.getAdditionalTreatments()
additionalTreatments
(IResolvable additionalTreatments) Sets the value ofCfnCampaignProps.getAdditionalTreatments()
applicationId
(String applicationId) Sets the value ofCfnCampaignProps.getApplicationId()
build()
Builds the configured instance.campaignHook
(IResolvable campaignHook) Sets the value ofCfnCampaignProps.getCampaignHook()
campaignHook
(CfnCampaign.CampaignHookProperty campaignHook) Sets the value ofCfnCampaignProps.getCampaignHook()
customDeliveryConfiguration
(IResolvable customDeliveryConfiguration) Sets the value ofCfnCampaignProps.getCustomDeliveryConfiguration()
customDeliveryConfiguration
(CfnCampaign.CustomDeliveryConfigurationProperty customDeliveryConfiguration) Sets the value ofCfnCampaignProps.getCustomDeliveryConfiguration()
description
(String description) Sets the value ofCfnCampaignProps.getDescription()
holdoutPercent
(Number holdoutPercent) Sets the value ofCfnCampaignProps.getHoldoutPercent()
Sets the value ofCfnCampaignProps.getIsPaused()
isPaused
(IResolvable isPaused) Sets the value ofCfnCampaignProps.getIsPaused()
limits
(IResolvable limits) Sets the value ofCfnCampaignProps.getLimits()
limits
(CfnCampaign.LimitsProperty limits) Sets the value ofCfnCampaignProps.getLimits()
messageConfiguration
(IResolvable messageConfiguration) Sets the value ofCfnCampaignProps.getMessageConfiguration()
messageConfiguration
(CfnCampaign.MessageConfigurationProperty messageConfiguration) Sets the value ofCfnCampaignProps.getMessageConfiguration()
Sets the value ofCfnCampaignProps.getName()
Sets the value ofCfnCampaignProps.getPriority()
schedule
(IResolvable schedule) Sets the value ofCfnCampaignProps.getSchedule()
schedule
(CfnCampaign.ScheduleProperty schedule) Sets the value ofCfnCampaignProps.getSchedule()
Sets the value ofCfnCampaignProps.getSegmentId()
segmentVersion
(Number segmentVersion) Sets the value ofCfnCampaignProps.getSegmentVersion()
Sets the value ofCfnCampaignProps.getTags()
templateConfiguration
(IResolvable templateConfiguration) Sets the value ofCfnCampaignProps.getTemplateConfiguration()
templateConfiguration
(CfnCampaign.TemplateConfigurationProperty templateConfiguration) Sets the value ofCfnCampaignProps.getTemplateConfiguration()
treatmentDescription
(String treatmentDescription) Sets the value ofCfnCampaignProps.getTreatmentDescription()
treatmentName
(String treatmentName) Sets the value ofCfnCampaignProps.getTreatmentName()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
applicationId
Sets the value ofCfnCampaignProps.getApplicationId()
- Parameters:
applicationId
- The unique identifier for the Amazon Pinpoint application that the campaign is associated with. This parameter is required.- Returns:
this
-
name
Sets the value ofCfnCampaignProps.getName()
- Parameters:
name
- The name of the campaign. This parameter is required.- Returns:
this
-
schedule
Sets the value ofCfnCampaignProps.getSchedule()
- Parameters:
schedule
- The schedule settings for the treatment. This parameter is required.- Returns:
this
-
schedule
Sets the value ofCfnCampaignProps.getSchedule()
- Parameters:
schedule
- The schedule settings for the treatment. This parameter is required.- Returns:
this
-
segmentId
Sets the value ofCfnCampaignProps.getSegmentId()
- Parameters:
segmentId
- The unique identifier for the segment to associate with the campaign. This parameter is required.- Returns:
this
-
additionalTreatments
@Stability(Stable) public CfnCampaignProps.Builder additionalTreatments(IResolvable additionalTreatments) Sets the value ofCfnCampaignProps.getAdditionalTreatments()
- Parameters:
additionalTreatments
- An array of requests that defines additional treatments for the campaign, in addition to the default treatment for the campaign.- Returns:
this
-
additionalTreatments
@Stability(Stable) public CfnCampaignProps.Builder additionalTreatments(List<? extends Object> additionalTreatments) Sets the value ofCfnCampaignProps.getAdditionalTreatments()
- Parameters:
additionalTreatments
- An array of requests that defines additional treatments for the campaign, in addition to the default treatment for the campaign.- Returns:
this
-
campaignHook
Sets the value ofCfnCampaignProps.getCampaignHook()
- Parameters:
campaignHook
- Specifies the Lambda function to use as a code hook for a campaign.- Returns:
this
-
campaignHook
@Stability(Stable) public CfnCampaignProps.Builder campaignHook(CfnCampaign.CampaignHookProperty campaignHook) Sets the value ofCfnCampaignProps.getCampaignHook()
- Parameters:
campaignHook
- Specifies the Lambda function to use as a code hook for a campaign.- Returns:
this
-
customDeliveryConfiguration
@Stability(Stable) public CfnCampaignProps.Builder customDeliveryConfiguration(IResolvable customDeliveryConfiguration) Sets the value ofCfnCampaignProps.getCustomDeliveryConfiguration()
- Parameters:
customDeliveryConfiguration
- The delivery configuration settings for sending the treatment through a custom channel. This object is required if theMessageConfiguration
object for the treatment specifies aCustomMessage
object.- Returns:
this
-
customDeliveryConfiguration
@Stability(Stable) public CfnCampaignProps.Builder customDeliveryConfiguration(CfnCampaign.CustomDeliveryConfigurationProperty customDeliveryConfiguration) Sets the value ofCfnCampaignProps.getCustomDeliveryConfiguration()
- Parameters:
customDeliveryConfiguration
- The delivery configuration settings for sending the treatment through a custom channel. This object is required if theMessageConfiguration
object for the treatment specifies aCustomMessage
object.- Returns:
this
-
description
Sets the value ofCfnCampaignProps.getDescription()
- Parameters:
description
- A custom description of the campaign.- Returns:
this
-
holdoutPercent
Sets the value ofCfnCampaignProps.getHoldoutPercent()
- Parameters:
holdoutPercent
- The allocated percentage of users (segment members) who shouldn't receive messages from the campaign.- Returns:
this
-
isPaused
Sets the value ofCfnCampaignProps.getIsPaused()
- Parameters:
isPaused
- Specifies whether to pause the campaign. A paused campaign doesn't run unless you resume it by changing this value tofalse
. If you restart a campaign, the campaign restarts from the beginning and not at the point you paused it. If a campaign is running it will complete and then pause. Pause only pauses or skips the next run for a recurring future scheduled campaign. A campaign scheduled for immediate can't be paused.- Returns:
this
-
isPaused
Sets the value ofCfnCampaignProps.getIsPaused()
- Parameters:
isPaused
- Specifies whether to pause the campaign. A paused campaign doesn't run unless you resume it by changing this value tofalse
. If you restart a campaign, the campaign restarts from the beginning and not at the point you paused it. If a campaign is running it will complete and then pause. Pause only pauses or skips the next run for a recurring future scheduled campaign. A campaign scheduled for immediate can't be paused.- Returns:
this
-
limits
Sets the value ofCfnCampaignProps.getLimits()
- Parameters:
limits
- The messaging limits for the campaign.- Returns:
this
-
limits
Sets the value ofCfnCampaignProps.getLimits()
- Parameters:
limits
- The messaging limits for the campaign.- Returns:
this
-
messageConfiguration
@Stability(Stable) public CfnCampaignProps.Builder messageConfiguration(IResolvable messageConfiguration) Sets the value ofCfnCampaignProps.getMessageConfiguration()
- Parameters:
messageConfiguration
- The message configuration settings for the treatment.- Returns:
this
-
messageConfiguration
@Stability(Stable) public CfnCampaignProps.Builder messageConfiguration(CfnCampaign.MessageConfigurationProperty messageConfiguration) Sets the value ofCfnCampaignProps.getMessageConfiguration()
- Parameters:
messageConfiguration
- The message configuration settings for the treatment.- Returns:
this
-
priority
Sets the value ofCfnCampaignProps.getPriority()
- Parameters:
priority
- An integer between 1 and 5, inclusive, that represents the priority of the in-app message campaign, where 1 is the highest priority and 5 is the lowest. If there are multiple messages scheduled to be displayed at the same time, the priority determines the order in which those messages are displayed.- Returns:
this
-
segmentVersion
Sets the value ofCfnCampaignProps.getSegmentVersion()
- Parameters:
segmentVersion
- The version of the segment to associate with the campaign.- Returns:
this
-
tags
Sets the value ofCfnCampaignProps.getTags()
- Parameters:
tags
- An array of key-value pairs to apply to this resource. For more information, see Tag .- Returns:
this
-
templateConfiguration
@Stability(Stable) public CfnCampaignProps.Builder templateConfiguration(IResolvable templateConfiguration) Sets the value ofCfnCampaignProps.getTemplateConfiguration()
- Parameters:
templateConfiguration
- The message template to use for the treatment.- Returns:
this
-
templateConfiguration
@Stability(Stable) public CfnCampaignProps.Builder templateConfiguration(CfnCampaign.TemplateConfigurationProperty templateConfiguration) Sets the value ofCfnCampaignProps.getTemplateConfiguration()
- Parameters:
templateConfiguration
- The message template to use for the treatment.- Returns:
this
-
treatmentDescription
@Stability(Stable) public CfnCampaignProps.Builder treatmentDescription(String treatmentDescription) Sets the value ofCfnCampaignProps.getTreatmentDescription()
- Parameters:
treatmentDescription
- A custom description of the treatment.- Returns:
this
-
treatmentName
Sets the value ofCfnCampaignProps.getTreatmentName()
- Parameters:
treatmentName
- A custom name for the treatment.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnCampaignProps>
- Returns:
- a new instance of
CfnCampaignProps
- Throws:
NullPointerException
- if any required attribute was not provided
-