# helia_aot.attributes.defines

## helia_aot.attributes.defines.AttributeRuleset

`class` · `python`

```python
AttributeRuleset()
```

This class defines a powerful and flexible way to customize the conversion process for specific entities in the model.

Multiple attributes can be specified and allow slicing the model by entity type, entity identifier(s), or a specific combination of both.

The `type` field can be a specific entity type (e.g., CONV_2D) or * for all types.
The `id` field can be a specific entity identifier or a list of identifiers.

Since multiple attributes can be applied to the same entity, precedence is given based on the pair:
    1. (1, 1) if both type and id are specified and match
    2. (1, 0) if type is specified and id is not
    3. (0, 1) if id is specified and type is not
    4. (0, 0) if neither is specified

Currently, if multiple attributes have the same precedence, the last one in the list will be used.

Source: `helia_aot/attributes/defines.py:8`

### helia_aot.attributes.defines.AttributeRuleset.type

`attribute` · `python`

```python
type: str = Field(default='*', description='Entity type (e.g. CONV_2D) or * for all')
```

The entity type (e.g. CONV_2D or PERSISTENT) or * for all.

Source: `helia_aot/attributes/defines.py:31`

### helia_aot.attributes.defines.AttributeRuleset.id

`attribute` · `python`

```python
id: str | list[str] | None = Field(default=None, description='Entity identifier(s)')
```

The entity identifier or list of identifiers.

Source: `helia_aot/attributes/defines.py:32`

### helia_aot.attributes.defines.AttributeRuleset.attributes

`attribute` · `python`

```python
attributes: dict[str, BasicType] = Field(..., description='Entity attributes', default_factory=dict)
```

A dictionary of entity attributes.

Source: `helia_aot/attributes/defines.py:33`
