Class: Telnyx::Models::AI::ComparisonExpression

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/telnyx/models/ai/comparison_expression.rb

Defined Under Namespace

Modules: Op

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(left:, op:, right:, type: :comparison) ⇒ Object

Some parameter documentations has been truncated, see Telnyx::Models::AI::ComparisonExpression for more details.

Compare two sub-expressions with a relational or membership operator.

Evaluates to a boolean. Used in edge conditions to gate transitions on runtime values, e.g. ‘user_age >= 18` or `tier == “gold”`.

Parameters:

  • left (Object)

    Operand sub-expression (Expression AST node). Typed as free-form JSON to support

  • op (Symbol, Telnyx::Models::AI::ComparisonExpression::Op)

    Relational/membership operator. ‘contains` / `not_contains` apply to strings (su

  • right (Object)

    Operand sub-expression (Expression AST node). Typed as free-form JSON to support

  • type (Symbol, :comparison) (defaults to: :comparison)


# File 'lib/telnyx/models/ai/comparison_expression.rb', line 35

Instance Attribute Details

#leftObject

Operand sub-expression (Expression AST node). Typed as free-form JSON to support arbitrary recursion depth without an uncompilable by-value self-reference; see the Expression schema for the variant structure.

Returns:

  • (Object)


13
# File 'lib/telnyx/models/ai/comparison_expression.rb', line 13

required :left, Telnyx::Internal::Type::Unknown

#opSymbol, Telnyx::Models::AI::ComparisonExpression::Op

Relational/membership operator. ‘contains` / `not_contains` apply to strings (substring) and arrays (membership).



20
# File 'lib/telnyx/models/ai/comparison_expression.rb', line 20

required :op, enum: -> { Telnyx::AI::ComparisonExpression::Op }

#rightObject

Operand sub-expression (Expression AST node). Typed as free-form JSON to support arbitrary recursion depth without an uncompilable by-value self-reference; see the Expression schema for the variant structure.

Returns:

  • (Object)


28
# File 'lib/telnyx/models/ai/comparison_expression.rb', line 28

required :right, Telnyx::Internal::Type::Unknown

#typeSymbol, :comparison

Returns:

  • (Symbol, :comparison)


33
# File 'lib/telnyx/models/ai/comparison_expression.rb', line 33

required :type, const: :comparison