Class: AWSCDK::TimeConversionOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
time_conversion_options.rb

Overview

Options for how to convert time to a different unit.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(integral: nil) ⇒ TimeConversionOptions

Returns a new instance of TimeConversionOptions.

Parameters:

  • integral (Boolean, nil) (defaults to: nil)

    If true, conversions into a larger time unit (e.g. Seconds to Minutes) will fail if the result is not an integer.



8
9
10
11
# File 'time_conversion_options.rb', line 8

def initialize(integral: nil)
  @integral = integral
  Jsii::Type.check_type(@integral, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "integral") unless @integral.nil?
end

Instance Attribute Details

#integralBoolean? (readonly)

Note:

Default: true

If true, conversions into a larger time unit (e.g. Seconds to Minutes) will fail if the result is not an integer.

Returns:

  • (Boolean, nil)


17
18
19
# File 'time_conversion_options.rb', line 17

def integral
  @integral
end

Class Method Details

.jsii_propertiesObject



19
20
21
22
23
# File 'time_conversion_options.rb', line 19

def self.jsii_properties
  {
    :integral => "integral",
  }
end

Instance Method Details

#to_jsiiObject



25
26
27
28
29
30
31
# File 'time_conversion_options.rb', line 25

def to_jsii
  result = {}
  result.merge!({
    "integral" => @integral,
  })
  result.compact
end