Class: AWSCDK::Pinpoint::CfnInAppTemplate::ButtonConfigProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
pinpoint/cfn_in_app_template.rb

Overview

Specifies the behavior of buttons that appear in an in-app message template.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(android: nil, default_config: nil, ios: nil, web: nil) ⇒ ButtonConfigProperty

Returns a new instance of ButtonConfigProperty.

Parameters:



669
670
671
672
673
674
675
676
677
678
# File 'pinpoint/cfn_in_app_template.rb', line 669

def initialize(android: nil, default_config: nil, ios: nil, web: nil)
  @android = android.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnInAppTemplate::OverrideButtonConfigurationProperty.new(**android.transform_keys(&:to_sym)) : android
  Jsii::Type.check_type(@android, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5JbkFwcFRlbXBsYXRlLk92ZXJyaWRlQnV0dG9uQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "android") unless @android.nil?
  @default_config = default_config.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnInAppTemplate::DefaultButtonConfigurationProperty.new(**default_config.transform_keys(&:to_sym)) : default_config
  Jsii::Type.check_type(@default_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5JbkFwcFRlbXBsYXRlLkRlZmF1bHRCdXR0b25Db25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "defaultConfig") unless @default_config.nil?
  @ios = ios.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnInAppTemplate::OverrideButtonConfigurationProperty.new(**ios.transform_keys(&:to_sym)) : ios
  Jsii::Type.check_type(@ios, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5JbkFwcFRlbXBsYXRlLk92ZXJyaWRlQnV0dG9uQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "ios") unless @ios.nil?
  @web = web.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnInAppTemplate::OverrideButtonConfigurationProperty.new(**web.transform_keys(&:to_sym)) : web
  Jsii::Type.check_type(@web, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5JbkFwcFRlbXBsYXRlLk92ZXJyaWRlQnV0dG9uQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "web") unless @web.nil?
end

Instance Attribute Details

#androidAWSCDK::IResolvable, ... (readonly)

Optional button configuration to use for in-app messages sent to Android devices.

This button configuration overrides the default button configuration.



686
687
688
# File 'pinpoint/cfn_in_app_template.rb', line 686

def android
  @android
end

#default_configAWSCDK::IResolvable, ... (readonly)

Specifies the default behavior of a button that appears in an in-app message.

You can optionally add button configurations that specifically apply to iOS, Android, or web browser users.



693
694
695
# File 'pinpoint/cfn_in_app_template.rb', line 693

def default_config
  @default_config
end

#iosAWSCDK::IResolvable, ... (readonly)

Optional button configuration to use for in-app messages sent to iOS devices.

This button configuration overrides the default button configuration.



700
701
702
# File 'pinpoint/cfn_in_app_template.rb', line 700

def ios
  @ios
end

#webAWSCDK::IResolvable, ... (readonly)

Optional button configuration to use for in-app messages sent to web applications.

This button configuration overrides the default button configuration.



707
708
709
# File 'pinpoint/cfn_in_app_template.rb', line 707

def web
  @web
end

Class Method Details

.jsii_propertiesObject



709
710
711
712
713
714
715
716
# File 'pinpoint/cfn_in_app_template.rb', line 709

def self.jsii_properties
  {
    :android => "android",
    :default_config => "defaultConfig",
    :ios => "ios",
    :web => "web",
  }
end

Instance Method Details

#to_jsiiObject



718
719
720
721
722
723
724
725
726
727
# File 'pinpoint/cfn_in_app_template.rb', line 718

def to_jsii
  result = {}
  result.merge!({
    "android" => @android,
    "defaultConfig" => @default_config,
    "ios" => @ios,
    "web" => @web,
  })
  result.compact
end