Added in API level 33

Builder

class Builder
kotlin.Any
   ↳ android.net.vcn.VcnCellUnderlyingNetworkTemplate.Builder

This class is used to incrementally build VcnCellUnderlyingNetworkTemplate objects.

Summary

Public constructors

Construct a Builder object.

Public methods
VcnCellUnderlyingNetworkTemplate

Build the VcnCellUnderlyingNetworkTemplate.

VcnCellUnderlyingNetworkTemplate.Builder
setCbs(matchCriteria: Int)

Sets the matching criteria for CBS networks.

VcnCellUnderlyingNetworkTemplate.Builder
setDun(matchCriteria: Int)

Sets the matching criteria for DUN networks.

VcnCellUnderlyingNetworkTemplate.Builder
setIms(matchCriteria: Int)

Sets the matching criteria for IMS networks.

VcnCellUnderlyingNetworkTemplate.Builder
setInternet(matchCriteria: Int)

Sets the matching criteria for INTERNET networks.

VcnCellUnderlyingNetworkTemplate.Builder
setMetered(matchCriteria: Int)

Set the matching criteria for metered networks.

VcnCellUnderlyingNetworkTemplate.Builder
setMinDownstreamBandwidthKbps(minEntryDownstreamBandwidthKbps: Int, minExitDownstreamBandwidthKbps: Int)

Set the minimum upstream bandwidths that this template will match.

VcnCellUnderlyingNetworkTemplate.Builder
setMinUpstreamBandwidthKbps(minEntryUpstreamBandwidthKbps: Int, minExitUpstreamBandwidthKbps: Int)

Set the minimum upstream bandwidths that this template will match.

VcnCellUnderlyingNetworkTemplate.Builder
setMms(matchCriteria: Int)

Sets the matching criteria for MMS networks.

VcnCellUnderlyingNetworkTemplate.Builder
setOperatorPlmnIds(operatorPlmnIds: MutableSet<String!>)

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

VcnCellUnderlyingNetworkTemplate.Builder
setOpportunistic(matchCriteria: Int)

Set the matching criteria for opportunistic cellular subscriptions.

VcnCellUnderlyingNetworkTemplate.Builder
setRcs(matchCriteria: Int)

Sets the matching criteria for RCS networks.

VcnCellUnderlyingNetworkTemplate.Builder
setRoaming(matchCriteria: Int)

Set the matching criteria for roaming networks.

VcnCellUnderlyingNetworkTemplate.Builder
setSimSpecificCarrierIds(simSpecificCarrierIds: MutableSet<Int!>)

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

Public constructors

Builder

Added in API level 33
Builder()

Construct a Builder object.

Public methods

build

Added in API level 33
fun build(): VcnCellUnderlyingNetworkTemplate

Build the VcnCellUnderlyingNetworkTemplate.

Return
VcnCellUnderlyingNetworkTemplate This value cannot be null.

setCbs

Added in API level 34
fun setCbs(matchCriteria: Int): VcnCellUnderlyingNetworkTemplate.Builder

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).

Parameters
matchCriteria Int: the matching criteria for CBS networks. Defaults to MATCH_ANY. Value is android.net.vcn.VcnUnderlyingNetworkTemplate#MATCH_ANY, android.net.vcn.VcnUnderlyingNetworkTemplate#MATCH_REQUIRED, or android.net.vcn.VcnUnderlyingNetworkTemplate#MATCH_FORBIDDEN
Return
VcnCellUnderlyingNetworkTemplate.Builder This value cannot be null.

setDun

Added in API level 34
fun setDun(matchCriteria: Int): VcnCellUnderlyingNetworkTemplate.Builder

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).

Parameters
matchCriteria Int: the matching criteria for DUN networks. Defaults to MATCH_ANY. Value is android.net.vcn.VcnUnderlyingNetworkTemplate#MATCH_ANY, android.net.vcn.VcnUnderlyingNetworkTemplate#MATCH_REQUIRED, or android.net.vcn.VcnUnderlyingNetworkTemplate#MATCH_FORBIDDEN
Return
VcnCellUnderlyingNetworkTemplate.Builder This value cannot be null.

setIms

Added in API level 34
fun setIms(matchCriteria: Int): VcnCellUnderlyingNetworkTemplate.Builder

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).

Parameters
matchCriteria Int: the matching criteria for IMS networks. Defaults to MATCH_ANY. Value is android.net.vcn.VcnUnderlyingNetworkTemplate#MATCH_ANY, android.net.vcn.VcnUnderlyingNetworkTemplate#MATCH_REQUIRED, or android.net.vcn.VcnUnderlyingNetworkTemplate#MATCH_FORBIDDEN
Return
VcnCellUnderlyingNetworkTemplate.Builder This value cannot be null.

setInternet

Added in API level 34
fun setInternet(matchCriteria: Int): VcnCellUnderlyingNetworkTemplate.Builder

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).

Parameters
matchCriteria Int: the matching criteria for INTERNET networks. Defaults to MATCH_REQUIRED. Value is android.net.vcn.VcnUnderlyingNetworkTemplate#MATCH_ANY, android.net.vcn.VcnUnderlyingNetworkTemplate#MATCH_REQUIRED, or android.net.vcn.VcnUnderlyingNetworkTemplate#MATCH_FORBIDDEN
Return
VcnCellUnderlyingNetworkTemplate.Builder This value cannot be null.

setMetered

Added in API level 33
fun setMetered(matchCriteria: Int): VcnCellUnderlyingNetworkTemplate.Builder

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).

Parameters
matchCriteria Int: the matching criteria for metered networks. Defaults to MATCH_ANY. Value is android.net.vcn.VcnUnderlyingNetworkTemplate#MATCH_ANY, android.net.vcn.VcnUnderlyingNetworkTemplate#MATCH_REQUIRED, or android.net.vcn.VcnUnderlyingNetworkTemplate#MATCH_FORBIDDEN
Return
VcnCellUnderlyingNetworkTemplate.Builder This value cannot be null.

setMinDownstreamBandwidthKbps

Added in API level 33
fun setMinDownstreamBandwidthKbps(
    minEntryDownstreamBandwidthKbps: Int,
    minExitDownstreamBandwidthKbps: Int
): VcnCellUnderlyingNetworkTemplate.Builder

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 NetworkCapabilities. The provided estimates will be used without modification.

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.
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.
Return
VcnCellUnderlyingNetworkTemplate.Builder this Builder instance, for chaining This value cannot be null.

setMinUpstreamBandwidthKbps

Added in API level 33
fun setMinUpstreamBandwidthKbps(
    minEntryUpstreamBandwidthKbps: Int,
    minExitUpstreamBandwidthKbps: Int
): VcnCellUnderlyingNetworkTemplate.Builder

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 NetworkCapabilities. The provided estimates will be used without modification.

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.
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.
Return
VcnCellUnderlyingNetworkTemplate.Builder this Builder instance, for chaining This value cannot be null.

setMms

Added in API level 34
fun setMms(matchCriteria: Int): VcnCellUnderlyingNetworkTemplate.Builder

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).

Parameters
matchCriteria Int: the matching criteria for MMS networks. Defaults to MATCH_ANY. Value is android.net.vcn.VcnUnderlyingNetworkTemplate#MATCH_ANY, android.net.vcn.VcnUnderlyingNetworkTemplate#MATCH_REQUIRED, or android.net.vcn.VcnUnderlyingNetworkTemplate#MATCH_FORBIDDEN
Return
VcnCellUnderlyingNetworkTemplate.Builder This value cannot be null.

setOperatorPlmnIds

Added in API level 33
fun setOperatorPlmnIds(operatorPlmnIds: MutableSet<String!>): VcnCellUnderlyingNetworkTemplate.Builder

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.

Parameters
operatorPlmnIds MutableSet<String!>: 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.
Return
VcnCellUnderlyingNetworkTemplate.Builder This value cannot be null.

setOpportunistic

Added in API level 33
fun setOpportunistic(matchCriteria: Int): VcnCellUnderlyingNetworkTemplate.Builder

Set the matching criteria for opportunistic cellular subscriptions.

Parameters
matchCriteria Int: the matching criteria for opportunistic cellular subscriptions. Defaults to MATCH_ANY. Value is android.net.vcn.VcnUnderlyingNetworkTemplate#MATCH_ANY, android.net.vcn.VcnUnderlyingNetworkTemplate#MATCH_REQUIRED, or android.net.vcn.VcnUnderlyingNetworkTemplate#MATCH_FORBIDDEN
Return
VcnCellUnderlyingNetworkTemplate.Builder This value cannot be null.

setRcs

Added in API level 34
fun setRcs(matchCriteria: Int): VcnCellUnderlyingNetworkTemplate.Builder

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).

Parameters
matchCriteria Int: the matching criteria for RCS networks. Defaults to MATCH_ANY. Value is android.net.vcn.VcnUnderlyingNetworkTemplate#MATCH_ANY, android.net.vcn.VcnUnderlyingNetworkTemplate#MATCH_REQUIRED, or android.net.vcn.VcnUnderlyingNetworkTemplate#MATCH_FORBIDDEN
Return
VcnCellUnderlyingNetworkTemplate.Builder This value cannot be null.

setRoaming

Added in API level 33
fun setRoaming(matchCriteria: Int): VcnCellUnderlyingNetworkTemplate.Builder

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).

Parameters
matchCriteria Int: the matching criteria for roaming networks. Defaults to MATCH_ANY. Value is android.net.vcn.VcnUnderlyingNetworkTemplate#MATCH_ANY, android.net.vcn.VcnUnderlyingNetworkTemplate#MATCH_REQUIRED, or android.net.vcn.VcnUnderlyingNetworkTemplate#MATCH_FORBIDDEN
Return
VcnCellUnderlyingNetworkTemplate.Builder This value cannot be null.

setSimSpecificCarrierIds

Added in API level 33
fun setSimSpecificCarrierIds(simSpecificCarrierIds: MutableSet<Int!>): VcnCellUnderlyingNetworkTemplate.Builder

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

Parameters
simSpecificCarrierIds MutableSet<Int!>: 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.
Return
VcnCellUnderlyingNetworkTemplate.Builder This value cannot be null.