Class: AWSCDK::QuickSight::CfnTemplate::PeriodToDateComputationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
quick_sight/cfn_template.rb

Overview

The period to date computation configuration.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(computation_id:, name: nil, period_time_granularity: nil, time: nil, value: nil) ⇒ PeriodToDateComputationProperty

Returns a new instance of PeriodToDateComputationProperty.

Parameters:



19200
19201
19202
19203
19204
19205
19206
19207
19208
19209
19210
19211
# File 'quick_sight/cfn_template.rb', line 19200

def initialize(computation_id:, name: nil, period_time_granularity: nil, time: nil, value: nil)
  @computation_id = computation_id
  Jsii::Type.check_type(@computation_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "computationId")
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
  @period_time_granularity = period_time_granularity
  Jsii::Type.check_type(@period_time_granularity, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "periodTimeGranularity") unless @period_time_granularity.nil?
  @time = time.is_a?(Hash) ? ::AWSCDK::QuickSight::CfnTemplate::DimensionFieldProperty.new(**time.transform_keys(&:to_sym)) : time
  Jsii::Type.check_type(@time, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19xdWlja3NpZ2h0LkNmblRlbXBsYXRlLkRpbWVuc2lvbkZpZWxkUHJvcGVydHkifV19fQ==")), "time") unless @time.nil?
  @value = value.is_a?(Hash) ? ::AWSCDK::QuickSight::CfnTemplate::MeasureFieldProperty.new(**value.transform_keys(&:to_sym)) : value
  Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19xdWlja3NpZ2h0LkNmblRlbXBsYXRlLk1lYXN1cmVGaWVsZFByb3BlcnR5In1dfX0=")), "value") unless @value.nil?
end

Instance Attribute Details

#computation_idString (readonly)

The ID for a computation.



19217
19218
19219
# File 'quick_sight/cfn_template.rb', line 19217

def computation_id
  @computation_id
end

#nameString? (readonly)

The name of a computation.



19222
19223
19224
# File 'quick_sight/cfn_template.rb', line 19222

def name
  @name
end

#period_time_granularityString? (readonly)

The time granularity setup of period to date computation. Choose from the following options:.

  • YEAR: Year to date.
  • MONTH: Month to date.


19230
19231
19232
# File 'quick_sight/cfn_template.rb', line 19230

def period_time_granularity
  @period_time_granularity
end

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

The time field that is used in a computation.



19235
19236
19237
# File 'quick_sight/cfn_template.rb', line 19235

def time
  @time
end

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

The value field that is used in a computation.



19240
19241
19242
# File 'quick_sight/cfn_template.rb', line 19240

def value
  @value
end

Class Method Details

.jsii_propertiesObject



19242
19243
19244
19245
19246
19247
19248
19249
19250
# File 'quick_sight/cfn_template.rb', line 19242

def self.jsii_properties
  {
    :computation_id => "computationId",
    :name => "name",
    :period_time_granularity => "periodTimeGranularity",
    :time => "time",
    :value => "value",
  }
end

Instance Method Details

#to_jsiiObject



19252
19253
19254
19255
19256
19257
19258
19259
19260
19261
19262
# File 'quick_sight/cfn_template.rb', line 19252

def to_jsii
  result = {}
  result.merge!({
    "computationId" => @computation_id,
    "name" => @name,
    "periodTimeGranularity" => @period_time_granularity,
    "time" => @time,
    "value" => @value,
  })
  result.compact
end