# Random Boolean (RandomBooleanGenerator)

The [Random Boolean](https://docs.tonic.ai/app/generation/generators/generator-reference/random-boolean) generator assigns a random boolean value.

## Link object structure <a href="#generator-api-random-boolean-link-object" id="generator-api-random-boolean-link-object"></a>

The Random Boolean generator does not support linking or consistency. You cannot configure differential privacy.

The `metadata` object is populated from the [`RatioMetadata`](https://app.tonic.ai/apidocs/index.html#/models/RatioMetadata) object. The `ratio` field indicates the percentage (as a decimal value between 0 and 1.0) of values to set to `true`.

```json
{
  "schema": "string",
  "table": "string",
  "column": "string",  
  "path": "string",  //JSON fields only
  "dataType": "string",  //MongoDB, Amazon DynamoDB, and JSON fields only
  "metadata": {
    "presetId": "string",
    "generatorId": "RandomBooleanGenerator",
    "ratio": numeric,
    "encryptionProcessor": "x-on", //To use configured Structural data encryption
    "customValueProcessor": "string"  //If custom value processor applied
  }
}
```

## Example replacement <a href="#generator-api-random-boolean-replacement" id="generator-api-random-boolean-replacement"></a>

In the following example replacement for the Random Boolean generator, 40% of the destination values are `true`, and 60% are `false`.

```json
{
  "name": "is-available",
  "schema": "public",
  "table": "products",
  "links": [
    {
      "schema": "public",
      "table": "products",
      "column": "is-available",
      "metadata": {
        "presetId": "RandomBooleanGenerator",
        "generatorId": "RandomBooleanGenerator",
        "ratio": 0.4
      }
    }
  ]
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tonic.ai/app/api/quick-start-guide/tonic-api-generator-assignment/generator-api-reference/generator-api-ref-random-boolean.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
