MpzPassClaimMetadata

data class MpzPassClaimMetadata(val displayName: Map<String, String>, val description: Map<String, String>? = null, val type: DocumentAttributeType = DocumentAttributeType.String, val icon: Icon? = null, val sensitivity: DocumentAttributeSensitivity = DocumentAttributeSensitivity.PII, val groupId: String? = null)

Represents display and sensitivity metadata for a single claim within an MpzPass container.

Throws

Constructors

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

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

Optional identifier of the group in MpzPassMetadata.claimGroupsMetadata that this claim belongs to.

Link copied to clipboard
val icon: Icon?

Optional Icon for the claim.

Link copied to clipboard

Sensitivity classification of the claim; defaults to DocumentAttributeSensitivity.PII.

Functions

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

Gets the description of the claim 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 claim in the language which best matches locales.

Link copied to clipboard

Serializes this MpzPassClaimMetadata to CBOR bytes.

Link copied to clipboard

Serializes this MpzPassClaimMetadata into a CBOR map DataItem.