Class: AWSCDK::Pinpoint::CfnSegmentProps

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

Overview

Properties for defining a CfnSegment.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(application_id:, name:, dimensions: nil, segment_groups: nil, tags: nil) ⇒ CfnSegmentProps

Returns a new instance of CfnSegmentProps.

Parameters:



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 = tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "tags") unless @tags.nil?
end

Instance Attribute Details

#application_idString (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

#dimensionsAWSCDK::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

#nameString (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_groupsAWSCDK::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

#tagsObject? (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
  @tags
end

Class Method Details

.jsii_propertiesObject



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_jsiiObject



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