Class: AWSCDK::Pinpoint::CfnCampaign::WriteTreatmentResourceProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Pinpoint::CfnCampaign::WriteTreatmentResourceProperty
- Defined in:
- pinpoint/cfn_campaign.rb
Overview
Specifies the settings for a campaign treatment.
A treatment is a variation of a campaign that's used for A/B testing of a campaign.
Instance Attribute Summary collapse
-
#custom_delivery_configuration ⇒ AWSCDK::IResolvable, ...
readonly
The delivery configuration settings for sending the treatment through a custom channel.
-
#message_configuration ⇒ AWSCDK::IResolvable, ...
readonly
The message configuration settings for the treatment.
-
#schedule ⇒ AWSCDK::IResolvable, ...
readonly
The schedule settings for the treatment.
-
#size_percent ⇒ Numeric?
readonly
The allocated percentage of users (segment members) to send the treatment to.
-
#template_configuration ⇒ AWSCDK::IResolvable, ...
readonly
The message template to use for the treatment.
-
#treatment_description ⇒ String?
readonly
A custom description of the treatment.
-
#treatment_name ⇒ String?
readonly
A custom name for the treatment.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(custom_delivery_configuration: nil, message_configuration: nil, schedule: nil, size_percent: nil, template_configuration: nil, treatment_description: nil, treatment_name: nil) ⇒ WriteTreatmentResourceProperty
constructor
A new instance of WriteTreatmentResourceProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(custom_delivery_configuration: nil, message_configuration: nil, schedule: nil, size_percent: nil, template_configuration: nil, treatment_description: nil, treatment_name: nil) ⇒ WriteTreatmentResourceProperty
Returns a new instance of WriteTreatmentResourceProperty.
2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 |
# File 'pinpoint/cfn_campaign.rb', line 2372 def initialize(custom_delivery_configuration: nil, message_configuration: nil, schedule: nil, size_percent: nil, template_configuration: nil, treatment_description: nil, treatment_name: nil) @custom_delivery_configuration = custom_delivery_configuration.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnCampaign::CustomDeliveryConfigurationProperty.new(**custom_delivery_configuration.transform_keys(&:to_sym)) : custom_delivery_configuration Jsii::Type.check_type(@custom_delivery_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5DYW1wYWlnbi5DdXN0b21EZWxpdmVyeUNvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "customDeliveryConfiguration") unless @custom_delivery_configuration.nil? @message_configuration = .is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnCampaign::MessageConfigurationProperty.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(@message_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5DYW1wYWlnbi5NZXNzYWdlQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "messageConfiguration") unless @message_configuration.nil? @schedule = schedule.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnCampaign::ScheduleProperty.new(**schedule.transform_keys(&:to_sym)) : schedule Jsii::Type.check_type(@schedule, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5DYW1wYWlnbi5TY2hlZHVsZVByb3BlcnR5In1dfX0=")), "schedule") unless @schedule.nil? @size_percent = size_percent Jsii::Type.check_type(@size_percent, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "sizePercent") unless @size_percent.nil? @template_configuration = template_configuration.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnCampaign::TemplateConfigurationProperty.new(**template_configuration.transform_keys(&:to_sym)) : template_configuration Jsii::Type.check_type(@template_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5DYW1wYWlnbi5UZW1wbGF0ZUNvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "templateConfiguration") unless @template_configuration.nil? @treatment_description = treatment_description Jsii::Type.check_type(@treatment_description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "treatmentDescription") unless @treatment_description.nil? @treatment_name = treatment_name Jsii::Type.check_type(@treatment_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "treatmentName") unless @treatment_name.nil? end |
Instance Attribute Details
#custom_delivery_configuration ⇒ AWSCDK::IResolvable, ... (readonly)
The delivery configuration settings for sending the treatment through a custom channel.
This object is required if the MessageConfiguration object for the treatment specifies a CustomMessage object.
2395 2396 2397 |
# File 'pinpoint/cfn_campaign.rb', line 2395 def custom_delivery_configuration @custom_delivery_configuration end |
#message_configuration ⇒ AWSCDK::IResolvable, ... (readonly)
The message configuration settings for the treatment.
2400 2401 2402 |
# File 'pinpoint/cfn_campaign.rb', line 2400 def @message_configuration end |
#schedule ⇒ AWSCDK::IResolvable, ... (readonly)
The schedule settings for the treatment.
2405 2406 2407 |
# File 'pinpoint/cfn_campaign.rb', line 2405 def schedule @schedule end |
#size_percent ⇒ Numeric? (readonly)
The allocated percentage of users (segment members) to send the treatment to.
2410 2411 2412 |
# File 'pinpoint/cfn_campaign.rb', line 2410 def size_percent @size_percent end |
#template_configuration ⇒ AWSCDK::IResolvable, ... (readonly)
The message template to use for the treatment.
2415 2416 2417 |
# File 'pinpoint/cfn_campaign.rb', line 2415 def template_configuration @template_configuration end |
#treatment_description ⇒ String? (readonly)
A custom description of the treatment.
2420 2421 2422 |
# File 'pinpoint/cfn_campaign.rb', line 2420 def treatment_description @treatment_description end |
#treatment_name ⇒ String? (readonly)
A custom name for the treatment.
2425 2426 2427 |
# File 'pinpoint/cfn_campaign.rb', line 2425 def treatment_name @treatment_name end |
Class Method Details
.jsii_properties ⇒ Object
2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 |
# File 'pinpoint/cfn_campaign.rb', line 2427 def self.jsii_properties { :custom_delivery_configuration => "customDeliveryConfiguration", :message_configuration => "messageConfiguration", :schedule => "schedule", :size_percent => "sizePercent", :template_configuration => "templateConfiguration", :treatment_description => "treatmentDescription", :treatment_name => "treatmentName", } end |
Instance Method Details
#to_jsii ⇒ Object
2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 |
# File 'pinpoint/cfn_campaign.rb', line 2439 def to_jsii result = {} result.merge!({ "customDeliveryConfiguration" => @custom_delivery_configuration, "messageConfiguration" => @message_configuration, "schedule" => @schedule, "sizePercent" => @size_percent, "templateConfiguration" => @template_configuration, "treatmentDescription" => @treatment_description, "treatmentName" => @treatment_name, }) result.compact end |