# HasName


```
@HomeExperimentalApi
interface HasName
```

<br />

*** ** * ** ***

Interface for objects that have a name and can set it. This interface is experimental and might not work expectedly.

## Summary

| ### Public functions |
|---|---|
| `suspend https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `@https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalApi https://developers.home.google.com/reference/kotlin/com/google/home/HasName#setName(kotlin.String)(newName: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` Sets the name of this object. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/HasName#name()` The name of this object. |

## Public functions

### setName

```
@HomeExperimentalApi
suspend fun setName(newName: String): Unit
```

Sets the name of this object.

| Parameters |
|---|---|
| `newName: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | the new name for this object. |

| Throws |
|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/HomeException` | if the update failed. |

## Public properties

### name

```
val name: String
```

The name of this object.