Class: AWSCDK::IoTEvents::CfnDetectorModel::StateProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::IoTEvents::CfnDetectorModel::StateProperty
- Defined in:
- io_t_events/cfn_detector_model.rb
Overview
Information that defines a state of a detector.
Instance Attribute Summary collapse
-
#on_enter ⇒ AWSCDK::IResolvable, ...
readonly
When entering this state, perform these
actionsif theconditionis TRUE. -
#on_exit ⇒ AWSCDK::IResolvable, ...
readonly
When exiting this state, perform these
actionsif the specifiedconditionisTRUE. -
#on_input ⇒ AWSCDK::IResolvable, ...
readonly
When an input is received and the
conditionis TRUE, perform the specifiedactions. -
#state_name ⇒ String
readonly
The name of the state.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(state_name:, on_enter: nil, on_exit: nil, on_input: nil) ⇒ StateProperty
constructor
A new instance of StateProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(state_name:, on_enter: nil, on_exit: nil, on_input: nil) ⇒ StateProperty
Returns a new instance of StateProperty.
2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 |
# File 'io_t_events/cfn_detector_model.rb', line 2022 def initialize(state_name:, on_enter: nil, on_exit: nil, on_input: nil) @state_name = state_name Jsii::Type.check_type(@state_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stateName") @on_enter = on_enter.is_a?(Hash) ? ::AWSCDK::IoTEvents::CfnDetectorModel::OnEnterProperty.new(**on_enter.transform_keys(&:to_sym)) : on_enter Jsii::Type.check_type(@on_enter, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuRGV0ZWN0b3JNb2RlbC5PbkVudGVyUHJvcGVydHkifV19fQ==")), "onEnter") unless @on_enter.nil? @on_exit = on_exit.is_a?(Hash) ? ::AWSCDK::IoTEvents::CfnDetectorModel::OnExitProperty.new(**on_exit.transform_keys(&:to_sym)) : on_exit Jsii::Type.check_type(@on_exit, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuRGV0ZWN0b3JNb2RlbC5PbkV4aXRQcm9wZXJ0eSJ9XX19")), "onExit") unless @on_exit.nil? @on_input = on_input.is_a?(Hash) ? ::AWSCDK::IoTEvents::CfnDetectorModel::OnInputProperty.new(**on_input.transform_keys(&:to_sym)) : on_input Jsii::Type.check_type(@on_input, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuRGV0ZWN0b3JNb2RlbC5PbklucHV0UHJvcGVydHkifV19fQ==")), "onInput") unless @on_input.nil? end |
Instance Attribute Details
#on_enter ⇒ AWSCDK::IResolvable, ... (readonly)
When entering this state, perform these actions if the condition is TRUE.
2042 2043 2044 |
# File 'io_t_events/cfn_detector_model.rb', line 2042 def on_enter @on_enter end |
#on_exit ⇒ AWSCDK::IResolvable, ... (readonly)
When exiting this state, perform these actions if the specified condition is TRUE .
2047 2048 2049 |
# File 'io_t_events/cfn_detector_model.rb', line 2047 def on_exit @on_exit end |
#on_input ⇒ AWSCDK::IResolvable, ... (readonly)
When an input is received and the condition is TRUE, perform the specified actions .
2052 2053 2054 |
# File 'io_t_events/cfn_detector_model.rb', line 2052 def on_input @on_input end |
#state_name ⇒ String (readonly)
The name of the state.
2037 2038 2039 |
# File 'io_t_events/cfn_detector_model.rb', line 2037 def state_name @state_name end |
Class Method Details
.jsii_properties ⇒ Object
2054 2055 2056 2057 2058 2059 2060 2061 |
# File 'io_t_events/cfn_detector_model.rb', line 2054 def self.jsii_properties { :state_name => "stateName", :on_enter => "onEnter", :on_exit => "onExit", :on_input => "onInput", } end |
Instance Method Details
#to_jsii ⇒ Object
2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 |
# File 'io_t_events/cfn_detector_model.rb', line 2063 def to_jsii result = {} result.merge!({ "stateName" => @state_name, "onEnter" => @on_enter, "onExit" => @on_exit, "onInput" => @on_input, }) result.compact end |