# EventFactory


```
open class EventFactory<T : Event>
```

<br />

Known direct subclasses [AutomationExecution.AutomationExecutionEvent.Companion](https://developers.home.google.com/reference/kotlin/com/google/home/google/AutomationExecution.AutomationExecutionEvent.Companion), [UnknownEvent.UnknownEventFactory](https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnknownEvent.UnknownEventFactory)

|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/google/AutomationExecution.AutomationExecutionEvent.Companion` |   |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/UnknownEvent.UnknownEventFactory` |   |

*** ** * ** ***

Wrapper for companion objects to subclass to create shorter syntax. For example, `device.events(BasicInformation.StartUp)` versus `device.events(BasicInformation.StartUp.factory)`.

## Summary

| ### Public constructors |
|---|
| `<T : https://developers.home.google.com/reference/kotlin/com/google/home/Event> https://developers.home.google.com/reference/kotlin/com/google/home/EventFactory#EventFactory(com.google.home.InternalEventFactory)(factory: InternalEventFactory<T>)` |

| ### Public functions |
|---|---|
| `open https://developers.home.google.com/reference/kotlin/com/google/home/Field?` | `https://developers.home.google.com/reference/kotlin/com/google/home/EventFactory#getEventFieldById(kotlin.UInt)(tagId: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html)` |

| ### Public properties |
|---|---|
| `InternalEventFactory<T>` | `https://developers.home.google.com/reference/kotlin/com/google/home/EventFactory#factory()` the internal factory. |

## Public constructors

### EventFactory

```
<T : Event> EventFactory(factory: InternalEventFactory<T>)
```

## Public functions

### getEventFieldById

```
open fun getEventFieldById(tagId: UInt): Field?
```

## Public properties

### factory

```
val factory: InternalEventFactory<T>
```

the internal factory.