Class Expression

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

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:37.229Z") @Stability(Experimental) public abstract class Expression extends software.amazon.jsii.JsiiObject
(experimental) Expression for events in Detector Model state.

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();
 

See Also:
  • Nested Class Summary

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

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

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

    Modifier and Type
    Method
    Description
    static Expression
    and(Expression left, Expression right)
    (experimental) Create a expression for the AND operator.
    static Expression
    (experimental) Create a expression for function currentInput().
    static Expression
    eq(Expression left, Expression right)
    (experimental) Create a expression for the Equal operator.
    abstract String
    (experimental) This is called to evaluate the expression.
    abstract String
    evaluate(Number parentPriority)
    (experimental) This is called to evaluate the expression.
    static Expression
    (experimental) Create a expression from the given string.
    static Expression
    gt(Expression left, Expression right)
    (experimental) Create a expression for the Greater Than operator.
    static Expression
    gte(Expression left, Expression right)
    (experimental) Create a expression for the Greater Than Or Equal operator.
    static Expression
    (experimental) Create a expression for get an input attribute as $input.TemperatureInput.temperatures[2].
    static Expression
    lt(Expression left, Expression right)
    (experimental) Create a expression for the Less Than operator.
    static Expression
    lte(Expression left, Expression right)
    (experimental) Create a expression for the Less Than Or Equal operator.
    static Expression
    neq(Expression left, Expression right)
    (experimental) Create a expression for the Not Equal operator.
    static Expression
    or(Expression left, Expression right)
    (experimental) Create a expression for the OR operator.

    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

    • Expression

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

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

      @Stability(Experimental) protected Expression()
  • Method Details

    • and

      @Stability(Experimental) @NotNull public static Expression and(@NotNull Expression left, @NotNull Expression right)
      (experimental) Create a expression for the AND operator.

      Parameters:
      left - This parameter is required.
      right - This parameter is required.
    • currentInput

      @Stability(Experimental) @NotNull public static Expression currentInput(@NotNull IInput input)
      (experimental) Create a expression for function currentInput().

      It is evaluated to true if the specified input message was received.

      Parameters:
      input - This parameter is required.
    • eq

      @Stability(Experimental) @NotNull public static Expression eq(@NotNull Expression left, @NotNull Expression right)
      (experimental) Create a expression for the Equal operator.

      Parameters:
      left - This parameter is required.
      right - This parameter is required.
    • fromString

      @Stability(Experimental) @NotNull public static Expression fromString(@NotNull String value)
      (experimental) Create a expression from the given string.

      Parameters:
      value - This parameter is required.
    • gt

      @Stability(Experimental) @NotNull public static Expression gt(@NotNull Expression left, @NotNull Expression right)
      (experimental) Create a expression for the Greater Than operator.

      Parameters:
      left - This parameter is required.
      right - This parameter is required.
    • gte

      @Stability(Experimental) @NotNull public static Expression gte(@NotNull Expression left, @NotNull Expression right)
      (experimental) Create a expression for the Greater Than Or Equal operator.

      Parameters:
      left - This parameter is required.
      right - This parameter is required.
    • inputAttribute

      @Stability(Experimental) @NotNull public static Expression inputAttribute(@NotNull IInput input, @NotNull String path)
      (experimental) Create a expression for get an input attribute as $input.TemperatureInput.temperatures[2].

      Parameters:
      input - This parameter is required.
      path - This parameter is required.
    • lt

      @Stability(Experimental) @NotNull public static Expression lt(@NotNull Expression left, @NotNull Expression right)
      (experimental) Create a expression for the Less Than operator.

      Parameters:
      left - This parameter is required.
      right - This parameter is required.
    • lte

      @Stability(Experimental) @NotNull public static Expression lte(@NotNull Expression left, @NotNull Expression right)
      (experimental) Create a expression for the Less Than Or Equal operator.

      Parameters:
      left - This parameter is required.
      right - This parameter is required.
    • neq

      @Stability(Experimental) @NotNull public static Expression neq(@NotNull Expression left, @NotNull Expression right)
      (experimental) Create a expression for the Not Equal operator.

      Parameters:
      left - This parameter is required.
      right - This parameter is required.
    • or

      @Stability(Experimental) @NotNull public static Expression or(@NotNull Expression left, @NotNull Expression right)
      (experimental) Create a expression for the OR operator.

      Parameters:
      left - This parameter is required.
      right - This parameter is required.
    • evaluate

      @Stability(Experimental) @NotNull public abstract String evaluate(@Nullable Number parentPriority)
      (experimental) This is called to evaluate the expression.

      Parameters:
      parentPriority - priority of the parent of this expression, used for determining whether or not to add parenthesis around the expression.
    • evaluate

      @Stability(Experimental) @NotNull public abstract String evaluate()
      (experimental) This is called to evaluate the expression.