From 3bab9c93e6c71cf95eec407e8c1a91f6f6a3cb5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Uek=C3=B6tter?= Date: Thu, 29 Aug 2024 18:47:22 +0200 Subject: [PATCH] Add JsonKey with name (#78) --- passkit/lib/src/pkpass/barcode.dart | 4 ++ passkit/lib/src/pkpass/beacon.dart | 4 ++ passkit/lib/src/pkpass/field_dict.dart | 15 +++++ passkit/lib/src/pkpass/location.dart | 4 ++ passkit/lib/src/pkpass/nfc.dart | 3 + passkit/lib/src/pkpass/pass_data.dart | 36 +++++++++- passkit/lib/src/pkpass/pass_structure.dart | 7 +- passkit/lib/src/pkpass/personalization.dart | 3 + passkit/lib/src/pkpass/semantic_tag_type.dart | 19 ++++++ passkit/lib/src/pkpass/semantics.dart | 67 +++++++++++++++++++ 10 files changed, 158 insertions(+), 4 deletions(-) diff --git a/passkit/lib/src/pkpass/barcode.dart b/passkit/lib/src/pkpass/barcode.dart index f74e550..9e6fed3 100644 --- a/passkit/lib/src/pkpass/barcode.dart +++ b/passkit/lib/src/pkpass/barcode.dart @@ -18,15 +18,18 @@ class Barcode { /// Optional. Text displayed near the barcode. For example, a human-readable /// version of the barcode data in case the barcode doesn’t scan. + @JsonKey(name: 'altText') final String? altText; /// Required. Barcode format. For the barcode dictionary, you can use only the /// following values: PKBarcodeFormatQR, PKBarcodeFormatPDF417, or /// PKBarcodeFormatAztec. For dictionaries in the barcodes array, you may also /// use PKBarcodeFormatCode128. + @JsonKey(name: 'format') final PkPassBarcodeType format; /// Required. Message or payload to be displayed as a barcode. + @JsonKey(name: 'message') final String message; /// Required. Text encoding that is used to convert the message from the @@ -34,6 +37,7 @@ class Barcode { /// The value is typically iso-8859-1, but you may use another encoding that /// is supported by your barcode scanning infrastructure. // IANA character set name, as a string + @JsonKey(name: 'messageEncoding') final String messageEncoding; /// Converts this instance to a JSON object diff --git a/passkit/lib/src/pkpass/beacon.dart b/passkit/lib/src/pkpass/beacon.dart index c65e994..c867b40 100644 --- a/passkit/lib/src/pkpass/beacon.dart +++ b/passkit/lib/src/pkpass/beacon.dart @@ -18,18 +18,22 @@ class Beacon { /// Optional. Major identifier of a Bluetooth Low Energy location beacon. // 16-bit unsigned integer + @JsonKey(name: 'major') final int? major; /// Optional. Minor identifier of a Bluetooth Low Energy location beacon. // 16-bit unsigned integer + @JsonKey(name: 'minor') final int? minor; /// Required. Unique identifier of a Bluetooth Low Energy location beacon. + @JsonKey(name: 'proximityUUID') final String proximityUUID; /// Optional. Text displayed on the lock screen when the pass is currently /// relevant. For example, a description of the nearby location such as /// “Store nearby on 1st and Main.” + @JsonKey(name: 'relevantText') final String? relevantText; /// Converts this instance to a JSON object diff --git a/passkit/lib/src/pkpass/field_dict.dart b/passkit/lib/src/pkpass/field_dict.dart index 1f3ca9b..1f1c6dc 100644 --- a/passkit/lib/src/pkpass/field_dict.dart +++ b/passkit/lib/src/pkpass/field_dict.dart @@ -39,6 +39,7 @@ class FieldDict { /// This key’s value overrides the text specified by the value key. /// Available in iOS 7.0. // localizable string, ISO 8601 date as a string, or number + @JsonKey(name: 'attributedValue') final String? attributedValue; /// Optional. Format string for the alert text that is displayed when the pass @@ -47,6 +48,7 @@ class FieldDict { /// If you don’t specify a change message, the user isn’t notified when the /// field changes. // localizable format string + @JsonKey(name: 'changeMessage') final String? changeMessage; /// Optional. Data detectors that are applied to the field’s value. @@ -60,14 +62,17 @@ class FieldDict { /// no data detectors. /// /// Data detectors are applied only to back fields. + @JsonKey(name: 'dataDetectorTypes') final List? dataDetectorTypes; /// Required. The key must be unique within the scope of the entire pass. /// For example, “departure-gate.” + @JsonKey(name: 'key') final String key; /// Optional. Label text for the field. // localizable string + @JsonKey(name: 'label') final String? label; /// Optional. Alignment for the field’s contents. @@ -82,25 +87,31 @@ class FieldDict { /// appropriately based on its script direction. /// /// This key is not allowed for primary fields or back fields. + @JsonKey(name: 'textAlignment') final PkTextAlignment textAlignment; /// Required. Value of the field, for example, 42. /// This can contain a localizable string, ISO 8601 date as a string, /// or a number (double/int) + @JsonKey(name: 'value') final Object? value; /// The currency code to use for the value of the field. /// ISO 4217 currency code as a string + @JsonKey(name: 'currencyCode') final String? currencyCode; /// The style of the date to display in the field. + @JsonKey(name: 'dateStyle') final DateStyle? dateStyle; /// The style of the time displayed in the field. + @JsonKey(name: 'timeStyle') final DateStyle? timeStyle; /// The style of the number to display in the field. Formatter styles have the same meaning as the formats with corresponding names in NumberFormatter.Style. /// Possible Values: PKNumberStyleDecimal, PKNumberStylePercent, PKNumberStyleScientific, PKNumberStyleSpellOut + @JsonKey(name: 'numberStyle') final NumberStyle? numberStyle; /// A Boolean value that controls the time zone for the time and date to @@ -109,12 +120,14 @@ class FieldDict { /// date appear in the time zone associated with the date and time of value. /// /// This key doesn’t affect the pass relevance calculation. + @JsonKey(name: 'ignoresTimeZone') final bool? ignoresTimeZone; /// A Boolean value that controls whether the date appears as a relative date. /// The default value is false, which displays the date as an absolute date. /// /// This key doesn’t affect the pass relevance calculation. + @JsonKey(name: 'isRelative') final bool? isRelative; /// You can augment the user-visible information on Wallet passes with @@ -124,6 +137,7 @@ class FieldDict { /// /// An object that contains machine-readable metadata the system uses to offer /// a pass and suggest related actions. + @JsonKey(name: 'semantics') final Semantics? semantics; /// A number you use to add a row to the auxiliary field in an event ticket @@ -132,6 +146,7 @@ class FieldDict { /// /// Possible Values: 0, 1 /// This field is only valid for event pass types. + @JsonKey(name: 'row') final int? row; String? formatted({String? locale}) { diff --git a/passkit/lib/src/pkpass/location.dart b/passkit/lib/src/pkpass/location.dart index db7ee0f..628884e 100644 --- a/passkit/lib/src/pkpass/location.dart +++ b/passkit/lib/src/pkpass/location.dart @@ -18,16 +18,20 @@ class Location { Map toJson() => _$LocationToJson(this); /// Optional. Altitude, in meters, of the location. + @JsonKey(name: 'altitude') final double? altitude; /// Required. Latitude, in degrees, of the location. + @JsonKey(name: 'latitude') final double latitude; /// Required. Longitude, in degrees, of the location. + @JsonKey(name: 'longitude') final double longitude; /// Optional. Text displayed on the lock screen when the pass is currently /// relevant. For example, a description of the nearby location such as /// “Store nearby on 1st and Main.” + @JsonKey(name: 'relevantText') final String? relevantText; } diff --git a/passkit/lib/src/pkpass/nfc.dart b/passkit/lib/src/pkpass/nfc.dart index f805155..6869eff 100644 --- a/passkit/lib/src/pkpass/nfc.dart +++ b/passkit/lib/src/pkpass/nfc.dart @@ -18,11 +18,13 @@ class Nfc { /// Required. The payload to be transmitted to the Apple Pay terminal. /// Must be 64 bytes or less. Messages longer than 64 bytes are truncated by /// the system. + @JsonKey(name: 'message') final String message; /// Optional. The public encryption key used by the Value Added Services /// protocol. Use a Base64 encoded X.509 SubjectPublicKeyInfo structure /// containing a ECDH public key for group P256. + @JsonKey(name: 'encryptionPublicKey') final String? encryptionPublicKey; /// A Boolean value that indicates whether the NFC pass requires @@ -32,5 +34,6 @@ class Nfc { /// This key is valid in iOS 13.1 and later. Set sharingProhibited to `true` /// to prevent users from sharing passes with older iOS versions and bypassing /// the authentication requirement. + @JsonKey(name: 'requiresAuthentication') final bool? requiresAuthentication; } diff --git a/passkit/lib/src/pkpass/pass_data.dart b/passkit/lib/src/pkpass/pass_data.dart index 307a860..e965343 100644 --- a/passkit/lib/src/pkpass/pass_data.dart +++ b/passkit/lib/src/pkpass/pass_data.dart @@ -59,27 +59,33 @@ class PassData { /// Don't try to include all of the data on the pass in its description, /// just include enough detail to distinguish passes of the same type. // localizable + @JsonKey(name: 'description') final String description; /// Required. Version of the file format. The value must be 1. + @JsonKey(name: 'formatVersion') final int formatVersion; /// Required. Display name of the organization that originated and signed the /// pass. // localizable + @JsonKey(name: 'organizationName') final String organizationName; /// Required. Pass type identifier, as issued by Apple. The value must /// correspond with your signing certificate. + @JsonKey(name: 'passTypeIdentifier') final String passTypeIdentifier; /// Required. Serial number that uniquely identifies the pass. /// No two passes with the same pass type identifier may have the same /// serial number. + @JsonKey(name: 'serialNumber') final String serialNumber; /// Required. Team identifier of the organization that originated and signed /// the pass, as issued by Apple. + @JsonKey(name: 'teamIdentifier') final String teamIdentifier; /// Optional. A URL to be passed to the associated app when launching it. @@ -88,6 +94,7 @@ class PassData { /// application:openURL:options: methods of its app delegate. /// If this key is present, the associatedStoreIdentifiers key must also be /// present. + @JsonKey(name: 'appLaunchURL') final String? appLaunchURL; /// Optional. A list of iTunes Store item identifiers for the associated apps. @@ -96,6 +103,7 @@ class PassData { /// compatible with the current device. If the app is not installed, the link /// opens the App Store and shows the app. If the app is already installed, /// the link launches the app. + @JsonKey(name: 'associatedStoreIdentifiers') final List? associatedStoreIdentifiers; /// Optional. Custom information for companion apps. This data is not @@ -105,6 +113,7 @@ class PassData { /// app to read, making it easy to place an order for “the usual” from the /// app. /// Available in iOS 7.0. + @JsonKey(name: 'userInfo') final Map? userInfo; /// Optional. Date and time when the pass expires. @@ -112,27 +121,32 @@ class PassData { /// optionally include seconds. /// Available in iOS 7.0. // W3C date, as a string + @JsonKey(name: 'expirationDate') final DateTime? expirationDate; /// Optional. Indicates that the pass is void—for example, a one time use /// coupon that has been redeemed. The default value is false. /// Available in iOS 7.0. + @JsonKey(name: 'voided') final bool? voided; /// Optional. Beacons marking locations where the pass is relevant. /// For these dictionaries’ keys, see Beacon Dictionary Keys /// Available in iOS 7.0. + @JsonKey(name: 'beacons') final List? beacons; /// Optional. Locations where the pass is relevant. For example, the location /// of your store. /// For these dictionaries’ keys, see Location Dictionary Keys. + @JsonKey(name: 'locations') final List? locations; /// Optional. Maximum distance in meters from a relevant latitude and /// longitude that the pass is relevant. This number is compared to the pass’s /// default distance and the smaller value is used. /// Available in iOS 7.0. + @JsonKey(name: 'maxDistance') final num? maxDistance; /// Recommended for event tickets and boarding passes; otherwise optional. @@ -141,26 +155,33 @@ class PassData { /// The value must be a complete date with hours and minutes, and may /// optionally include seconds. // W3C date, as a string + @JsonKey(name: 'relevantDate') final DateTime? relevantDate; /// Information specific to a boarding pass. + @JsonKey(name: 'boardingPass') final PassStructure? boardingPass; /// Information specific to a coupon. + @JsonKey(name: 'coupon') final PassStructure? coupon; /// Information specific to an event ticket. + @JsonKey(name: 'eventTicket') final PassStructure? eventTicket; /// Information specific to a generic pass. + @JsonKey(name: 'generic') final PassStructure? generic; /// Information specific to a store card. + @JsonKey(name: 'storeCard') final PassStructure? storeCard; /// Optional. Information specific to the pass’s barcode. For this /// dictionary’s keys, see Barcode Dictionary Keys. /// Note:Deprecated in iOS 9.0 and later; use barcodes instead. + @JsonKey(name: 'barcode') final Barcode? barcode; /// Optional. Information specific to the pass’s barcode. The system uses the @@ -168,16 +189,17 @@ class PassData { /// be added as fallbacks. For this dictionary’s keys, /// see Barcode Dictionary Keys. /// Note: Available only in iOS 9.0 and later. + @JsonKey(name: 'barcodes') final List? barcodes; /// Optional. Background color of the pass, specified as an CSS-style RGB /// triple. For example, rgb(23, 187, 82). - @JsonKey(fromJson: parseColor, toJson: colorToString) + @JsonKey(name: 'backgroundColor', fromJson: parseColor, toJson: colorToString) final Color? backgroundColor; /// Optional. Foreground color of the pass, specified as a CSS-style RGB /// triple. For example, rgb(100, 10, 110). - @JsonKey(fromJson: parseColor, toJson: colorToString) + @JsonKey(name: 'foregroundColor', fromJson: parseColor, toJson: colorToString) final Color? foregroundColor; /// Optional for event tickets and boarding passes; otherwise not allowed. @@ -188,31 +210,36 @@ class PassData { /// Use this to group passes that are tightly related, such as the boarding /// passes for different connections of the same trip. /// Available in iOS 7.0. + @JsonKey(name: 'groupingIdentifier') final String? groupingIdentifier; /// Optional. Color of the label text, specified as a CSS-style RGB triple. /// For example, rgb(255, 255, 255). /// If omitted, the label color is determined automatically. - @JsonKey(fromJson: parseColor, toJson: colorToString) + @JsonKey(name: 'labelColor', fromJson: parseColor, toJson: colorToString) final Color? labelColor; /// Optional. Text displayed next to the logo on the pass. // localizable string + @JsonKey(name: 'logoText') final String? logoText; /// Optional. If true, the strip image is displayed without a shine effect. /// The default value prior to iOS 7.0 is false. /// In iOS 7.0, a shine effect is never applied, and this key is deprecated. + @JsonKey(name: 'suppressStripShine') final bool? suppressStripShine; /// A Boolean value introduced in iOS 11 that controls whether to show the /// Share button on the back of a pass. A value of true removes the button. /// The default value is false. This flag has no effect in earlier versions of /// iOS, nor does it prevent sharing the pass in some other way. + @JsonKey(name: 'sharingProhibited') final bool? sharingProhibited; /// The authentication token to use with the web service. The token must be 16 /// characters or longer. + @JsonKey(name: 'authenticationToken') final String? authenticationToken; /// The URL of a web service that conforms to the API described in PassKit Web @@ -221,11 +248,13 @@ class PassData { /// included in the value of this key. /// On devices configured for development, there is UI in Settings to allow /// HTTP web services. + @JsonKey(name: 'webServiceURL') final Uri? webServiceURL; /// Optional. Information used for Value Added Service Protocol transactions. /// For this dictionary’s keys, see NFC Dictionary Keys. /// Available in iOS 9.0. + @JsonKey(name: 'nfc') final Nfc? nfc; /// You can augment the user-visible information on Wallet passes with @@ -235,5 +264,6 @@ class PassData { /// /// An object that contains machine-readable metadata the system uses to offer /// a pass and suggest related actions. + @JsonKey(name: 'semantics') final Semantics? semantics; } diff --git a/passkit/lib/src/pkpass/pass_structure.dart b/passkit/lib/src/pkpass/pass_structure.dart index ce6f1c3..e76d964 100644 --- a/passkit/lib/src/pkpass/pass_structure.dart +++ b/passkit/lib/src/pkpass/pass_structure.dart @@ -24,30 +24,35 @@ class PassStructure { /// Optional. Additional fields to be displayed on the front of the pass. // array of field dictionaries + @JsonKey(name: 'auxiliaryFields') final List? auxiliaryFields; /// Optional. Fields to be on the back of the pass. // array of field dictionaries + @JsonKey(name: 'backFields') final List? backFields; /// Optional. Fields to be displayed in the header on the front of the pass. /// Use header fields sparingly; unlike all other fields, they remain visible /// when a stack of passes are displayed. // array of field dictionaries + @JsonKey(name: 'headerFields') final List? headerFields; /// Optional. Fields to be displayed prominently on the front of the pass. // array of field dictionaries + @JsonKey(name: 'primaryFields') final List? primaryFields; /// Optional. Fields to be displayed on the front of the pass. // array of field dictionaries + @JsonKey(name: 'secondaryFields') final List? secondaryFields; /// Required for boarding passes; otherwise not allowed. Type of transit. /// Must be one of the following values: PKTransitTypeAir, PKTransitTypeBoat, /// PKTransitTypeBus, PKTransitTypeGeneric,PKTransitTypeTrain. - @JsonKey(defaultValue: TransitType.generic) + @JsonKey(name: 'transitType', defaultValue: TransitType.generic) final TransitType transitType; } diff --git a/passkit/lib/src/pkpass/personalization.dart b/passkit/lib/src/pkpass/personalization.dart index 54362f9..9097c64 100644 --- a/passkit/lib/src/pkpass/personalization.dart +++ b/passkit/lib/src/pkpass/personalization.dart @@ -18,6 +18,7 @@ class Personalization { /// Required. A brief description of the program. This is displayed on the /// signup sheet, under the personalization logo. + @JsonKey(name: 'description') final String description; /// Optional. A description of the program’s terms and conditions. @@ -26,10 +27,12 @@ class Personalization { /// If present, this information is displayed after the user enters their /// personal information and taps the Next button. The user then has the /// option to agree to the terms, or to cancel out of the signup process. + @JsonKey(name: 'termsAndConditions') final String? termsAndConditions; /// Required. The contents of this array define the data requested from the /// user. The signup form’s fields are generated based on these keys. + @JsonKey(name: 'requiredPersonalizationFields') final List requiredPersonalizationFields; } diff --git a/passkit/lib/src/pkpass/semantic_tag_type.dart b/passkit/lib/src/pkpass/semantic_tag_type.dart index c226414..788b339 100644 --- a/passkit/lib/src/pkpass/semantic_tag_type.dart +++ b/passkit/lib/src/pkpass/semantic_tag_type.dart @@ -11,9 +11,11 @@ class SemanticTagTypeWifiNetwork { Map toJson() => _$SemanticTagTypeWifiNetworkToJson(this); /// The password for the WiFi network. + @JsonKey(name: 'password') final String password; /// The name for the WiFi network. + @JsonKey(name: 'ssid') final String ssid; } @@ -31,10 +33,12 @@ class SemanticTagTypeCurrencyAmount { Map toJson() => _$SemanticTagTypeCurrencyAmountToJson(this); /// The amount of money. + @JsonKey(name: 'amount') final String? amount; /// The currency code for amount. // ISO 4217 currency code as a string + @JsonKey(name: 'currencyCode') final String? currencyCode; } @@ -49,9 +53,11 @@ class SemanticTagTypeLocation { Map toJson() => _$SemanticTagTypeLocationToJson(this); /// The latitude, in degrees. + @JsonKey(name: 'latitude') final double latitude; /// The longitude, in degrees. + @JsonKey(name: 'longitude') final double longitude; } @@ -75,26 +81,32 @@ class SemanticTagTypeSeat { /// A description of the seat, such as “A flat bed seat”. // localizable string + @JsonKey(name: 'seatDescription') final String? seatDescription; /// The identifier code for the seat. // localizable string + @JsonKey(name: 'seatIdentifier') final String? seatIdentifier; /// The number of the seat. // localizable string + @JsonKey(name: 'seatNumber') final String? seatNumber; /// The row that contains the seat. // localizable string + @JsonKey(name: 'seatRow') final String? seatRow; /// The section that contains the seat. // localizable string + @JsonKey(name: 'seatSection') final String? seatSection; /// The type of seat, such as “Reserved seating”. // localizable string + @JsonKey(name: 'seatType') final String? seatType; } @@ -120,23 +132,30 @@ class SemanticTagTypePersonNameComponents { _$SemanticTagTypePersonNameComponentsToJson(this); /// The person’s family name or last name. + @JsonKey(name: 'familyName') final String? familyName; /// The person’s given name; also called the forename or first name in some countries. + @JsonKey(name: 'givenName') final String? givenName; /// The person’s middle name. + @JsonKey(name: 'middleName') final String? middleName; /// The prefix for the person’s name, such as “Dr”. + @JsonKey(name: 'namePrefix') final String? namePrefix; /// The suffix for the person’s name, such as “Junior”. + @JsonKey(name: 'nameSuffix') final String? nameSuffix; /// The person’s nickname. + @JsonKey(name: 'nickname') final String? nickname; /// The phonetic representation of the person’s name. + @JsonKey(name: 'phoneticRepresentation') final String? phoneticRepresentation; } diff --git a/passkit/lib/src/pkpass/semantics.dart b/passkit/lib/src/pkpass/semantics.dart index 62f01e9..a52fe5b 100644 --- a/passkit/lib/src/pkpass/semantics.dart +++ b/passkit/lib/src/pkpass/semantics.dart @@ -84,260 +84,327 @@ class Semantics { /// The IATA airline code, such as “EX” for flightCode “EX123”. /// Use this key only for airline boarding passes. // localizable string + @JsonKey(name: 'airlineCode') final String? airlineCode; /// An array of the Apple Music persistent ID for each artist performing at the event, in decreasing order of significance. /// Use this key for any type of event ticket. // [localizable string] + @JsonKey(name: 'artistIDs') final List? artistIDs; /// The unique abbreviation of the away team’s name. Use this key only for a sports event ticket. // localizable string + @JsonKey(name: 'awayTeamAbbreviation') final String? awayTeamAbbreviation; /// The home location of the away team. Use this key only for a sports event ticket. // localizable string + @JsonKey(name: 'awayTeamLocation') final String? awayTeamLocation; /// The name of the away team. Use this key only for a sports event ticket. // localizable string + @JsonKey(name: 'awayTeamName') final String? awayTeamName; /// The current balance redeemable with the pass. Use this key only for a store card pass. + @JsonKey(name: 'balance') final SemanticTagTypeCurrencyAmount? balance; /// A group number for boarding. Use this key for any type of boarding pass. // localizable string + @JsonKey(name: 'boardingGroup') final String? boardingGroup; /// A sequence number for boarding. Use this key for any type of boarding pass. // localizable string + @JsonKey(name: 'boardingSequenceNumber') final String? boardingSequenceNumber; /// The number of the passenger car. A train car is also called a carriage, wagon, coach, or bogie in some countries. Use this key only for a train or other rail boarding pass. // localizable string + @JsonKey(name: 'carNumber') final String? carNumber; /// A booking or reservation confirmation number. Use this key for any type of boarding pass. // localizable string + @JsonKey(name: 'confirmationNumber') final String? confirmationNumber; /// The updated date and time of arrival, if different from the originally scheduled date and time. Use this key for any type of boarding pass. // ISO 8601 date as string + @JsonKey(name: 'currentArrivalDate') final DateTime? currentArrivalDate; /// The updated date and time of boarding, if different from the originally scheduled date and time. Use this key for any type of boarding pass. // ISO 8601 date as string + @JsonKey(name: 'currentBoardingDate') final DateTime? currentBoardingDate; /// The updated departure date and time, if different from the originally scheduled date and time. Use this key for any type of boarding pass. // ISO 8601 date as string + @JsonKey(name: 'currentDepartureDate') final DateTime? currentDepartureDate; /// The IATA airport code for the departure airport, such as “MPM” or “LHR”. Use this key only for airline boarding passes. // localizable string + @JsonKey(name: 'departureAirportCode') final String? departureAirportCode; /// The full name of the departure airport, such as “Maputo International Airport”. Use this key only for airline boarding passes. // localizable string + @JsonKey(name: 'departureAirportName') final String? departureAirportName; /// The gate number or letters of the departure gate, such as “1A”. Do not include the word “Gate.” // localizable string + @JsonKey(name: 'departureGate') final String? departureGate; /// An object that represents the geographic coordinates of the transit departure location, suitable for display on a map. If possible, use precise locations, which are more useful to travelers; for example, the specific location of an airport gate. Use this key for any type of boarding pass. + @JsonKey(name: 'departureLocation') final SemanticTagTypeLocation? departureLocation; /// A brief description of the departure location. For example, for a flight departing from an airport whose code is “LHR,” an appropriate description might be “London, Heathrow“. Use this key for any type of boarding pass. // localizable string + @JsonKey(name: 'departureLocationDescription') final String? departureLocationDescription; /// The name of the departure platform, such as “A”. Don’t include the word “Platform.” Use this key only for a train or other rail boarding pass. // localizable string + @JsonKey(name: 'departurePlatform') final String? departurePlatform; /// The name of the departure station, such as “1st Street Station”. Use this key only for a train or other rail boarding pass. // localizable string + @JsonKey(name: 'departureStationName') final String? departureStationName; /// The name or letter of the departure terminal, such as “A”. Don’t include the word “Terminal.” Use this key only for airline boarding passes. // localizable string + @JsonKey(name: 'departureTerminal') final String? departureTerminal; /// The IATA airport code for the destination airport, such as “MPM” or “LHR”. Use this key only for airline boarding passes. // localizable string + @JsonKey(name: 'destinationAirportCode') final String? destinationAirportCode; /// The full name of the destination airport, such as “London Heathrow”. Use this key only for airline boarding passes. // localizable string + @JsonKey(name: 'destinationAirportName') final String? destinationAirportName; /// The gate number or letter of the destination gate, such as “1A”. Don’t include the word “Gate.” Use this key only for airline boarding passes. // localizable string + @JsonKey(name: 'destinationGate') final String? destinationGate; /// An object that represents the geographic coordinates of the transit departure location, suitable for display on a map. Use this key for any type of boarding pass. + @JsonKey(name: 'destinationLocation') final SemanticTagTypeLocation? destinationLocation; /// A brief description of the destination location. For example, for a flight arriving at an airport whose code is “MPM,” “Maputo“ might be an appropriate description. Use this key for any type of boarding pass. // localizable string + @JsonKey(name: 'destinationLocationDescription') final String? destinationLocationDescription; /// The name of the destination platform, such as “A”. Don’t include the word “Platform.” Use this key only for a train or other rail boarding pass. // localizable string + @JsonKey(name: 'destinationPlatform') final String? destinationPlatform; /// The name of the destination station, such as “1st Street Station”. Use this key only for a train or other rail boarding pass. // localizable string + @JsonKey(name: 'destinationStationName') final String? destinationStationName; /// The terminal name or letter of the destination terminal, such as “A”. Don’t include the word “Terminal.” Use this key only for airline boarding passes. // localizable string + @JsonKey(name: 'destinationTerminal') final String? destinationTerminal; /// The duration of the event or transit journey, in seconds. Use this key for any type of boarding pass and any type of event ticket. + @JsonKey(name: 'duration') final num? duration; /// The date and time the event ends. Use this key for any type of event ticket. // ISO 8601 date as string + @JsonKey(name: 'eventEndDate') final DateTime? eventEndDate; /// The full name of the event, such as the title of a movie. Use this key for any type of event ticket. // localizable string + @JsonKey(name: 'eventName') final String? eventName; /// The date and time the event starts. Use this key for any type of event ticket. // ISO 8601 date as string + @JsonKey(name: 'eventStartDate') final DateTime? eventStartDate; /// The type of event. Use this key for any type of event ticket. /// Possible Values: PKEventTypeGeneric, PKEventTypeLivePerformance, PKEventTypeMovie, PKEventTypeSports, PKEventTypeConference, PKEventTypeConvention, PKEventTypeWorkshop, PKEventTypeSocialGathering + @JsonKey(name: 'eventType') final EventType? eventType; /// The IATA flight code, such as “EX123”. Use this key only for airline boarding passes. // localizable string + @JsonKey(name: 'flightCode') final String? flightCode; /// The numeric portion of the IATA flight code, such as 123 for flightCode “EX123”. Use this key only for airline boarding passes. + @JsonKey(name: 'flightNumber') final num? flightNumber; /// The genre of the performance, such as “Classical”. Use this key for any type of event ticket. // localizable string + @JsonKey(name: 'genre') final String? genre; /// The unique abbreviation of the home team’s name. Use this key only for a sports event ticket. // localizable string + @JsonKey(name: 'homeTeamAbbreviation') final String? homeTeamAbbreviation; /// The home location of the home team. Use this key only for a sports event ticket. // localizable string + @JsonKey(name: 'homeTeamLocation') final String? homeTeamLocation; /// The name of the home team. Use this key only for a sports event ticket. // localizable string + @JsonKey(name: 'homeTeamName') final String? homeTeamName; /// The abbreviated league name for a sports event. Use this key only for a sports event ticket. // localizable string + @JsonKey(name: 'leagueAbbreviation') final String? leagueAbbreviation; /// The unabbreviated league name for a sports event. Use this key only for a sports event ticket. // localizable string + @JsonKey(name: 'leagueName') final String? leagueName; /// The name of a frequent flyer or loyalty program. Use this key for any type of boarding pass. // localizable string + @JsonKey(name: 'membershipProgramName') final String? membershipProgramName; /// The ticketed passenger’s frequent flyer or loyalty number. Use this key for any type of boarding pass. // localizable string + @JsonKey(name: 'membershipProgramNumber') final String? membershipProgramNumber; /// The originally scheduled date and time of arrival. Use this key for any type of boarding pass. // ISO 8601 date as string + @JsonKey(name: 'originalArrivalDate') final DateTime? originalArrivalDate; /// The originally scheduled date and time of boarding. Use this key for any type of boarding pass. // ISO 8601 date as string + @JsonKey(name: 'originalBoardingDate') final DateTime? originalBoardingDate; /// The originally scheduled date and time of departure. Use this key for any type of boarding pass. // ISO 8601 date as string + @JsonKey(name: 'originalDepartureDate') final DateTime? originalDepartureDate; /// An object that represents the name of the passenger. Use this key for any type of boarding pass. + @JsonKey(name: 'passengerName') final SemanticTagTypePersonNameComponents? passengerName; /// An array of the full names of the performers and opening acts at the event, in decreasing order of significance. Use this key for any type of event ticket. // [localizable string] + @JsonKey(name: 'performerNames') final List? performerNames; /// The priority status the ticketed passenger holds, such as “Gold” or “Silver”. Use this key for any type of boarding pass. // localizable string + @JsonKey(name: 'priorityStatus') final String? priorityStatus; /// An array of objects that represent the details for each seat at an event or on a transit journey. Use this key for any type of boarding pass or event ticket. + @JsonKey(name: 'seats') final List? seats; /// The type of security screening for the ticketed passenger, such as “Priority”. Use this key for any type of boarding pass. // localizable string + @JsonKey(name: 'securityScreening') final String? securityScreening; /// A Boolean value that determines whether the user’s device remains silent during an event or transit journey. The system may override the key and determine the length of the period of silence. Use this key for any type of boarding pass or event ticket. + @JsonKey(name: 'silenceRequested') final bool? silenceRequested; /// The commonly used name of the sport. Use this key only for a sports event ticket. // localizable string + @JsonKey(name: 'sportName') final String? sportName; /// The total price for the pass. Use this key for any pass type. + @JsonKey(name: 'totalPrice') final SemanticTagTypeCurrencyAmount? totalPrice; /// The name of the transit company. Use this key for any type of boarding pass. // localizable string + @JsonKey(name: 'transitProvider') final String? transitProvider; /// A brief description of the current boarding status for the vessel, such as “On Time” or “Delayed”. For delayed status, provide currentBoardingDate, currentDepartureDate, and currentArrivalDate where available. Use this key for any type of boarding pass. // localizable string + @JsonKey(name: 'transitStatus') final String? transitStatus; /// A brief description that explains the reason for the current transitStatus, such as “Thunderstorms”. Use this key for any type of boarding pass. // localizable string + @JsonKey(name: 'transitStatusReason') final String? transitStatusReason; /// The name of the vehicle to board, such as the name of a boat. Use this key for any type of boarding pass. // localizable string + @JsonKey(name: 'vehicleName') final String? vehicleName; /// The identifier of the vehicle to board, such as the aircraft registration number or train number. Use this key for any type of boarding pass. // localizable string + @JsonKey(name: 'vehicleNumber') final String? vehicleNumber; /// A brief description of the type of vehicle to board, such as the model and manufacturer of a plane or the class of a boat. Use this key for any type of boarding pass. // localizable string + @JsonKey(name: 'vehicleType') final String? vehicleType; /// The full name of the entrance, such as “Gate A”, to use to gain access to the ticketed event. Use this key for any type of event ticket. // localizable string + @JsonKey(name: 'venueEntrance') final String? venueEntrance; /// An object that represents the geographic coordinates of the venue. Use this key for any type of event ticket. + @JsonKey(name: 'venueLocation') final SemanticTagTypeLocation? venueLocation; /// The full name of the venue. Use this key for any type of event ticket. // localizable string + @JsonKey(name: 'venueName') final String? venueName; /// The phone number for enquiries about the venue’s ticketed event. Use this key for any type of event ticket. // localizable string + @JsonKey(name: 'venuePhoneNumber') final String? venuePhoneNumber; /// The full name of the room where the ticketed event is to take place. Use this key for any type of event ticket. // localizable string + @JsonKey(name: 'venueRoom') final String? venueRoom; /// An array of objects that represent the WiFi networks associated with the event; for example, the network name and password associated with a developer conference. Use this key for any type of pass. + @JsonKey(name: 'wifiAccess') final List? wifiAccess; }