init(_:_:_:_:otherwise:)
Creates a When condition comparing an optional union value parameter to a specific case.
Declaration
init<ValueType, Parameter>(_ keyPath: KeyPath<Intent, Parameter>, _ comparisonOperator: EquatableComparisonOperator, _ value: ValueType.ValueType.Cases, @ParameterSummaryBuilder<Intent> _ when: () -> WhenCondition, @ParameterSummaryBuilder<Intent> otherwise: () -> Otherwise) where ValueType : ExpressibleByNilLiteral, ValueType == Parameter.Value, Parameter : AnyIntentValue, ValueType.ValueType : AppUnionValueParameters
- keyPath:
Key path to the optional union value parameter
- comparisonOperator:
The comparison operator (
.equalToor.notEqualTo) - value:
The union value case to compare against
- when:
The summary to use when the condition is true
- otherwise:
The summary to use when the condition is false