java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.iotevents.State
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:37.236Z") @Stability(Experimental) public class State extends software.amazon.jsii.JsiiObject
(experimental) Defines a state of a detector.

Example:

 // Example automatically generated from non-compiling source. May contain errors.
 import software.amazon.awscdk.services.iotevents.*;
 import software.amazon.awscdk.services.iotevents.actions.*;
 IInput input;
 State state = State.Builder.create()
         .stateName("MyState")
         .onEnter(List.of(Event.builder()
                 .eventName("test-event")
                 .condition(Expression.currentInput(input))
                 .actions(List.of(actions, List.of(
                     new SetVariableAction("MyVariable", Expression.inputAttribute(input, "payload.temperature")))))
                 .build()))
         .build();
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    (experimental) A fluent builder for State.

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
     
    protected
    State(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    State(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (experimental) The name of the state.
    void
    transitionTo(State targetState, TransitionOptions options)
    (experimental) Add a transition event to the state.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • State

      protected State(software.amazon.jsii.JsiiObjectRef objRef)
    • State

      protected State(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • State

      @Stability(Experimental) public State(@NotNull StateProps props)
      Parameters:
      props - This parameter is required.
  • Method Details

    • transitionTo

      @Stability(Experimental) public void transitionTo(@NotNull State targetState, @NotNull TransitionOptions options)
      (experimental) Add a transition event to the state.

      The transition event will be triggered if condition is evaluated to true.

      Parameters:
      targetState - the state that will be transit to when the event triggered. This parameter is required.
      options - transition options including the condition that causes the state transition. This parameter is required.
    • getStateName

      @Stability(Experimental) @NotNull public String getStateName()
      (experimental) The name of the state.