Class: AWSCDK::Pinpoint::CfnSegment::DemographicProperty

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

Overview

Specifies demographic-based criteria, such as device platform, for the segment.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app_version: nil, channel: nil, device_type: nil, make: nil, model: nil, platform: nil) ⇒ DemographicProperty

Returns a new instance of DemographicProperty.

Parameters:



696
697
698
699
700
701
702
703
704
705
706
707
708
709
# File 'pinpoint/cfn_segment.rb', line 696

def initialize(app_version: nil, channel: nil, device_type: nil, make: nil, model: nil, platform: nil)
  @app_version = app_version.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnSegment::SetDimensionProperty.new(**app_version.transform_keys(&:to_sym)) : app_version
  Jsii::Type.check_type(@app_version, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5TZWdtZW50LlNldERpbWVuc2lvblByb3BlcnR5In1dfX0=")), "appVersion") unless @app_version.nil?
  @channel = channel.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnSegment::SetDimensionProperty.new(**channel.transform_keys(&:to_sym)) : channel
  Jsii::Type.check_type(@channel, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5TZWdtZW50LlNldERpbWVuc2lvblByb3BlcnR5In1dfX0=")), "channel") unless @channel.nil?
  @device_type = device_type.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnSegment::SetDimensionProperty.new(**device_type.transform_keys(&:to_sym)) : device_type
  Jsii::Type.check_type(@device_type, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5TZWdtZW50LlNldERpbWVuc2lvblByb3BlcnR5In1dfX0=")), "deviceType") unless @device_type.nil?
  @make = make.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnSegment::SetDimensionProperty.new(**make.transform_keys(&:to_sym)) : make
  Jsii::Type.check_type(@make, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5TZWdtZW50LlNldERpbWVuc2lvblByb3BlcnR5In1dfX0=")), "make") unless @make.nil?
  @model = model.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnSegment::SetDimensionProperty.new(**model.transform_keys(&:to_sym)) : model
  Jsii::Type.check_type(@model, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5TZWdtZW50LlNldERpbWVuc2lvblByb3BlcnR5In1dfX0=")), "model") unless @model.nil?
  @platform = platform.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnSegment::SetDimensionProperty.new(**platform.transform_keys(&:to_sym)) : platform
  Jsii::Type.check_type(@platform, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5TZWdtZW50LlNldERpbWVuc2lvblByb3BlcnR5In1dfX0=")), "platform") unless @platform.nil?
end

Instance Attribute Details

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

The app version criteria for the segment.



715
716
717
# File 'pinpoint/cfn_segment.rb', line 715

def app_version
  @app_version
end

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

The channel criteria for the segment.



720
721
722
# File 'pinpoint/cfn_segment.rb', line 720

def channel
  @channel
end

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

The device type criteria for the segment.



725
726
727
# File 'pinpoint/cfn_segment.rb', line 725

def device_type
  @device_type
end

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

The device make criteria for the segment.



730
731
732
# File 'pinpoint/cfn_segment.rb', line 730

def make
  @make
end

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

The device model criteria for the segment.



735
736
737
# File 'pinpoint/cfn_segment.rb', line 735

def model
  @model
end

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

The device platform criteria for the segment.



740
741
742
# File 'pinpoint/cfn_segment.rb', line 740

def platform
  @platform
end

Class Method Details

.jsii_propertiesObject



742
743
744
745
746
747
748
749
750
751
# File 'pinpoint/cfn_segment.rb', line 742

def self.jsii_properties
  {
    :app_version => "appVersion",
    :channel => "channel",
    :device_type => "deviceType",
    :make => "make",
    :model => "model",
    :platform => "platform",
  }
end

Instance Method Details

#to_jsiiObject



753
754
755
756
757
758
759
760
761
762
763
764
# File 'pinpoint/cfn_segment.rb', line 753

def to_jsii
  result = {}
  result.merge!({
    "appVersion" => @app_version,
    "channel" => @channel,
    "deviceType" => @device_type,
    "make" => @make,
    "model" => @model,
    "platform" => @platform,
  })
  result.compact
end