# OperationalStateTrait.OperationCompletion

# OperationalStateTrait.OperationCompletion


```
interface OperationalStateTrait.OperationCompletion : ClusterStruct
```

<br />

Known direct subclasses [OperationalState.OperationCompletionEvent](https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalState.OperationCompletionEvent)

|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalState.OperationCompletionEvent` |   |

*** ** * ** ***

This event is generated when the overall operation ends, successfully or otherwise.

## Summary

| ### 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/OperationalStateTrait.OperationCompletion#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/OperationalStateTrait.OperationCompletion#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-byte/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.OperationCompletion#completionErrorCode()` Provides an indication of the state at the end of the operation. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.OperationCompletion#pausedTime()` The total time spent in the paused state, in seconds. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.OperationCompletion#totalOperationalTime()` The total operational time, in seconds, from when the operation was started until the operation completed, including any time spent while paused. |

## 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

### completionErrorCode

```
val completionErrorCode: UByte?
```

Provides an indication of the state at the end of the operation.

### pausedTime

```
val pausedTime: UInt?
```

The total time spent in the paused state, in seconds.

### totalOperationalTime

```
val totalOperationalTime: UInt?
```

The total operational time, in seconds, from when the operation was started until the operation completed, including any time spent while paused.