Added in API level 31
    Builder
class Builder
| kotlin.Any | |
| ↳ | android.telephony.data.TrafficDescriptor.Builder | 
Provides a convenient way to set the fields of a TrafficDescriptor when creating a new instance. 
The example below shows how you might create a new TrafficDescriptor: 
<code> TrafficDescriptor response = new TrafficDescriptor.Builder() .setDnn("") .build(); </code>
Summary
| Public constructors | |
|---|---|
| Builder()Default constructor for Builder. | |
| Public methods | |
|---|---|
| TrafficDescriptor | build()Build the  | 
| TrafficDescriptor.Builder | setDataNetworkName(dnn: String)Set the Data Network Name(DNN). | 
| TrafficDescriptor.Builder | setOsAppId(osAppId: ByteArray)Set the OS App ID (including OS Id as defined in the specs). | 
Public constructors
Public methods
build
Added in API level 31
      fun build(): TrafficDescriptor
Build the TrafficDescriptor.
| Return | |
|---|---|
| TrafficDescriptor | the TrafficDescriptorobject. This value cannot benull. | 
| Exceptions | |
|---|---|
| java.lang.IllegalArgumentException | if DNN and OS App ID are null. | 
setDataNetworkName
Added in API level 31
      fun setDataNetworkName(dnn: String): TrafficDescriptor.Builder
Set the Data Network Name(DNN).
| Parameters | |
|---|---|
| dnn | String: This value cannot be null. | 
| Return | |
|---|---|
| TrafficDescriptor.Builder | The same instance of the builder. This value cannot be null. | 
setOsAppId
Added in API level 31
      fun setOsAppId(osAppId: ByteArray): TrafficDescriptor.Builder
Set the OS App ID (including OS Id as defined in the specs).
| Parameters | |
|---|---|
| osAppId | ByteArray: This value cannot be null. | 
| Return | |
|---|---|
| TrafficDescriptor.Builder | The same instance of the builder. This value cannot be null. | 
