# ThreadNetworkCredentials

public final class **ThreadNetworkCredentials** extends [Object](https://developer.android.com/reference/java/lang/Object.html)  
implements [Parcelable](https://developer.android.com/reference/android/os/Parcelable.html) Data interface for managing Thread Network Credentials.

An example usage of creating Thread Network Credentials with random Active Operational
Dataset:

    ThreadNetworkCredentials threadCredentials =
         ThreadNetworkCredentials.newRandomizedBuilder().build();
     
or random Dataset with given Network Name:

    ThreadNetworkCredentials threadCredentials =
       ThreadNetworkCredentials.newRandomizedBuilder()
         .setNetworkName("MyThreadNet")
         .build();
     
If the Thread Active Operational Dataset is already known, you can simply use:

    ThreadNetworkCredentials threadCredentials =
         ThreadNetworkCredentials.fromActiveOperationalDataset(activeOperationalDataset);
     
To retrieve Thread network credentials from the `https://developers.home.google.com/android/reference/androidx/activity/result/ActivityResult` of the `https://developer.android.com/reference/android/content/IntentSender.html` returned by `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkClient` APIs, use `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#fromIntentSenderResultData(android.content.Intent)`:

    ThreadNetworkCredentials threadCredentials =
         ThreadNetworkCredentials.fromIntentSenderResultData(activityResult.getData());
     
### Nested Class Summary

|---|---|---|---|
| class | [ThreadNetworkCredentials.Builder](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.Builder) || Builder for constructing `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials` instances. |
| class | [ThreadNetworkCredentials.ChannelMaskEntry](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.ChannelMaskEntry) || The Channel Mask Entry of Thread Operational Dataset. |
| class | [ThreadNetworkCredentials.SecurityPolicy](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.SecurityPolicy) || The class represents Thread Security Policy. |
| class | [ThreadNetworkCredentials.Timestamp](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.Timestamp) || The timestamp of Thread Operational Dataset. |

### Constant Summary

|---|---|---|
| int | [CHANNEL_MAX_2P4GHZ](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#CHANNEL_MAX_2P4GHZ) | The maximum 2.4GHz channel. |
| int | [CHANNEL_MIN_2P4GHZ](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#CHANNEL_MIN_2P4GHZ) | The minimum 2.4GHz channel. |
| int | [CHANNEL_PAGE_2P4GHZ](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#CHANNEL_PAGE_2P4GHZ) | The 2.4 GHz channel page. |
| int | [LENGTH_EXTENDED_PANID](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#LENGTH_EXTENDED_PANID) | The length of Extended PAN ID that can be set by `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.Builder#setExtendedPanId(byte[])`. |
| int | [LENGTH_MAX_NETWORK_NAME](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#LENGTH_MAX_NETWORK_NAME) | The maximum length of NetworkName that can be set by `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.Builder#setNetworkName(java.lang.String)`. |
| int | [LENGTH_MAX_OPERATIONAL_DATASET](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#LENGTH_MAX_OPERATIONAL_DATASET) | The maximum length of Operational Dataset that can be set by `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#fromActiveOperationalDataset(byte[])`. |
| int | [LENGTH_MAX_SECURITY_POLICY_FLAGS](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#LENGTH_MAX_SECURITY_POLICY_FLAGS) | The maximum length of Security Policy Flags that can be set by `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.SecurityPolicy#SecurityPolicy(int,%20byte[])`. |
| int | [LENGTH_MESH_LOCAL_PREFIX](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#LENGTH_MESH_LOCAL_PREFIX) | The length of Mesh-Local Prefix that can be set by `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.Builder#setMeshLocalPrefix(byte[])`. |
| int | [LENGTH_MIN_NETWORK_NAME](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#LENGTH_MIN_NETWORK_NAME) | The minimum length of Network Name that can be set by `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.Builder#setNetworkName(java.lang.String)`. |
| int | [LENGTH_MIN_SECURITY_POLICY_FLAGS](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#LENGTH_MIN_SECURITY_POLICY_FLAGS) | The minimum length of Security Policy Flags that can be set by `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.SecurityPolicy#SecurityPolicy(int,%20byte[])`. |
| int | [LENGTH_NETWORK_KEY](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#LENGTH_NETWORK_KEY) | The length of Network Key that can be set by `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.Builder#setNetworkKey(byte[])`. |
| int | [LENGTH_PSKC](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#LENGTH_PSKC) | The length of PSKc that can be set by `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.Builder#setPskc(byte[])`. |
| byte | [MESH_LOCAL_PREFIX_FIRST_BYTE](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#MESH_LOCAL_PREFIX_FIRST_BYTE) | The fisrt byte of Mesh-Local Prefix that can be set by `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.Builder#setMeshLocalPrefix(byte[])`. |

### Inherited Constant Summary

From interface android.os.Parcelable

|---|---|---|
| int | CONTENTS_FILE_DESCRIPTOR |   |
| int | PARCELABLE_WRITE_RETURN_VALUE |   |

### Field Summary

|---|---|---|
| public static final [ThreadNetworkCredentials.ChannelMaskEntry](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.ChannelMaskEntry) | [DEFAULT_CHANNEL_MASK](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#DEFAULT_CHANNEL_MASK) | The default channel mask which enables all 2.4GHz channels. |
| public static final [ThreadNetworkCredentials.SecurityPolicy](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.SecurityPolicy) | [DEFAULT_SECURITY_POLICY](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#DEFAULT_SECURITY_POLICY) | The default Thread 1.2 Security Policy. |

### Public Method Summary

|---|---|
| static [ThreadNetworkCredentials](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials) | [fromActiveOperationalDataset](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#fromActiveOperationalDataset(byte[]))(byte\[\] activeOperationalDataset) Creates a new `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials` instance with given Thread Active Operational Dataset which is encoded as Thread TLV list. |
| static [ThreadNetworkCredentials](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials) | [fromIntentSenderResultData](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#fromIntentSenderResultData(android.content.Intent))([Intent](https://developer.android.com/reference/android/content/Intent.html) data) Parses out the data from the `https://developers.home.google.com/android/reference/androidx/activity/result/ActivityResult` returned by `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkClient#getPreferredCredentials()` or `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkClient#getCredentialsByExtendedPanId(byte[])`. |
| byte\[\] | [getActiveOperationalDataset](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#getActiveOperationalDataset())() Returns the Thread active operational dataset as encoded Thread TLV list. |
| [ThreadNetworkCredentials.Timestamp](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.Timestamp) | [getActiveTimestamp](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#getActiveTimestamp())() Returns the Active Timestamp in the Thread active operational dataset. |
| int | [getChannel](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#getChannel())() Returns the Channel in the Thread active operational dataset. |
| [Set](https://developer.android.com/reference/java/util/Set.html)\<[ThreadNetworkCredentials.ChannelMaskEntry](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.ChannelMaskEntry)\> | [getChannelMasks](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#getChannelMasks())() Returns the Channel Masks in the Thread active operational dataset. |
| int | [getChannelPage](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#getChannelPage())() Returns the Channel Page in the Thread active operational dataset. |
| long | [getCreatedAtMillis](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#getCreatedAtMillis())() Returns the Unix epoch in Milliseconds the `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials` instance is created at. |
| byte\[\] | [getExtendedPanId](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#getExtendedPanId())() Returns the Extended PAN ID in the Thread active operational dataset. |
| byte\[\] | [getMeshLocalPrefix](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#getMeshLocalPrefix())() Returns the Mesh-Local Prefix in the Thread active operational dataset. |
| byte\[\] | [getNetworkKey](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#getNetworkKey())() Returns the Network Key in the Thread active operational dataset. |
| [String](https://developer.android.com/reference/java/lang/String.html) | [getNetworkName](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#getNetworkName())() Returns the network name if it is included in the Thread active operational dataset. |
| int | [getPanId](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#getPanId())() Returns the PAN ID in the Thread active operational dataset. |
| byte\[\] | [getPskc](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#getPskc())() Returns the PSKc in the Thread active operational dataset. |
| [ThreadNetworkCredentials.SecurityPolicy](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.SecurityPolicy) | [getSecurityPolicy](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#getSecurityPolicy())() Returns the Security Policy in the Thread active operational dataset. |
| long | [getUpdatedAtMillis](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#getUpdatedAtMillis())() Returns the Unix epoch in Milliseconds the `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials` instance is updated at. |
| static [ThreadNetworkCredentials.Builder](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.Builder) | [newRandomizedBuilder](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#newRandomizedBuilder())() Creates a new `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.Builder` instance for creating `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials` instances with randomly generated credentials. |
| static [List](https://developer.android.com/reference/java/util/List.html)\<[ThreadNetworkCredentials](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials)\> | [parseListFromIntentSenderResultData](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#parseListFromIntentSenderResultData(android.content.Intent))([Intent](https://developer.android.com/reference/android/content/Intent.html) data) Parses out a list of `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials` from the `https://developers.home.google.com/android/reference/androidx/activity/result/ActivityResult` returned by `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkClient#getAllActiveCredentials(com.google.android.gms.threadnetwork.GetAllActiveCredentialsRequest)`. |
| [String](https://developer.android.com/reference/java/lang/String.html) | [toString](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#toString())() |
| void | [writeToParcel](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#writeToParcel(android.os.Parcel,%20int))([Parcel](https://developer.android.com/reference/android/os/Parcel.html) dest, int flags) |

### Inherited Method Summary

From class java.lang.Object

|---|---|
| [Object](https://developer.android.com/reference/java/lang/Object.html) | clone() |
| boolean | equals([Object](https://developer.android.com/reference/java/lang/Object.html) arg0) |
| void | finalize() |
| final [Class](https://developer.android.com/reference/java/lang/Class.html)\<?\> | getClass() |
| int | hashCode() |
| final void | notify() |
| final void | notifyAll() |
| [String](https://developer.android.com/reference/java/lang/String.html) | toString() |
| final void | wait(long arg0, int arg1) |
| final void | wait(long arg0) |
| final void | wait() |

From interface android.os.Parcelable

|---|---|
| abstract int | describeContents() |
| abstract void | writeToParcel([Parcel](https://developer.android.com/reference/android/os/Parcel.html) arg0, int arg1) |

## Constants

#### public static final int
**CHANNEL_MAX_2P4GHZ**

The maximum 2.4GHz channel.
Constant Value: 26

#### public static final int
**CHANNEL_MIN_2P4GHZ**

The minimum 2.4GHz channel.
Constant Value: 11

#### public static final int
**CHANNEL_PAGE_2P4GHZ**

The 2.4 GHz channel page.
Constant Value: 0

#### public static final int
**LENGTH_EXTENDED_PANID**

The length of Extended PAN ID that can be set by `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.Builder#setExtendedPanId(byte[])`.
Constant Value: 8

#### public static final int
**LENGTH_MAX_NETWORK_NAME**

The maximum length of NetworkName that can be set by `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.Builder#setNetworkName(java.lang.String)`.
Constant Value: 16

#### public static final int
**LENGTH_MAX_OPERATIONAL_DATASET**

The maximum length of Operational Dataset that can be set by `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#fromActiveOperationalDataset(byte[])`.
Constant Value: 254

#### public static final int
**LENGTH_MAX_SECURITY_POLICY_FLAGS**

The maximum length of Security Policy Flags that can be set by `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.SecurityPolicy#SecurityPolicy(int,%20byte[])`.
Constant Value: 2

#### public static final int
**LENGTH_MESH_LOCAL_PREFIX**

The length of Mesh-Local Prefix that can be set by `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.Builder#setMeshLocalPrefix(byte[])`.
Constant Value: 8

#### public static final int
**LENGTH_MIN_NETWORK_NAME**

The minimum length of Network Name that can be set by `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.Builder#setNetworkName(java.lang.String)`.
Constant Value: 1

#### public static final int
**LENGTH_MIN_SECURITY_POLICY_FLAGS**

The minimum length of Security Policy Flags that can be set by `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.SecurityPolicy#SecurityPolicy(int,%20byte[])`.
Constant Value: 1

#### public static final int
**LENGTH_NETWORK_KEY**

The length of Network Key that can be set by `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.Builder#setNetworkKey(byte[])`.
Constant Value: 16

#### public static final int
**LENGTH_PSKC**

The length of PSKc that can be set by `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.Builder#setPskc(byte[])`.
Constant Value: 16

#### public static final byte
**MESH_LOCAL_PREFIX_FIRST_BYTE**

The fisrt byte of Mesh-Local Prefix that can be set by `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.Builder#setMeshLocalPrefix(byte[])`.
Constant Value: -3

## Fields

#### public static final [ThreadNetworkCredentials.ChannelMaskEntry](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.ChannelMaskEntry)
**DEFAULT_CHANNEL_MASK**

The default channel mask which enables all 2.4GHz channels.

#### public static final [ThreadNetworkCredentials.SecurityPolicy](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.SecurityPolicy)
**DEFAULT_SECURITY_POLICY**

The default Thread 1.2 Security Policy.

## Public Methods

#### public static [ThreadNetworkCredentials](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials)
**fromActiveOperationalDataset** (byte\[\] activeOperationalDataset)

Creates a new `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials` instance with given Thread Active Operational
Dataset which is encoded as Thread TLV list.

##### Throws

| [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException.html) | if length of `activeOperationalDataset` is larger than `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#LENGTH_MAX_OPERATIONAL_DATASET`, `activeOperationalDataset` is malformed or there are missing Thread TLVs. |
|---|---|

#### public static [ThreadNetworkCredentials](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials)
**fromIntentSenderResultData** ([Intent](https://developer.android.com/reference/android/content/Intent.html) data)

Parses out the data from the `https://developers.home.google.com/android/reference/androidx/activity/result/ActivityResult`
returned by `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkClient#getPreferredCredentials()` or `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkClient#getCredentialsByExtendedPanId(byte[])`. This method
should only be called for a success case to interpret the result data.

##### Throws

| [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException.html) | if no valid Thread credentials included in `data`. |
|---|---|

#### public byte\[\] **getActiveOperationalDataset** ()

Returns the Thread active operational dataset as encoded Thread TLV list.

#### public [ThreadNetworkCredentials.Timestamp](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.Timestamp) **getActiveTimestamp** ()

Returns the Active Timestamp in the Thread active operational dataset.

#### public int **getChannel** ()

Returns the Channel in the Thread active operational dataset.

#### public [Set](https://developer.android.com/reference/java/util/Set.html)\<[ThreadNetworkCredentials.ChannelMaskEntry](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.ChannelMaskEntry)\>
**getChannelMasks** ()

Returns the Channel Masks in the Thread active operational dataset.

#### public int **getChannelPage** ()

Returns the Channel Page in the Thread active operational dataset.

#### public long **getCreatedAtMillis** ()

Returns the Unix epoch in Milliseconds the `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials` instance is created at. Note that this is the time
when the Thread network credentials is first added to the Thread Network service via
`https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkClient#addCredentials(com.google.android.gms.threadnetwork.ThreadBorderAgent,%20com.google.android.gms.threadnetwork.ThreadNetworkCredentials)`. Zero will be returned if this instance is not
returned by `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkClient`
methods (e.g. created with `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#fromActiveOperationalDataset(byte[])`).

#### public byte\[\] **getExtendedPanId** ()

Returns the Extended PAN ID in the Thread active operational dataset.

#### public byte\[\] **getMeshLocalPrefix** ()

Returns the Mesh-Local Prefix in the Thread active operational dataset.

#### public byte\[\] **getNetworkKey** ()

Returns the Network Key in the Thread active operational dataset.

#### public [String](https://developer.android.com/reference/java/lang/String.html) **getNetworkName** ()

Returns the network name if it is included in the Thread active operational
dataset.

#### public int **getPanId** ()

Returns the PAN ID in the Thread active operational dataset.

#### public byte\[\] **getPskc** ()

Returns the PSKc in the Thread active operational dataset.

#### public [ThreadNetworkCredentials.SecurityPolicy](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.SecurityPolicy) **getSecurityPolicy** ()

Returns the Security Policy in the Thread active operational dataset.

#### public long **getUpdatedAtMillis** ()

Returns the Unix epoch in Milliseconds the `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials` instance is updated at. Note that this is the time
when the Thread network credentials was last added/updated to the Thread Network
service via `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkClient#addCredentials(com.google.android.gms.threadnetwork.ThreadBorderAgent,%20com.google.android.gms.threadnetwork.ThreadNetworkCredentials)`. Zero will be returned if this instance is not
returned by `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkClient`
methods (e.g. created with `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials#fromActiveOperationalDataset(byte[])`).

#### public static [ThreadNetworkCredentials.Builder](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.Builder) **newRandomizedBuilder** ()

Creates a new `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.Builder` instance for creating `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials` instances with randomly generated credentials.

If there are requirements on specific parameters, set it explicitly with their
setters in `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.Builder`. For example, it's likely that a readable
Thread Network Name should be set with `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials.Builder#setNetworkName(java.lang.String)`.

#### public static [List](https://developer.android.com/reference/java/util/List.html)\<[ThreadNetworkCredentials](https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials)\>
**parseListFromIntentSenderResultData**
([Intent](https://developer.android.com/reference/android/content/Intent.html) data)

Parses out a list of `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkCredentials` from the `https://developers.home.google.com/android/reference/androidx/activity/result/ActivityResult`
returned by `https://developers.home.google.com/android/reference/com/google/android/gms/threadnetwork/ThreadNetworkClient#getAllActiveCredentials(com.google.android.gms.threadnetwork.GetAllActiveCredentialsRequest)`.
This method should only be called for a success case to interpret the result data.

##### Throws

| [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException.html) | if no valid Thread credentials included in `data`. |
|---|---|

#### public [String](https://developer.android.com/reference/java/lang/String.html) **toString** ()

#### public void **writeToParcel** ([Parcel](https://developer.android.com/reference/android/os/Parcel.html) dest, int flags)