> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encord.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Objects.options

## Option Objects

```python theme={"dark"}
@dataclass
class Option(OntologyNestedElement)
```

Base class for shared Option fields

## NestableOption Objects

```python theme={"dark"}
@dataclass
class NestableOption(Option)
```

#### add\_nested\_option

```python theme={"dark"}
@deprecated(version="0.1.100", alternative=".add_nested_attribute")
def add_nested_option(cls: Type[AttributeType],
                      name: str,
                      local_uid: Optional[int] = None,
                      feature_node_hash: Optional[str] = None,
                      required: bool = False) -> AttributeType
```

This method is deprecated, please use [add\_nested\_attribute()](#add_nested_attribute) instead.
There is no functional difference between these methods.

#### add\_nested\_attribute

```python theme={"dark"}
def add_nested_attribute(cls: Type[AttributeType],
                         name: str,
                         local_uid: Optional[int] = None,
                         feature_node_hash: Optional[str] = None,
                         required: bool = False) -> AttributeType
```

Adds a nested attribute to a RadioAttribute option.

**Arguments**:

* `cls` - attribute type, one of `RadioAttribute`, `ChecklistAttribute`, `TextAttribute`
* `name` - the user-visible name of the attribute
* `local_uid` - integer identifier of the attribute. Normally auto-generated;
  omit this unless the aim is to create an exact clone of existing ontology
* `feature_node_hash` - global identifier of the object. Normally auto-generated;
  omit this unless the aim is to create an exact clone of existing ontology
* `required` - whether the label editor would mark this attribute as 'required'

**Returns**:

the created attribute that can be further specified with Options, where appropriate

**Raises**:

* `ValueError` - if specified `local_uid` or `feature_node_hash` violate uniqueness constraints
