Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder#pubctors) \| [Methods](https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder#inhmethods)

# VcnCellUnderlyingNetworkTemplate.Builder

*** ** * ** ***


`
public
static
final

class
VcnCellUnderlyingNetworkTemplate.Builder
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.net.vcn.VcnCellUnderlyingNetworkTemplate.Builder |

<br />

*** ** * ** ***

This class is used to incrementally build VcnCellUnderlyingNetworkTemplate objects.

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder#Builder()() ` Construct a Builder object. |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate` | ` https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder#build()() ` Build the VcnCellUnderlyingNetworkTemplate. |
| ` https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder` | ` https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder#setCbs(int)(int matchCriteria) ` Sets the matching criteria for CBS networks. |
| ` https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder` | ` https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder#setDun(int)(int matchCriteria) ` Sets the matching criteria for DUN networks. |
| ` https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder` | ` https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder#setIms(int)(int matchCriteria) ` Sets the matching criteria for IMS networks. |
| ` https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder` | ` https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder#setInternet(int)(int matchCriteria) ` Sets the matching criteria for INTERNET networks. |
| ` https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder` | ` https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder#setMetered(int)(int matchCriteria) ` Set the matching criteria for metered networks. |
| ` https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder` | ` https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder#setMinDownstreamBandwidthKbps(int,%20int)(int minEntryDownstreamBandwidthKbps, int minExitDownstreamBandwidthKbps) ` Set the minimum upstream bandwidths that this template will match. |
| ` https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder` | ` https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder#setMinUpstreamBandwidthKbps(int,%20int)(int minEntryUpstreamBandwidthKbps, int minExitUpstreamBandwidthKbps) ` Set the minimum upstream bandwidths that this template will match. |
| ` https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder` | ` https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder#setMms(int)(int matchCriteria) ` Sets the matching criteria for MMS networks. |
| ` https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder` | ` https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder#setOperatorPlmnIds(java.util.Set<java.lang.String>)(https://developer.android.com/reference/java/util/Set<https://developer.android.com/reference/java/lang/String> operatorPlmnIds) ` Set operator PLMN IDs with which a network can match this template. |
| ` https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder` | ` https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder#setOpportunistic(int)(int matchCriteria) ` Set the matching criteria for opportunistic cellular subscriptions. |
| ` https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder` | ` https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder#setRcs(int)(int matchCriteria) ` Sets the matching criteria for RCS networks. |
| ` https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder` | ` https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder#setRoaming(int)(int matchCriteria) ` Set the matching criteria for roaming networks. |
| ` https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder` | ` https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder#setSimSpecificCarrierIds(java.util.Set<java.lang.Integer>)(https://developer.android.com/reference/java/util/Set<https://developer.android.com/reference/java/lang/Integer> simSpecificCarrierIds) ` Set sim specific carrier IDs with which a network can match this template. |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||

## Public constructors

### Builder

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Builder ()
```

Construct a Builder object.

<br />

## Public methods

### build

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public VcnCellUnderlyingNetworkTemplate build ()
```

Build the VcnCellUnderlyingNetworkTemplate.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate` | This value cannot be `null`. <br /> |

### setCbs

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public VcnCellUnderlyingNetworkTemplate.Builder setCbs (int matchCriteria)
```

Sets the matching criteria for CBS networks.

A template where `setCbs(MATCH_REQUIRED)` is called will only match CBS networks
(ones with NET_CAPABILITY_CBS). A template where `setCbs(MATCH_FORBIDDEN)` is
called will only match networks that do not support CBS (ones without
NET_CAPABILITY_CBS).

<br />

| Parameters ||
|---|---|
| `matchCriteria` | `int`: the matching criteria for CBS networks. Defaults to `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_ANY`. Value is one of the following: - `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_ANY` - `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_REQUIRED` - `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_FORBIDDEN` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder` | This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/net/NetworkCapabilities#NET_CAPABILITY_CBS`

### setDun

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public VcnCellUnderlyingNetworkTemplate.Builder setDun (int matchCriteria)
```

Sets the matching criteria for DUN networks.

A template where `setDun(MATCH_REQUIRED)` is called will only match DUN networks
(ones with NET_CAPABILITY_DUN). A template where `setDun(MATCH_FORBIDDEN)` is
called will only match networks that do not support DUN (ones without
NET_CAPABILITY_DUN).

<br />

| Parameters ||
|---|---|
| `matchCriteria` | `int`: the matching criteria for DUN networks. Defaults to `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_ANY`. Value is one of the following: - `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_ANY` - `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_REQUIRED` - `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_FORBIDDEN` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder` | This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/net/NetworkCapabilities#NET_CAPABILITY_DUN`

### setIms

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public VcnCellUnderlyingNetworkTemplate.Builder setIms (int matchCriteria)
```

Sets the matching criteria for IMS networks.

A template where `setIms(MATCH_REQUIRED)` is called will only match IMS networks
(ones with NET_CAPABILITY_IMS). A template where `setIms(MATCH_FORBIDDEN)` is
called will only match networks that do not support IMS (ones without
NET_CAPABILITY_IMS).

<br />

| Parameters ||
|---|---|
| `matchCriteria` | `int`: the matching criteria for IMS networks. Defaults to `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_ANY`. Value is one of the following: - `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_ANY` - `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_REQUIRED` - `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_FORBIDDEN` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder` | This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/net/NetworkCapabilities#NET_CAPABILITY_IMS`

### setInternet

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public VcnCellUnderlyingNetworkTemplate.Builder setInternet (int matchCriteria)
```

Sets the matching criteria for INTERNET networks.

A template where `setInternet(MATCH_REQUIRED)` is called will only match
INTERNET networks (ones with NET_CAPABILITY_INTERNET). A template where `setInternet(MATCH_FORBIDDEN)` is called will only match networks that do not support
INTERNET (ones without NET_CAPABILITY_INTERNET).

<br />

| Parameters ||
|---|---|
| `matchCriteria` | `int`: the matching criteria for INTERNET networks. Defaults to `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_REQUIRED`. Value is one of the following: - `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_ANY` - `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_REQUIRED` - `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_FORBIDDEN` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder` | This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/net/NetworkCapabilities#NET_CAPABILITY_INTERNET`

### setMetered

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public VcnCellUnderlyingNetworkTemplate.Builder setMetered (int matchCriteria)
```

Set the matching criteria for metered networks.

A template where setMetered(MATCH_REQUIRED) will only match metered networks (one
without NET_CAPABILITY_NOT_METERED). A template where setMetered(MATCH_FORBIDDEN) will
only match a network that is not metered (one with NET_CAPABILITY_NOT_METERED).

<br />

| Parameters ||
|---|---|
| `matchCriteria` | `int`: the matching criteria for metered networks. Defaults to `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_ANY`. Value is one of the following: - `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_ANY` - `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_REQUIRED` - `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_FORBIDDEN` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder` | This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/net/NetworkCapabilities#NET_CAPABILITY_NOT_METERED`

### setMinDownstreamBandwidthKbps

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public VcnCellUnderlyingNetworkTemplate.Builder setMinDownstreamBandwidthKbps (int minEntryDownstreamBandwidthKbps, 
                int minExitDownstreamBandwidthKbps)
```

Set the minimum upstream bandwidths that this template will match.

This template will not match a network that does not provide at least the bandwidth
passed as the entry bandwidth, except in the case that the network is selected as the VCN
Gateway Connection's underlying network, where it will continue to match until the
bandwidth drops under the exit bandwidth.

The entry criteria MUST be greater than, or equal to the exit criteria to avoid the
invalid case where a network fulfills the entry criteria, but at the same time fails the
exit criteria.

Estimated bandwidth of a network is provided by the transport layer, and reported in
`https://developer.android.com/reference/android/net/NetworkCapabilities`. The provided estimates will be used without modification.

<br />

| Parameters ||
|---|---|
| `minEntryDownstreamBandwidthKbps` | `int`: the minimum accepted downstream bandwidth for networks that ARE NOT the already-selected underlying network, or `0` to disable this requirement. Disabled by default. <br /> |
| `minExitDownstreamBandwidthKbps` | `int`: the minimum accepted downstream bandwidth for a network that IS the already-selected underlying network, or `0` to disable this requirement. Disabled by default. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder` | this `https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder` instance, for chaining. This value cannot be `null`. <br /> |

### setMinUpstreamBandwidthKbps

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public VcnCellUnderlyingNetworkTemplate.Builder setMinUpstreamBandwidthKbps (int minEntryUpstreamBandwidthKbps, 
                int minExitUpstreamBandwidthKbps)
```

Set the minimum upstream bandwidths that this template will match.

This template will not match a network that does not provide at least the bandwidth
passed as the entry bandwidth, except in the case that the network is selected as the VCN
Gateway Connection's underlying network, where it will continue to match until the
bandwidth drops under the exit bandwidth.

The entry criteria MUST be greater than, or equal to the exit criteria to avoid the
invalid case where a network fulfills the entry criteria, but at the same time fails the
exit criteria.

Estimated bandwidth of a network is provided by the transport layer, and reported in
`https://developer.android.com/reference/android/net/NetworkCapabilities`. The provided estimates will be used without modification.

<br />

| Parameters ||
|---|---|
| `minEntryUpstreamBandwidthKbps` | `int`: the minimum accepted upstream bandwidth for networks that ARE NOT the already-selected underlying network, or `0` to disable this requirement. Disabled by default. <br /> |
| `minExitUpstreamBandwidthKbps` | `int`: the minimum accepted upstream bandwidth for a network that IS the already-selected underlying network, or `0` to disable this requirement. Disabled by default. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder` | this `https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder` instance, for chaining. This value cannot be `null`. <br /> |

### setMms

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public VcnCellUnderlyingNetworkTemplate.Builder setMms (int matchCriteria)
```

Sets the matching criteria for MMS networks.

A template where `setMms(MATCH_REQUIRED)` is called will only match MMS networks
(ones with NET_CAPABILITY_MMS). A template where `setMms(MATCH_FORBIDDEN)` is
called will only match networks that do not support MMS (ones without
NET_CAPABILITY_MMS).

<br />

| Parameters ||
|---|---|
| `matchCriteria` | `int`: the matching criteria for MMS networks. Defaults to `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_ANY`. Value is one of the following: - `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_ANY` - `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_REQUIRED` - `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_FORBIDDEN` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder` | This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/net/NetworkCapabilities#NET_CAPABILITY_MMS`

### setOperatorPlmnIds

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public VcnCellUnderlyingNetworkTemplate.Builder setOperatorPlmnIds (Set<String> operatorPlmnIds)
```

Set operator PLMN IDs with which a network can match this template.

This is used to distinguish cases where roaming agreements may dictate a different
priority from a partner's networks.

<br />

| Parameters ||
|---|---|
| `operatorPlmnIds` | `Set`: the matching operator PLMN IDs in String. Network with one of the matching PLMN IDs can match this template. If the set is empty, any PLMN ID will match. The default is an empty set. A valid PLMN is a concatenation of MNC and MCC, and thus consists of 5 or 6 decimal digits. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder` | This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/telephony/SubscriptionInfo#getMccString()`
- `https://developer.android.com/reference/android/telephony/SubscriptionInfo#getMncString()`

### setOpportunistic

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public VcnCellUnderlyingNetworkTemplate.Builder setOpportunistic (int matchCriteria)
```

Set the matching criteria for opportunistic cellular subscriptions.

<br />

| Parameters ||
|---|---|
| `matchCriteria` | `int`: the matching criteria for opportunistic cellular subscriptions. Defaults to `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_ANY`. Value is one of the following: - `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_ANY` - `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_REQUIRED` - `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_FORBIDDEN` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder` | This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/telephony/SubscriptionManager#setOpportunistic(boolean,%20int)`

### setRcs

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public VcnCellUnderlyingNetworkTemplate.Builder setRcs (int matchCriteria)
```

Sets the matching criteria for RCS networks.

A template where `setRcs(MATCH_REQUIRED)` is called will only match RCS networks
(ones with NET_CAPABILITY_RCS). A template where `setRcs(MATCH_FORBIDDEN)` is
called will only match networks that do not support RCS (ones without
NET_CAPABILITY_RCS).

<br />

| Parameters ||
|---|---|
| `matchCriteria` | `int`: the matching criteria for RCS networks. Defaults to `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_ANY`. Value is one of the following: - `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_ANY` - `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_REQUIRED` - `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_FORBIDDEN` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder` | This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/net/NetworkCapabilities#NET_CAPABILITY_RCS`

### setRoaming

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public VcnCellUnderlyingNetworkTemplate.Builder setRoaming (int matchCriteria)
```

Set the matching criteria for roaming networks.

A template where setRoaming(MATCH_REQUIRED) will only match roaming networks (one
without NET_CAPABILITY_NOT_ROAMING). A template where setRoaming(MATCH_FORBIDDEN) will
only match a network that is not roaming (one with NET_CAPABILITY_NOT_ROAMING).

<br />

| Parameters ||
|---|---|
| `matchCriteria` | `int`: the matching criteria for roaming networks. Defaults to `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_ANY`. Value is one of the following: - `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_ANY` - `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_REQUIRED` - `https://developer.android.com/reference/android/net/vcn/VcnUnderlyingNetworkTemplate#MATCH_FORBIDDEN` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder` | This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/net/NetworkCapabilities#NET_CAPABILITY_NOT_ROAMING`

### setSimSpecificCarrierIds

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public VcnCellUnderlyingNetworkTemplate.Builder setSimSpecificCarrierIds (Set<Integer> simSpecificCarrierIds)
```

Set sim specific carrier IDs with which a network can match this template.

<br />

| Parameters ||
|---|---|
| `simSpecificCarrierIds` | `Set`: the matching sim specific carrier IDs. Network with one of the sim specific carrier IDs can match this template. If the set is empty, any carrier ID will match. The default is an empty set. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/vcn/VcnCellUnderlyingNetworkTemplate.Builder` | This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/telephony/TelephonyManager#getSimSpecificCarrierId()`