@alexa/ask-expressions-spec
Version:
The JSON Schema specification for the Alexa Skills Kit Intermediate Representation (ASKIR).
162 lines (90 loc) • 5.08 kB
Markdown
# name Schema
```txt
https://amazonalexa.com/ask/2020/12/NameDeclaration#/items/oneOf/3
```
Introduces a name for an expression.
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
| :------------------ | :--------- | :------------- | :----------- | :---------------- | :-------------------- | :------------------ | :-------------------------------------------------------------------------- |
| Can be instantiated | No | Unknown status | No | Forbidden | Forbidden | none | [SampleBlock.json\*](../../schemas/SampleBlock.json "open original schema") |
## 3 Type
`object` ([name](sampleblock-items-oneof-name.md))
# 3 Properties
| Property | Type | Required | Nullable | Defined by |
| :-------------------------- | :------------ | :------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------ |
| [kind](#kind) | Not specified | Required | cannot be null | [name](namedeclaration-properties-kind.md "https://amazonalexa.com/ask/2020/12/NameDeclaration#/properties/kind") |
| [name](#name) | `string` | Required | cannot be null | [name](genericargumentsdeclaration-items-properties-name.md "https://amazonalexa.com/ask/2020/12/Name#/properties/name") |
| [type](#type) | `object` | Optional | cannot be null | [name](actiondeclaration-properties-typereference.md "https://amazonalexa.com/ask/2020/12/TypeReference#/properties/type") |
| [expression](#expression) | Merged | Required | cannot be null | [name](namedeclaration-properties-expression.md "https://amazonalexa.com/ask/2020/12/NameDeclaration#/properties/expression") |
| [annotations](#annotations) | `array` | Optional | cannot be null | [name](namedeclaration-properties-annotations.md "https://amazonalexa.com/ask/2020/12/NameDeclaration#/properties/annotations") |
## kind
The expression's identifier.
`kind`
* is required
* Type: unknown ([kind](namedeclaration-properties-kind.md))
* cannot be null
* defined in: [name](namedeclaration-properties-kind.md "https://amazonalexa.com/ask/2020/12/NameDeclaration#/properties/kind")
### kind Type
unknown ([kind](namedeclaration-properties-kind.md))
### kind Constraints
**constant**: the value of this property must be equal to:
```json
"NameDeclaration"
```
## name
A name.
`name`
* is required
* Type: `string` ([Name](genericargumentsdeclaration-items-properties-name.md))
* cannot be null
* defined in: [name](genericargumentsdeclaration-items-properties-name.md "https://amazonalexa.com/ask/2020/12/Name#/properties/name")
### name Type
`string` ([Name](genericargumentsdeclaration-items-properties-name.md))
### name Constraints
**pattern**: the string must match the following regular expression: 
```regexp
^[a-zA-Z_][a-zA-Z0-9_]*$
```
[try pattern](https://regexr.com/?expression=%5E%5Ba-zA-Z_%5D%5Ba-zA-Z0-9_%5D*%24 "try regular expression with regexr.com")
### name Examples
```json
"foo"
```
```json
"bar"
```
```json
"person"
```
```json
"foo1"
```
## 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: [name](actiondeclaration-properties-typereference.md "https://amazonalexa.com/ask/2020/12/TypeReference#/properties/type")
### type Type
`object` ([TypeReference](actiondeclaration-properties-typereference.md))
## expression
`expression`
* is required
* Type: merged type ([Details](namedeclaration-properties-expression.md))
* cannot be null
* defined in: [name](namedeclaration-properties-expression.md "https://amazonalexa.com/ask/2020/12/NameDeclaration#/properties/expression")
### expression Type
merged type ([Details](namedeclaration-properties-expression.md))
one (and only one) of
* [Call](actiondeclaration-properties-annotations-call.md "check type definition")
* [property reference](arguments-definitions-arg-expression-oneof-property-reference.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")
## annotations
`annotations`
* is optional
* Type: `object[]` ([Call](actiondeclaration-properties-annotations-call.md))
* cannot be null
* defined in: [name](namedeclaration-properties-annotations.md "https://amazonalexa.com/ask/2020/12/NameDeclaration#/properties/annotations")
### annotations Type
`object[]` ([Call](actiondeclaration-properties-annotations-call.md))