# YAML

{% hint style="info" %}
The following documentation is for **YAML v1.3.11** *(BDK)*.
{% endhint %}

## Overview

YAML (YAML Ain't Markup Language) integration provides data serialization and configuration management capabilities. This integration enables automated YAML file processing, configuration management, and structured data manipulation workflows. Streamline configuration management and data processing tasks.

## Prerequisites

### 1. Required Books

The following Book(s) need to be added to your agent so it can learn and understand the automation procedures defined within them:

* **YAML**

#### How to Add the Book(s)

1. Go to **Books** → **All Books**.
2. Search for the name of the book and click on it.
3. Click on <kbd>**Install**</kbd> or <kbd>**Add Connection**</kbd> to add the book to your agent.
4. If adding a connection, you'll be prompted for [**connectivity**](#connectivity) details.

## Procedures

### to convert a *yaml* to a (text)

Convert a YAML concept into text.

**Input Concepts**

| Concept         | Description      | Type   | Required | Default Value |
| --------------- | ---------------- | ------ | -------- | ------------- |
| [`yaml`](#yaml) | The YAML concept | `yaml` | Yes      | (no default)  |

**Output Concepts**

| Concept | Description                 | Type   |
| ------- | --------------------------- | ------ |
| `text`  | The serialized YAML concept | `text` |

**Examples**

Example 1: Convert the YAML concept into text

```generic
convert the yaml to a text
```

### to delete or remove a (*yaml*)'s property

Remove a property in a YAML concept.

**Input Concepts**

| Concept         | Description                                                | Type                   | Required | Default Value |
| --------------- | ---------------------------------------------------------- | ---------------------- | -------- | ------------- |
| [`yaml`](#yaml) | The YAML concept which contains the property to be removed | `yaml`                 | Yes      | (no default)  |
| `property`      | The name of the property to be removed                     | `conceptual` or `text` | Yes      | (no default)  |

**Output Concepts**

| Concept         | Description              | Type   |
| --------------- | ------------------------ | ------ |
| [`yaml`](#yaml) | The updated YAML concept | `yaml` |

**Examples**

Example 1: Remove the Year property

```generic
delete the yaml's year
```

### to get a (*yaml*'s property)

Retrieve a property by name from a YAML concept.

**Input Concepts**

| Concept         | Description                                                     | Type                   | Required | Default Value |
| --------------- | --------------------------------------------------------------- | ---------------------- | -------- | ------------- |
| [`yaml`](#yaml) | The YAML concept                                                | `yaml`                 | Yes      | (no default)  |
| `property`      | The name of the property that should be retrieved from the YAML | `conceptual` or `text` | Yes      | (no default)  |

**Output Concepts**

| Concept           | Description                                   | Type                                                       |
| ----------------- | --------------------------------------------- | ---------------------------------------------------------- |
| `yaml's property` | The property that was retrieved from the YAML | `boolean` or `list of any` or `number` or `text` or `yaml` |

**Examples**

Example 1: Retrieve the Movies property using exact match on the name Example 2: Retrieve the Movies property using natural language

```generic
    get yaml's "Movies"
    get yaml's movies
```

### to get a *yaml* as a (file)

Convert a YAML concept into a file.

**Input Concepts**

| Concept         | Description      | Type   | Required | Default Value |
| --------------- | ---------------- | ------ | -------- | ------------- |
| [`yaml`](#yaml) | The YAML concept | `yaml` | Yes      | (no default)  |

**Output Concepts**

| Concept | Description                                     | Type   |
| ------- | ----------------------------------------------- | ------ |
| `file`  | The file containing the serialized YAML concept | `file` |

**Examples**

Example 1: Convert the YAML concept into a file

```generic
get the yaml as a file
```

### to get a file as a (*yaml*)

Convert a file into a YAML concept.

**Input Concepts**

| Concept | Description                                        | Type   | Required | Default Value |
| ------- | -------------------------------------------------- | ------ | -------- | ------------- |
| `file`  | The file that contains the serialized YAML concept | `file` | Yes      | (no default)  |

**Output Concepts**

| Concept         | Description      | Type   |
| --------------- | ---------------- | ------ |
| [`yaml`](#yaml) | The YAML concept | `yaml` |

**Examples**

Example 1: Convert the file into a YAML concept

```generic
get the file as a yaml
```

### to get a text as a (*yaml*)

Convert a text into a YAML concept.

**Input Concepts**

| Concept | Description              | Type   | Required | Default Value |
| ------- | ------------------------ | ------ | -------- | ------------- |
| `text`  | The text to be converted | `text` | Yes      | (no default)  |

**Output Concepts**

| Concept         | Description      | Type   |
| --------------- | ---------------- | ------ |
| [`yaml`](#yaml) | The YAML concept | `yaml` |

**Examples**

Example 1: Convert the text into a YAML concept

```generic
get the text as a yaml
```

### to merge a (*yaml*) to another *yaml*

Merge two YAML concepts into a YAML concept.

**Input Concepts**

| Concept                 | Description             | Type   | Required | Default Value |
| ----------------------- | ----------------------- | ------ | -------- | ------------- |
| [`yaml`](#yaml)         | The first YAML concept  | `yaml` | Yes      | (no default)  |
| [`another yaml`](#yaml) | The second YAML concept | `yaml` | Yes      | (no default)  |

**Output Concepts**

| Concept         | Description                           | Type   |
| --------------- | ------------------------------------- | ------ |
| [`yaml`](#yaml) | The YAML concept that has been merged | `yaml` |

**Examples**

Example 1: Merge the one YAML concept into another

```generic
merge the yaml to the other yaml
```

### to set or change a (*yaml*)'s property to a value

Change a property in a YAML concept to a specific text value.

**Input Concepts**

| Concept         | Description                                                    | Type                                                       | Required | Default Value |
| --------------- | -------------------------------------------------------------- | ---------------------------------------------------------- | -------- | ------------- |
| [`yaml`](#yaml) | The YAML concept which contains the property to be changed     | `yaml`                                                     | Yes      | (no default)  |
| `property`      | The name of the property to be changed                         | `conceptual` or `text`                                     | Yes      | (no default)  |
| `value`         | The concept to be used as value for the property to be changed | `boolean` or `list of any` or `number` or `text` or `yaml` | Yes      | (no default)  |

**Output Concepts**

| Concept         | Description              | Type   |
| --------------- | ------------------------ | ------ |
| [`yaml`](#yaml) | The updated YAML concept | `yaml` |

**Examples**

Example 1: Change the Year property to 2000

```generic
set the yaml's year to 2000
```

## Concepts

### Yaml

A concept used to hold a JSON value.
