Lodging.fromJson constructor Null safety

Lodging.fromJson(
  1. Map _json
)

Implementation

Lodging.fromJson(core.Map _json)
    : this(
        accessibility: _json.containsKey('accessibility')
            ? Accessibility.fromJson(
                _json['accessibility'] as core.Map<core.String, core.dynamic>)
            : null,
        activities: _json.containsKey('activities')
            ? Activities.fromJson(
                _json['activities'] as core.Map<core.String, core.dynamic>)
            : null,
        allUnits: _json.containsKey('allUnits')
            ? GuestUnitFeatures.fromJson(
                _json['allUnits'] as core.Map<core.String, core.dynamic>)
            : null,
        business: _json.containsKey('business')
            ? Business.fromJson(
                _json['business'] as core.Map<core.String, core.dynamic>)
            : null,
        commonLivingArea: _json.containsKey('commonLivingArea')
            ? LivingArea.fromJson(_json['commonLivingArea']
                as core.Map<core.String, core.dynamic>)
            : null,
        connectivity: _json.containsKey('connectivity')
            ? Connectivity.fromJson(
                _json['connectivity'] as core.Map<core.String, core.dynamic>)
            : null,
        families: _json.containsKey('families')
            ? Families.fromJson(
                _json['families'] as core.Map<core.String, core.dynamic>)
            : null,
        foodAndDrink: _json.containsKey('foodAndDrink')
            ? FoodAndDrink.fromJson(
                _json['foodAndDrink'] as core.Map<core.String, core.dynamic>)
            : null,
        guestUnits: _json.containsKey('guestUnits')
            ? (_json['guestUnits'] as core.List)
                .map((value) => GuestUnitType.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        healthAndSafety: _json.containsKey('healthAndSafety')
            ? HealthAndSafety.fromJson(_json['healthAndSafety']
                as core.Map<core.String, core.dynamic>)
            : null,
        housekeeping: _json.containsKey('housekeeping')
            ? Housekeeping.fromJson(
                _json['housekeeping'] as core.Map<core.String, core.dynamic>)
            : null,
        metadata: _json.containsKey('metadata')
            ? LodgingMetadata.fromJson(
                _json['metadata'] as core.Map<core.String, core.dynamic>)
            : null,
        name: _json.containsKey('name') ? _json['name'] as core.String : null,
        parking: _json.containsKey('parking')
            ? Parking.fromJson(
                _json['parking'] as core.Map<core.String, core.dynamic>)
            : null,
        pets: _json.containsKey('pets')
            ? Pets.fromJson(
                _json['pets'] as core.Map<core.String, core.dynamic>)
            : null,
        policies: _json.containsKey('policies')
            ? Policies.fromJson(
                _json['policies'] as core.Map<core.String, core.dynamic>)
            : null,
        pools: _json.containsKey('pools')
            ? Pools.fromJson(
                _json['pools'] as core.Map<core.String, core.dynamic>)
            : null,
        property: _json.containsKey('property')
            ? Property.fromJson(
                _json['property'] as core.Map<core.String, core.dynamic>)
            : null,
        services: _json.containsKey('services')
            ? Services.fromJson(
                _json['services'] as core.Map<core.String, core.dynamic>)
            : null,
        someUnits: _json.containsKey('someUnits')
            ? GuestUnitFeatures.fromJson(
                _json['someUnits'] as core.Map<core.String, core.dynamic>)
            : null,
        sustainability: _json.containsKey('sustainability')
            ? Sustainability.fromJson(_json['sustainability']
                as core.Map<core.String, core.dynamic>)
            : null,
        transportation: _json.containsKey('transportation')
            ? Transportation.fromJson(_json['transportation']
                as core.Map<core.String, core.dynamic>)
            : null,
        wellness: _json.containsKey('wellness')
            ? Wellness.fromJson(
                _json['wellness'] as core.Map<core.String, core.dynamic>)
            : null,
      );