# GooglePergolaDevice

# GooglePergolaDevice


```
class GooglePergolaDevice : DeviceType
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) |||
| ↳ | [com.google.home.DeviceType](https://developers.home.google.com/reference/kotlin/com/google/home/DeviceType) ||
|   | ↳ | [com.google.home.google.GooglePergolaDevice](https://developers.home.google.com/reference/kotlin/com/google/home/google/GooglePergolaDevice) |

*** ** * ** ***

A device consisting of an arbor formed of horizontal trelliswork supported on columns or posts that can be opened and closed, potentially in more than one direction. For example, some pergolas with a canvas may open either to the LEFT or RIGHT.

## Summary

| ### Nested types |
|---|
| `class https://developers.home.google.com/reference/kotlin/com/google/home/google/GooglePergolaDevice.GoogleTraits` Trait Container for GooglePergolaDevice Google Traits. |

| ### Public constructors |
|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/google/GooglePergolaDevice#GooglePergolaDevice(com.google.home.DeviceType.Metadata,com.google.home.TraitProvider,com.google.home.HasEvents,com.google.home.HasParts,com.google.home.google.GooglePergolaDevice.GoogleTraits)( metadata: https://developers.home.google.com/reference/kotlin/com/google/home/DeviceType.Metadata, traitProvider: https://developers.home.google.com/reference/kotlin/com/google/home/TraitProvider, eventProvider: https://developers.home.google.com/reference/kotlin/com/google/home/HasEvents, partsProvider: https://developers.home.google.com/reference/kotlin/com/google/home/HasParts, googleTraits: https://developers.home.google.com/reference/kotlin/com/google/home/google/GooglePergolaDevice.GoogleTraits )` Creates the GooglePergolaDevice class. |

| ### Public properties |
|---|---|
| `open https://developers.home.google.com/reference/kotlin/com/google/home/DeviceTypeFactory<https://developers.home.google.com/reference/kotlin/com/google/home/google/GooglePergolaDevice>` | `https://developers.home.google.com/reference/kotlin/com/google/home/google/GooglePergolaDevice#factory()` |
| `https://developers.home.google.com/reference/kotlin/com/google/home/google/GooglePergolaDevice.GoogleTraits` | `https://developers.home.google.com/reference/kotlin/com/google/home/google/GooglePergolaDevice#googleTraits()` |
| `open https://developers.home.google.com/reference/kotlin/com/google/home/DeviceType.Metadata` | `https://developers.home.google.com/reference/kotlin/com/google/home/google/GooglePergolaDevice#metadata()` |

| ### Inherited functions |
|---|
| From [com.google.home.HasEvents](https://developers.home.google.com/reference/kotlin/com/google/home/HasEvents) |---|---| | `open https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/Event>` | `https://developers.home.google.com/reference/kotlin/com/google/home/HasEvents#events()()` Gets a flow of all Events available for the object. | | `open https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html<T>` | `<T : https://developers.home.google.com/reference/kotlin/com/google/home/Event> https://developers.home.google.com/reference/kotlin/com/google/home/HasEvents#events(com.google.home.EventFactory)(event: https://developers.home.google.com/reference/kotlin/com/google/home/EventFactory<T>)` Gets a flow of a specific Event. | | `open https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/Event>` | `<T : https://developers.home.google.com/reference/kotlin/com/google/home/Trait> https://developers.home.google.com/reference/kotlin/com/google/home/HasEvents#events(com.google.home.TraitFactory)(trait: https://developers.home.google.com/reference/kotlin/com/google/home/TraitFactory<T>)` Gets a flow of all Events by this `https://developers.home.google.com/reference/kotlin/com/google/home/Trait`. | |
| From [com.google.home.HasParts](https://developers.home.google.com/reference/kotlin/com/google/home/HasParts) |---|---| | `open T` | `<T : https://developers.home.google.com/reference/kotlin/com/google/home/DeviceType> https://developers.home.google.com/reference/kotlin/com/google/home/HasParts#part(com.google.home.DeviceTypeFactory,kotlin.Array)(type: https://developers.home.google.com/reference/kotlin/com/google/home/DeviceTypeFactory<T>, vararg tags: https://developers.home.google.com/reference/kotlin/com/google/home/Tag)` Returns the first part that matches the given type and tags. | | `open T?` | `<T : https://developers.home.google.com/reference/kotlin/com/google/home/DeviceType> https://developers.home.google.com/reference/kotlin/com/google/home/HasParts#partOrNull(com.google.home.DeviceTypeFactory,kotlin.Array)(type: https://developers.home.google.com/reference/kotlin/com/google/home/DeviceTypeFactory<T>, vararg tags: https://developers.home.google.com/reference/kotlin/com/google/home/Tag)` Returns the first part that matches the given type and tags. | |
| From [com.google.home.TraitProvider](https://developers.home.google.com/reference/kotlin/com/google/home/TraitProvider) |---|---| | `open https://developers.home.google.com/reference/kotlin/com/google/home/Trait.TraitMetadata?` | `<T : https://developers.home.google.com/reference/kotlin/com/google/home/Trait> https://developers.home.google.com/reference/kotlin/com/google/home/TraitProvider#metadata(com.google.home.TraitFactory)(traitFactory: https://developers.home.google.com/reference/kotlin/com/google/home/TraitFactory<T>)` Access a specific trait metadata on the provider given a caller-provided TraitFactory. | | `open T?` | `<T : https://developers.home.google.com/reference/kotlin/com/google/home/Trait> https://developers.home.google.com/reference/kotlin/com/google/home/TraitProvider#trait(com.google.home.TraitFactory)(traitFactory: https://developers.home.google.com/reference/kotlin/com/google/home/TraitFactory<T>)` Access a specific trait on the provider given a caller-provided TraitFactory. | | `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/Trait>` | `https://developers.home.google.com/reference/kotlin/com/google/home/TraitProvider#traits()()` Given a similar accessible trait set as the function above, returns a subset of those traits that are present in the associated `https://developers.home.google.com/reference/kotlin/com/google/home/HomeConfig#factoryRegistry()` union'ed with those already known to the extended sub-class (e.g specific DeviceType that is aware of the set of `https://developers.home.google.com/reference/kotlin/com/google/home/TraitFactory`s specified in its type definition). | |

| ### Inherited properties |
|---|
| From [com.google.home.DeviceType](https://developers.home.google.com/reference/kotlin/com/google/home/DeviceType) |---|---| | `https://developers.home.google.com/reference/kotlin/com/google/home/TraitProvider` | `https://developers.home.google.com/reference/kotlin/com/google/home/DeviceType#traitProvider()` | |
| From [com.google.home.HasParts](https://developers.home.google.com/reference/kotlin/com/google/home/HasParts) |---|---| | `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/DeviceType>` | `https://developers.home.google.com/reference/kotlin/com/google/home/HasParts#parts()` The parts of this object represented as a set of device types. | |

## Public constructors

### GooglePergolaDevice

```
GooglePergolaDevice(
    metadata: DeviceType.Metadata,
    traitProvider: TraitProvider,
    eventProvider: HasEvents,
    partsProvider: HasParts,
    googleTraits: GooglePergolaDevice.GoogleTraits
)
```

Creates the GooglePergolaDevice class.

## Public properties

### factory

```
open val factory: DeviceTypeFactory<GooglePergolaDevice>
```

### googleTraits

```
val googleTraits: GooglePergolaDevice.GoogleTraits
```

### metadata

```
open val metadata: DeviceType.Metadata
```