Class: AWSCDK::Pinpoint::CfnSegmentProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Pinpoint::CfnSegmentProps
- Defined in:
- pinpoint/cfn_segment_props.rb
Overview
Properties for defining a CfnSegment.
Instance Attribute Summary collapse
-
#application_id ⇒ String
readonly
The unique identifier for the Amazon Pinpoint application that the segment is associated with.
-
#dimensions ⇒ AWSCDK::IResolvable, ...
readonly
An array that defines the dimensions for the segment.
-
#name ⇒ String
readonly
The name of the segment.
-
#segment_groups ⇒ AWSCDK::IResolvable, ...
readonly
The segment group to use and the dimensions to apply to the group's base segments in order to build the segment.
-
#tags ⇒ Object?
readonly
An array of key-value pairs to apply to this resource.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(application_id:, name:, dimensions: nil, segment_groups: nil, tags: nil) ⇒ CfnSegmentProps
constructor
A new instance of CfnSegmentProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(application_id:, name:, dimensions: nil, segment_groups: nil, tags: nil) ⇒ CfnSegmentProps
Returns a new instance of CfnSegmentProps.
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'pinpoint/cfn_segment_props.rb', line 14 def initialize(application_id:, name:, dimensions: nil, segment_groups: nil, tags: nil) @application_id = application_id Jsii::Type.check_type(@application_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "applicationId") @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") @dimensions = dimensions.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnSegment::SegmentDimensionsProperty.new(**dimensions.transform_keys(&:to_sym)) : dimensions Jsii::Type.check_type(@dimensions, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5TZWdtZW50LlNlZ21lbnREaW1lbnNpb25zUHJvcGVydHkifV19fQ==")), "dimensions") unless @dimensions.nil? @segment_groups = segment_groups.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnSegment::SegmentGroupsProperty.new(**segment_groups.transform_keys(&:to_sym)) : segment_groups Jsii::Type.check_type(@segment_groups, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5TZWdtZW50LlNlZ21lbnRHcm91cHNQcm9wZXJ0eSJ9XX19")), "segmentGroups") unless @segment_groups.nil? @tags = Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "tags") unless @tags.nil? end |
Instance Attribute Details
#application_id ⇒ String (readonly)
The unique identifier for the Amazon Pinpoint application that the segment is associated with.
31 32 33 |
# File 'pinpoint/cfn_segment_props.rb', line 31 def application_id @application_id end |
#dimensions ⇒ AWSCDK::IResolvable, ... (readonly)
An array that defines the dimensions for the segment.
43 44 45 |
# File 'pinpoint/cfn_segment_props.rb', line 43 def dimensions @dimensions end |
#name ⇒ String (readonly)
The name of the segment.
A segment must have a name otherwise it will not appear in the Amazon Pinpoint console.
38 39 40 |
# File 'pinpoint/cfn_segment_props.rb', line 38 def name @name end |
#segment_groups ⇒ AWSCDK::IResolvable, ... (readonly)
The segment group to use and the dimensions to apply to the group's base segments in order to build the segment.
A segment group can consist of zero or more base segments. Your request can include only one segment group.
50 51 52 |
# File 'pinpoint/cfn_segment_props.rb', line 50 def segment_groups @segment_groups end |
#tags ⇒ Object? (readonly)
An array of key-value pairs to apply to this resource.
For more information, see Tag .
57 58 59 |
# File 'pinpoint/cfn_segment_props.rb', line 57 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
59 60 61 62 63 64 65 66 67 |
# File 'pinpoint/cfn_segment_props.rb', line 59 def self.jsii_properties { :application_id => "applicationId", :name => "name", :dimensions => "dimensions", :segment_groups => "segmentGroups", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
69 70 71 72 73 74 75 76 77 78 79 |
# File 'pinpoint/cfn_segment_props.rb', line 69 def to_jsii result = {} result.merge!({ "applicationId" => @application_id, "name" => @name, "dimensions" => @dimensions, "segmentGroups" => @segment_groups, "tags" => @tags, }) result.compact end |