# GeneralDiagnosticsTrait.NetworkInterface


```
class GeneralDiagnosticsTrait.NetworkInterface : ClusterStruct
```

<br />

*** ** * ** ***

Information about a network interface.

## 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/GeneralDiagnosticsTrait.NetworkInterface.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/GeneralDiagnosticsTrait.NetworkInterface#NetworkInterface(kotlin.String,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean,kotlin.ByteArray,kotlin.collections.List,kotlin.collections.List,com.google.home.matter.standard.GeneralDiagnosticsTrait.InterfaceTypeEnum)( name: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, isOperational: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html, offPremiseServicesReachableIpv4: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html?, offPremiseServicesReachableIpv6: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html?, hardwareAddress: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html, ipv4Addresses: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html>, ipv6Addresses: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html>, type: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/GeneralDiagnosticsTrait.InterfaceTypeEnum )` Creates the NetworkInterface 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/GeneralDiagnosticsTrait.NetworkInterface#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/GeneralDiagnosticsTrait.NetworkInterface#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/-byte-array/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/GeneralDiagnosticsTrait.NetworkInterface#hardwareAddress()` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/GeneralDiagnosticsTrait.NetworkInterface#ipv4Addresses()` A list of the IPv4 addresses that are assigned to the network interface. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/GeneralDiagnosticsTrait.NetworkInterface#ipv6Addresses()` A list of the unicast IPv6 addresses that are assigned to the network interface. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/GeneralDiagnosticsTrait.NetworkInterface#isOperational()` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/GeneralDiagnosticsTrait.NetworkInterface#name()` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/GeneralDiagnosticsTrait.NetworkInterface#offPremiseServicesReachableIpv4()` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/GeneralDiagnosticsTrait.NetworkInterface#offPremiseServicesReachableIpv6()` |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/GeneralDiagnosticsTrait.InterfaceTypeEnum` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/GeneralDiagnosticsTrait.NetworkInterface#type()` |

## Public constructors

### NetworkInterface

```
NetworkInterface(
    name: String = "",
    isOperational: Boolean = false,
    offPremiseServicesReachableIpv4: Boolean? = null,
    offPremiseServicesReachableIpv6: Boolean? = null,
    hardwareAddress: ByteArray = ByteArray(0),
    ipv4Addresses: List<ByteArray> = emptyList(),
    ipv6Addresses: List<ByteArray> = emptyList(),
    type: GeneralDiagnosticsTrait.InterfaceTypeEnum = InterfaceTypeEnum.Unspecified
)
```

Creates the NetworkInterface 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

### hardwareAddress

```
val hardwareAddress: ByteArray
```

### ipv4Addresses

```
val ipv4Addresses: List<ByteArray>
```

A list of the IPv4 addresses that are assigned to the network interface.

### ipv6Addresses

```
val ipv6Addresses: List<ByteArray>
```

A list of the unicast IPv6 addresses that are assigned to the network interface. This list includes the node's link-local address and should include any assigned GUA and ULA addresses. This list must not include any multicast group addresses to which the node has subscribed.

### isOperational

```
val isOperational: Boolean
```

### name

```
val name: String
```

### offPremiseServicesReachableIpv4

```
val offPremiseServicesReachableIpv4: Boolean?
```

### offPremiseServicesReachableIpv6

```
val offPremiseServicesReachableIpv6: Boolean?
```

### type

```
val type: GeneralDiagnosticsTrait.InterfaceTypeEnum
```