# Functions
ArraySpec wraps the array and returns a spec.
AttrSpec wraps the attr and returns a spec.
BlockAttrsSpec wraps the block attrs and returns a spec.
BlockListSpec wraps the block list and returns a spec.
BlockMapSpec wraps the block map and returns a spec.
BlockSetSpec wraps the block set and returns a spec.
BlockSpec wraps the block and returns a spec.
DefaultSpec wraps the default and returns a spec.
LiteralSpec wraps the literal and returns a spec.
NewArray returns a new array spec.
NewAttr returns a new attribute spec.
NewBlock returns a new block spec.
NewBlockAttrs returns a new block attrs spec.
NewBlockList returns a new block list spec that has no limits.
NewBlockListLimited returns a new block list spec that limits the number of blocks.
NewBlockMap returns a new block map spec.
NewBlockSet returns a new block set spec that has no limits.
NewBlockSetLimited returns a new block set spec that limits the number of blocks.
NewDefault returns a new default spec.
NewLiteral returns a new literal spec.
NewObject returns a new object spec.
ObjectSpec wraps the object and returns a spec.
# Structs
Array spec type produces a JSON array whose elements are set based onany nested spec blocks:
```hclArray {Attr {name = "first_element"type = "string"}Attr {name = "second_element"type = "string"}}```
An `Array` spec block creates no validation constraints, but it passes onany validation constraints created by the nested specs.
Attr spec type reads the value of an attribute in the current bodyand returns that value as its result.
Block spec type applies one nested spec block to the contents of ablock within the current body and returns the result of that spec.
The BlockAttrs spec type is similar to an Attr spec block of a map type,but it produces a map from the attributes of a block rather than from anattribute's expression.
BlockList spec type is similar to `Block`, but it accepts zero ormore blocks of a specified type rather than requiring zero or one.
BlockMap spec type is similar to `Block`, but it accepts zero ormore blocks of a specified type rather than requiring zero or one.
BlockSet spec type behaves the same as BlockList except thatthe result is in no specific order and any duplicate items are removed.
Default spec type evaluates a sequence of nested specs in turn andreturns the result of the first one that produces a non-null value.It creates no validation constraints of its own, but passes on the validationconstraints from its first nested block.
Literal spec type returns a given literal value, and creates novalidation constraints.
Object spec type is the most commonly used at the root of a spec file.Its result is a JSON object whose properties are set based on any nestedspec blocks:
```hclObject {Attr "name" {type = "string"}Block "address" {Object {Attr "street" {type = "string"}# ...}}}```
Nested spec blocks inside `Object` must always have an extra block label`"name"`, `"address"` and `"street"` in the above example) that specifiesthe name of the property that should be created in the JSON object result.This label also acts as a default name selector for the nested spec, allowingthe `Attr` blocks in the above example to omit the usually-required `name`argument in cases where the HCL input name and JSON output name are the same.
Spec defines the available specification types.