UNPKG

@alexa/ask-expressions-spec

Version:

The JSON Schema specification for the Alexa Skills Kit Intermediate Representation (ASKIR).

153 lines (82 loc) 5.18 kB
# Condition Schema ```txt https://amazonalexa.com/ask/2020/12/Condition ``` Represents a condition. | Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | | :------------------ | :--------- | :------------- | :----------- | :---------------- | :-------------------- | :------------------ | :-------------------------------------------------------------------- | | Can be instantiated | No | Unknown status | No | Forbidden | Forbidden | none | [Condition.json](../../schemas/Condition.json "open original schema") | ## Condition Type `object` ([Condition](condition.md)) # Condition Properties | Property | Type | Required | Nullable | Defined by | | :-------------------------- | :------------ | :------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------ | | [kind](#kind) | Not specified | Required | cannot be null | [Condition](condition-properties-kind.md "https://amazonalexa.com/ask/2020/12/Condition#/properties/kind") | | [when](#when) | Merged | Required | cannot be null | [Condition](condition-properties-when.md "https://amazonalexa.com/ask/2020/12/Condition#/properties/when") | | [then](#then) | `array` | Optional | cannot be null | [Condition](condition-properties-sampleblock.md "https://amazonalexa.com/ask/2020/12/SampleBlock#/properties/then") | | [else](#else) | `array` | Optional | cannot be null | [Condition](condition-properties-sampleblock-1.md "https://amazonalexa.com/ask/2020/12/SampleBlock#/properties/else") | | [type](#type) | `object` | Optional | cannot be null | [Condition](actiondeclaration-properties-typereference.md "https://amazonalexa.com/ask/2020/12/TypeReference#/properties/type") | | [annotations](#annotations) | `array` | Optional | cannot be null | [Condition](condition-properties-annotations.md "https://amazonalexa.com/ask/2020/12/Condition#/properties/annotations") | ## kind The expression's identifier. `kind` * is required * Type: unknown ([kind](condition-properties-kind.md)) * cannot be null * defined in: [Condition](condition-properties-kind.md "https://amazonalexa.com/ask/2020/12/Condition#/properties/kind") ### kind Type unknown ([kind](condition-properties-kind.md)) ### kind Constraints **constant**: the value of this property must be equal to: ```json "Condition" ``` ## when The boolean expression for the condition. `when` * is required * Type: merged type ([Details](condition-properties-when.md)) * cannot be null * defined in: [Condition](condition-properties-when.md "https://amazonalexa.com/ask/2020/12/Condition#/properties/when") ### when Type merged type ([Details](condition-properties-when.md)) one (and only one) of * [Call](actiondeclaration-properties-annotations-call.md "check type definition") * [name](arguments-definitions-arg-expression-oneof-name.md "check type definition") * [Condition](condition-properties-when-oneof-condition.md "check type definition") * [property reference](arguments-definitions-arg-expression-oneof-property-reference.md "check type definition") ## then A block of expressions. `then` * is optional * Type: an array of merged types ([Details](sampleblock-items.md)) * cannot be null * defined in: [Condition](condition-properties-sampleblock-1.md "https://amazonalexa.com/ask/2020/12/SampleBlock#/properties/then") ### then Type an array of merged types ([Details](sampleblock-items.md)) ## else A block of expressions. `else` * is optional * Type: an array of merged types ([Details](sampleblock-items.md)) * cannot be null * defined in: [Condition](condition-properties-sampleblock-1.md "https://amazonalexa.com/ask/2020/12/SampleBlock#/properties/else") ### else Type an array of merged types ([Details](sampleblock-items.md)) ## type The representation of a reference to a type declaration. `type` * is optional * Type: `object` ([TypeReference](actiondeclaration-properties-typereference.md)) * cannot be null * defined in: [Condition](actiondeclaration-properties-typereference.md "https://amazonalexa.com/ask/2020/12/TypeReference#/properties/type") ### type Type `object` ([TypeReference](actiondeclaration-properties-typereference.md)) ## annotations `annotations` * is optional * Type: `object[]` ([Call](actiondeclaration-properties-annotations-call.md)) * cannot be null * defined in: [Condition](condition-properties-annotations.md "https://amazonalexa.com/ask/2020/12/Condition#/properties/annotations") ### annotations Type `object[]` ([Call](actiondeclaration-properties-annotations-call.md))