MpzPassGroupMetadata

data class MpzPassGroupMetadata(val displayName: Map<String, String>, val description: Map<String, String>? = null, val icon: Icon? = null, val sensitivity: DocumentAttributeSensitivity = DocumentAttributeSensitivity.PII, val minClaimsToGroup: Int = 2)

Represents display, sensitivity, and grouping threshold metadata for a logical group of claims within an MpzPass container.

Throws

if displayName is empty, if description is non-null and empty, or if minClaimsToGroup is less than 1.

Constructors

Link copied to clipboard
constructor(displayName: Map<String, String>, description: Map<String, String>? = null, icon: Icon? = null, sensitivity: DocumentAttributeSensitivity = DocumentAttributeSensitivity.PII, minClaimsToGroup: Int = 2)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Optional localized descriptions keyed by BCP 47 language tag. If non-null, must contain at least one entry.

Link copied to clipboard

Localized display names keyed by BCP 47 language tag (e.g., "en-US", "ja"), or "" for a language-neutral default. Must contain at least one entry.

Link copied to clipboard
val icon: Icon?

Optional Icon for the grouped pseudo-claim.

Link copied to clipboard

Minimum number of requested claims in this group required before collapsing into the pseudo-claim; defaults to 2. Must be at least 1.

Link copied to clipboard

Sensitivity classification of the grouped pseudo-claim; defaults to DocumentAttributeSensitivity.PII.

Functions

Link copied to clipboard
fun getDescription(locales: List<String> = emptyList()): String?

Gets the description of the group in the language which best matches locales, or null if description is not set.

Link copied to clipboard
fun getDisplayName(locales: List<String> = emptyList()): String

Gets the display name of the group in the language which best matches locales.

Link copied to clipboard

Serializes this MpzPassGroupMetadata to CBOR bytes.

Link copied to clipboard

Serializes this MpzPassGroupMetadata into a CBOR map DataItem.