EventTicketObject.fromJson constructor

EventTicketObject.fromJson(
  1. Map json_
)

Implementation

EventTicketObject.fromJson(core.Map json_)
    : this(
        appLinkData: json_.containsKey('appLinkData')
            ? AppLinkData.fromJson(
                json_['appLinkData'] as core.Map<core.String, core.dynamic>)
            : null,
        barcode: json_.containsKey('barcode')
            ? Barcode.fromJson(
                json_['barcode'] as core.Map<core.String, core.dynamic>)
            : null,
        classId: json_.containsKey('classId')
            ? json_['classId'] as core.String
            : null,
        classReference: json_.containsKey('classReference')
            ? EventTicketClass.fromJson(json_['classReference']
                as core.Map<core.String, core.dynamic>)
            : null,
        disableExpirationNotification:
            json_.containsKey('disableExpirationNotification')
                ? json_['disableExpirationNotification'] as core.bool
                : null,
        faceValue: json_.containsKey('faceValue')
            ? Money.fromJson(
                json_['faceValue'] as core.Map<core.String, core.dynamic>)
            : null,
        groupingInfo: json_.containsKey('groupingInfo')
            ? GroupingInfo.fromJson(
                json_['groupingInfo'] as core.Map<core.String, core.dynamic>)
            : null,
        hasLinkedDevice: json_.containsKey('hasLinkedDevice')
            ? json_['hasLinkedDevice'] as core.bool
            : null,
        hasUsers: json_.containsKey('hasUsers')
            ? json_['hasUsers'] as core.bool
            : null,
        heroImage: json_.containsKey('heroImage')
            ? Image.fromJson(
                json_['heroImage'] as core.Map<core.String, core.dynamic>)
            : null,
        hexBackgroundColor: json_.containsKey('hexBackgroundColor')
            ? json_['hexBackgroundColor'] as core.String
            : null,
        id: json_.containsKey('id') ? json_['id'] as core.String : null,
        imageModulesData: json_.containsKey('imageModulesData')
            ? (json_['imageModulesData'] as core.List)
                .map((value) => ImageModuleData.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        infoModuleData: json_.containsKey('infoModuleData')
            ? InfoModuleData.fromJson(json_['infoModuleData']
                as core.Map<core.String, core.dynamic>)
            : null,
        kind: json_.containsKey('kind') ? json_['kind'] as core.String : null,
        linkedOfferIds: json_.containsKey('linkedOfferIds')
            ? (json_['linkedOfferIds'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        linksModuleData: json_.containsKey('linksModuleData')
            ? LinksModuleData.fromJson(json_['linksModuleData']
                as core.Map<core.String, core.dynamic>)
            : null,
        locations: json_.containsKey('locations')
            ? (json_['locations'] as core.List)
                .map((value) => LatLongPoint.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        messages: json_.containsKey('messages')
            ? (json_['messages'] as core.List)
                .map((value) => Message.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        passConstraints: json_.containsKey('passConstraints')
            ? PassConstraints.fromJson(json_['passConstraints']
                as core.Map<core.String, core.dynamic>)
            : null,
        reservationInfo: json_.containsKey('reservationInfo')
            ? EventReservationInfo.fromJson(json_['reservationInfo']
                as core.Map<core.String, core.dynamic>)
            : null,
        rotatingBarcode: json_.containsKey('rotatingBarcode')
            ? RotatingBarcode.fromJson(json_['rotatingBarcode']
                as core.Map<core.String, core.dynamic>)
            : null,
        seatInfo: json_.containsKey('seatInfo')
            ? EventSeat.fromJson(
                json_['seatInfo'] as core.Map<core.String, core.dynamic>)
            : null,
        smartTapRedemptionValue: json_.containsKey('smartTapRedemptionValue')
            ? json_['smartTapRedemptionValue'] as core.String
            : null,
        state:
            json_.containsKey('state') ? json_['state'] as core.String : null,
        textModulesData: json_.containsKey('textModulesData')
            ? (json_['textModulesData'] as core.List)
                .map((value) => TextModuleData.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        ticketHolderName: json_.containsKey('ticketHolderName')
            ? json_['ticketHolderName'] as core.String
            : null,
        ticketNumber: json_.containsKey('ticketNumber')
            ? json_['ticketNumber'] as core.String
            : null,
        ticketType: json_.containsKey('ticketType')
            ? LocalizedString.fromJson(
                json_['ticketType'] as core.Map<core.String, core.dynamic>)
            : null,
        validTimeInterval: json_.containsKey('validTimeInterval')
            ? TimeInterval.fromJson(json_['validTimeInterval']
                as core.Map<core.String, core.dynamic>)
            : null,
        version: json_.containsKey('version')
            ? json_['version'] as core.String
            : null,
      );