# ServiceAreaTrait.AreaStruct

# ServiceAreaTrait.AreaStruct


```
class ServiceAreaTrait.AreaStruct : ClusterStruct
```

<br />

*** ** * ** ***

Data about an area known to the server.

## Summary

| ### Nested types |
|---|
| `@https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalGenericApi enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ServiceAreaTrait.AreaStruct.StructFields : 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 struct's fields. |

| ### Public constructors |
|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ServiceAreaTrait.AreaStruct#AreaStruct(kotlin.UInt,kotlin.UInt,com.google.home.matter.standard.ServiceAreaTrait.AreaInfoStruct)( areaId: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html, mapId: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html?, areaInfo: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ServiceAreaTrait.AreaInfoStruct )` Creates the AreaStruct class. |

| ### Public functions |
|---|---|
| `open https://developers.home.google.com/reference/kotlin/com/google/home/StructDescriptor` | `@https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalGenericApi https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ServiceAreaTrait.AreaStruct#getDescriptor()()` Returns the descriptor for the struct. |
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html?` | `@https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalGenericApi https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ServiceAreaTrait.AreaStruct#getFieldValueById(kotlin.UInt)(tagId: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html)` Returns the value of the field for the given tag ID. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ServiceAreaTrait.AreaStruct#areaId()` The identifier of the area. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ServiceAreaTrait.AreaInfoStruct` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ServiceAreaTrait.AreaStruct#areaInfo()` Data describing the area. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ServiceAreaTrait.AreaStruct#mapId()` The map identifier which the area is associated with. |

## Public constructors

### AreaStruct

```
AreaStruct(
    areaId: UInt,
    mapId: UInt? = null,
    areaInfo: ServiceAreaTrait.AreaInfoStruct = AreaInfoStruct()
)
```

Creates the AreaStruct class.

## Public functions

### getDescriptor

```
@HomeExperimentalGenericApi
open fun getDescriptor(): StructDescriptor
```

Returns the descriptor for the struct.

### getFieldValueById

```
@HomeExperimentalGenericApi
open fun getFieldValueById(tagId: UInt): Any?
```

Returns the value of the field for the given tag ID.

## Public properties

### areaId

```
val areaId: UInt
```

The identifier of the area.

### areaInfo

```
val areaInfo: ServiceAreaTrait.AreaInfoStruct
```

Data describing the area. This field is used by clients to determine the name or the semantics of a certain area.

### mapId

```
val mapId: UInt?
```

The map identifier which the area is associated with. A value of `null` indicates that the area is not associated with a map. If the `supportedMaps` attribute is not empty, this field matches the `MapID` field of an entry from the `supportedMaps` attribute's list. If the `supportedMaps` attribute is empty, this field is `null`.