# GroupMembership


```
class GroupMembership : PlatformTrait, GroupMembershipTrait.Attributes, Updatable
```

<br />

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

*** ** * ** ***

API for the GroupMembership trait. It is used to represent the groups a device is a member of.

## Summary

| ### Nested types |
|---|
| `enum https://developers.home.google.com/reference/kotlin/com/google/home/google/GroupMembership.Attribute : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html, https://developers.home.google.com/reference/kotlin/com/google/home/Field` Descriptor enum for this trait's attributes. |

| ### Public functions |
|---|---|
| `open suspend https://developers.home.google.com/reference/kotlin/com/google/home/google/GroupMembership` | `https://developers.home.google.com/reference/kotlin/com/google/home/google/GroupMembership#update(kotlin.Function1,kotlin.Function1)(optimisticReturn: (https://developers.home.google.com/reference/kotlin/com/google/home/google/GroupMembership) -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html, init: https://developers.home.google.com/reference/kotlin/com/google/home/google/GroupMembershipTrait.MutableAttributes.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Updater function to modify any writable attributes. |

| ### Public properties |
|---|---|
| `open https://developers.home.google.com/reference/kotlin/com/google/home/TraitFactory<https://developers.home.google.com/reference/kotlin/com/google/home/google/GroupMembership>` | `https://developers.home.google.com/reference/kotlin/com/google/home/google/GroupMembership#factory()` |

### Inherited functions

From [com.google.home.google.PlatformTrait](https://developers.home.google.com/reference/kotlin/com/google/home/google/PlatformTrait) `ObjectCommand` `<REQUEST : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html?> https://developers.home.google.com/reference/kotlin/com/google/home/google/PlatformTrait#createObjectCommand(kotlin.String,com.google.home.google.PlatformTraitPayload)(
commandId: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html,
request: https://developers.home.google.com/reference/kotlin/com/google/home/google/PlatformTraitPayload<REQUEST>
)` `suspend https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` `https://developers.home.google.com/reference/kotlin/com/google/home/google/PlatformTrait#sendCommand(kotlin.String)(commandId: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` `suspend https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` `<REQUEST : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html?> https://developers.home.google.com/reference/kotlin/com/google/home/google/PlatformTrait#sendCommand(kotlin.String,com.google.home.google.PlatformTraitPayload)(
commandId: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html,
request: https://developers.home.google.com/reference/kotlin/com/google/home/google/PlatformTraitPayload<REQUEST>
)` `suspend RESPONSE` `<RESPONSE : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html?> https://developers.home.google.com/reference/kotlin/com/google/home/google/PlatformTrait#sendCommand(kotlin.String,com.google.home.google.Parser)(
commandId: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html,
responseParser: https://developers.home.google.com/reference/kotlin/com/google/home/google/Parser<RESPONSE>
)` `suspend RESPONSE` `<REQUEST : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html?, RESPONSE : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html?> https://developers.home.google.com/reference/kotlin/com/google/home/google/PlatformTrait#sendCommand(kotlin.String,com.google.home.google.PlatformTraitPayload,com.google.home.google.Parser)(
commandId: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html,
request: https://developers.home.google.com/reference/kotlin/com/google/home/google/PlatformTraitPayload<REQUEST>,
responseParser: https://developers.home.google.com/reference/kotlin/com/google/home/google/Parser<RESPONSE>
)` `suspend https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` `<T : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html?> https://developers.home.google.com/reference/kotlin/com/google/home/google/PlatformTrait#write(com.google.home.google.Parser,kotlin.Any,kotlin.Boolean)(parser: https://developers.home.google.com/reference/kotlin/com/google/home/google/Parser<T>, attributes: T, useTimedInteraction: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`

### Inherited properties

From [com.google.home.google.GroupMembershipTrait.Attributes](https://developers.home.google.com/reference/kotlin/com/google/home/google/GroupMembershipTrait.Attributes) `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html>` `https://developers.home.google.com/reference/kotlin/com/google/home/google/GroupMembershipTrait.Attributes#groupObjectIdsList()`

The object ids of the groups this device is a member of.
From [com.google.home.google.PlatformTrait](https://developers.home.google.com/reference/kotlin/com/google/home/google/PlatformTrait) `open https://developers.home.google.com/reference/kotlin/com/google/home/Trait.TraitMetadata` `https://developers.home.google.com/reference/kotlin/com/google/home/google/PlatformTrait#metadata()` `https://developers.home.google.com/reference/kotlin/com/google/home/google/PlatformTraitClient` `https://developers.home.google.com/reference/kotlin/com/google/home/google/PlatformTrait#traitClient()`

## Public functions

### update

```
open suspend fun update(optimisticReturn: (GroupMembership) -> Unit, init: GroupMembershipTrait.MutableAttributes.() -> Unit): GroupMembership
```

Updater function to modify any writable attributes.

## Public properties

### factory

```
open val factory: TraitFactory<GroupMembership>
```