Class: AWSCDK::CustomerProfiles::CfnCalculatedAttributeDefinition::RangeProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CustomerProfiles::CfnCalculatedAttributeDefinition::RangeProperty
- Defined in:
- customer_profiles/cfn_calculated_attribute_definition.rb
Overview
The relative time period over which data is included in the aggregation.
Instance Attribute Summary collapse
-
#timestamp_format ⇒ String?
readonly
The format the timestamp field in your JSON object is specified.
-
#timestamp_source ⇒ String?
readonly
An expression specifying the field in your JSON object from which the date should be parsed.
-
#unit ⇒ String
readonly
The unit of time.
-
#value ⇒ Numeric?
readonly
The amount of time of the specified unit.
-
#value_range ⇒ AWSCDK::IResolvable, ...
readonly
A structure letting customers specify a relative time window over which over which data is included in the Calculated Attribute.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(unit:, timestamp_format: nil, timestamp_source: nil, value: nil, value_range: nil) ⇒ RangeProperty
constructor
A new instance of RangeProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(unit:, timestamp_format: nil, timestamp_source: nil, value: nil, value_range: nil) ⇒ RangeProperty
Returns a new instance of RangeProperty.
775 776 777 778 779 780 781 782 783 784 785 786 |
# File 'customer_profiles/cfn_calculated_attribute_definition.rb', line 775 def initialize(unit:, timestamp_format: nil, timestamp_source: nil, value: nil, value_range: nil) @unit = unit Jsii::Type.check_type(@unit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "unit") @timestamp_format = Jsii::Type.check_type(@timestamp_format, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "timestampFormat") unless @timestamp_format.nil? @timestamp_source = Jsii::Type.check_type(@timestamp_source, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "timestampSource") unless @timestamp_source.nil? @value = value Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "value") unless @value.nil? @value_range = value_range.is_a?(Hash) ? ::AWSCDK::CustomerProfiles::CfnCalculatedAttributeDefinition::ValueRangeProperty.new(**value_range.transform_keys(&:to_sym)) : value_range Jsii::Type.check_type(@value_range, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jdXN0b21lcnByb2ZpbGVzLkNmbkNhbGN1bGF0ZWRBdHRyaWJ1dGVEZWZpbml0aW9uLlZhbHVlUmFuZ2VQcm9wZXJ0eSJ9XX19")), "valueRange") unless @value_range.nil? end |
Instance Attribute Details
#timestamp_format ⇒ String? (readonly)
The format the timestamp field in your JSON object is specified.
This value should be one of EPOCHMILLI (for Unix epoch timestamps with second/millisecond level precision) or ISO_8601 (following ISO_8601 format with second/millisecond level precision, with an optional offset of Z or in the format HH:MM or HHMM.). E.g. if your object type is MyType and source JSON is {"timestamp": "2001-07-04T12:08:56.235-0700"}, then TimestampFormat should be "ISO_8601"
799 800 801 |
# File 'customer_profiles/cfn_calculated_attribute_definition.rb', line 799 def @timestamp_format end |
#timestamp_source ⇒ String? (readonly)
An expression specifying the field in your JSON object from which the date should be parsed.
The expression should follow the structure of "of timestamp field in JSON pointer format>". E.g. if your object type is MyType and source JSON is {"timestamp": "1737587945945"}, then TimestampSource should be "MyType.generatedAt.timestamp"
806 807 808 |
# File 'customer_profiles/cfn_calculated_attribute_definition.rb', line 806 def @timestamp_source end |
#unit ⇒ String (readonly)
The unit of time.
792 793 794 |
# File 'customer_profiles/cfn_calculated_attribute_definition.rb', line 792 def unit @unit end |
#value ⇒ Numeric? (readonly)
The amount of time of the specified unit.
811 812 813 |
# File 'customer_profiles/cfn_calculated_attribute_definition.rb', line 811 def value @value end |
#value_range ⇒ AWSCDK::IResolvable, ... (readonly)
A structure letting customers specify a relative time window over which over which data is included in the Calculated Attribute.
Use positive numbers to indicate that the endpoint is in the past, and negative numbers to indicate it is in the future. ValueRange overrides Value.
818 819 820 |
# File 'customer_profiles/cfn_calculated_attribute_definition.rb', line 818 def value_range @value_range end |
Class Method Details
.jsii_properties ⇒ Object
820 821 822 823 824 825 826 827 828 |
# File 'customer_profiles/cfn_calculated_attribute_definition.rb', line 820 def self.jsii_properties { :unit => "unit", :timestamp_format => "timestampFormat", :timestamp_source => "timestampSource", :value => "value", :value_range => "valueRange", } end |
Instance Method Details
#to_jsii ⇒ Object
830 831 832 833 834 835 836 837 838 839 840 |
# File 'customer_profiles/cfn_calculated_attribute_definition.rb', line 830 def to_jsii result = {} result.merge!({ "unit" => @unit, "timestampFormat" => @timestamp_format, "timestampSource" => @timestamp_source, "value" => @value, "valueRange" => @value_range, }) result.compact end |