Class: AWSCDK::AppMesh::CfnRoute::DurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::AppMesh::CfnRoute::DurationProperty
- Defined in:
- app_mesh/cfn_route.rb
Overview
An object that represents a duration of time.
Instance Attribute Summary collapse
-
#unit ⇒ String
readonly
A unit of time.
-
#value ⇒ Numeric
readonly
A number of time units.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(unit:, value:) ⇒ DurationProperty
constructor
A new instance of DurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(unit:, value:) ⇒ DurationProperty
Returns a new instance of DurationProperty.
646 647 648 649 650 651 |
# File 'app_mesh/cfn_route.rb', line 646 def initialize(unit:, value:) @unit = unit Jsii::Type.check_type(@unit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "unit") @value = value Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "value") end |
Instance Attribute Details
#unit ⇒ String (readonly)
A unit of time.
657 658 659 |
# File 'app_mesh/cfn_route.rb', line 657 def unit @unit end |
#value ⇒ Numeric (readonly)
A number of time units.
662 663 664 |
# File 'app_mesh/cfn_route.rb', line 662 def value @value end |
Class Method Details
.jsii_properties ⇒ Object
664 665 666 667 668 669 |
# File 'app_mesh/cfn_route.rb', line 664 def self.jsii_properties { :unit => "unit", :value => "value", } end |
Instance Method Details
#to_jsii ⇒ Object
671 672 673 674 675 676 677 678 |
# File 'app_mesh/cfn_route.rb', line 671 def to_jsii result = {} result.merge!({ "unit" => @unit, "value" => @value, }) result.compact end |