Class: AWSCDK::Pinpoint::CfnSegment::SegmentDimensionsProperty

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

Overview

Specifies the dimension settings for a segment.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes: nil, behavior: nil, demographic: nil, location: nil, metrics: nil, user_attributes: nil) ⇒ SegmentDimensionsProperty

Returns a new instance of SegmentDimensionsProperty.

Parameters:



983
984
985
986
987
988
989
990
991
992
993
994
995
996
# File 'pinpoint/cfn_segment.rb', line 983

def initialize(attributes: nil, behavior: nil, demographic: nil, location: nil, metrics: nil, user_attributes: nil)
  @attributes = attributes
  Jsii::Type.check_type(@attributes, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "attributes") unless @attributes.nil?
  @behavior = behavior.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnSegment::BehaviorProperty.new(**behavior.transform_keys(&:to_sym)) : behavior
  Jsii::Type.check_type(@behavior, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5TZWdtZW50LkJlaGF2aW9yUHJvcGVydHkifV19fQ==")), "behavior") unless @behavior.nil?
  @demographic = demographic.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnSegment::DemographicProperty.new(**demographic.transform_keys(&:to_sym)) : demographic
  Jsii::Type.check_type(@demographic, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5TZWdtZW50LkRlbW9ncmFwaGljUHJvcGVydHkifV19fQ==")), "demographic") unless @demographic.nil?
  @location = location.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnSegment::LocationProperty.new(**location.transform_keys(&:to_sym)) : location
  Jsii::Type.check_type(@location, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5TZWdtZW50LkxvY2F0aW9uUHJvcGVydHkifV19fQ==")), "location") unless @location.nil?
  @metrics = metrics
  Jsii::Type.check_type(@metrics, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "metrics") unless @metrics.nil?
  @user_attributes = user_attributes
  Jsii::Type.check_type(@user_attributes, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "userAttributes") unless @user_attributes.nil?
end

Instance Attribute Details

#attributesObject? (readonly)

One or more custom attributes to use as criteria for the segment.

For more information see AttributeDimension



1004
1005
1006
# File 'pinpoint/cfn_segment.rb', line 1004

def attributes
  @attributes
end

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

The behavior-based criteria, such as how recently users have used your app, for the segment.



1009
1010
1011
# File 'pinpoint/cfn_segment.rb', line 1009

def behavior
  @behavior
end

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

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



1014
1015
1016
# File 'pinpoint/cfn_segment.rb', line 1014

def demographic
  @demographic
end

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

The location-based criteria, such as region or GPS coordinates, for the segment.



1019
1020
1021
# File 'pinpoint/cfn_segment.rb', line 1019

def location
  @location
end

#metricsObject? (readonly)

One or more custom metrics to use as criteria for the segment.



1024
1025
1026
# File 'pinpoint/cfn_segment.rb', line 1024

def metrics
  @metrics
end

#user_attributesObject? (readonly)

One or more custom user attributes to use as criteria for the segment.



1029
1030
1031
# File 'pinpoint/cfn_segment.rb', line 1029

def user_attributes
  @user_attributes
end

Class Method Details

.jsii_propertiesObject



1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
# File 'pinpoint/cfn_segment.rb', line 1031

def self.jsii_properties
  {
    :attributes => "attributes",
    :behavior => "behavior",
    :demographic => "demographic",
    :location => "location",
    :metrics => "metrics",
    :user_attributes => "userAttributes",
  }
end

Instance Method Details

#to_jsiiObject



1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
# File 'pinpoint/cfn_segment.rb', line 1042

def to_jsii
  result = {}
  result.merge!({
    "attributes" => @attributes,
    "behavior" => @behavior,
    "demographic" => @demographic,
    "location" => @location,
    "metrics" => @metrics,
    "userAttributes" => @user_attributes,
  })
  result.compact
end