Class: AWSCDK::AppMesh::CfnRoute::DurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
app_mesh/cfn_route.rb

Overview

An object that represents a duration of time.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(unit:, value:) ⇒ DurationProperty

Returns a new instance of DurationProperty.

Parameters:

  • unit (String)

    A unit of time.

  • value (Numeric)

    A number of time units.



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

#unitString (readonly)

A unit of time.



657
658
659
# File 'app_mesh/cfn_route.rb', line 657

def unit
  @unit
end

#valueNumeric (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_propertiesObject



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_jsiiObject



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