Input$PointOfSaleInput.fromJson constructor

Input$PointOfSaleInput.fromJson(
  1. Map<String, dynamic> data
)

Implementation

factory Input$PointOfSaleInput.fromJson(Map<String, dynamic> data) {
  final result$data = <String, dynamic>{};
  if (data.containsKey('name')) {
    final l$name = data['name'];
    result$data['name'] = (l$name as String?);
  }
  if (data.containsKey('title')) {
    final l$title = data['title'];
    result$data['title'] = (l$title as String?);
  }
  if (data.containsKey('subtitle')) {
    final l$subtitle = data['subtitle'];
    result$data['subtitle'] = (l$subtitle as String?);
  }
  if (data.containsKey('description')) {
    final l$description = data['description'];
    result$data['description'] = (l$description as String?);
  }
  if (data.containsKey('tags')) {
    final l$tags = data['tags'];
    result$data['tags'] =
        (l$tags as List<dynamic>?)?.map((e) => (e as String)).toList();
  }
  if (data.containsKey('brandColor')) {
    final l$brandColor = data['brandColor'];
    result$data['brandColor'] = (l$brandColor as String?);
  }
  if (data.containsKey('reference')) {
    final l$reference = data['reference'];
    result$data['reference'] = (l$reference as String?);
  }
  if (data.containsKey('published')) {
    final l$published = data['published'];
    result$data['published'] = (l$published as bool?);
  }
  if (data.containsKey('picture')) {
    final l$picture = data['picture'];
    result$data['picture'] = l$picture == null
        ? null
        : Input$PictureInput.fromJson((l$picture as Map<String, dynamic>));
  }
  if (data.containsKey('outsidePictures')) {
    final l$outsidePictures = data['outsidePictures'];
    result$data['outsidePictures'] = (l$outsidePictures as List<dynamic>?)
        ?.map((e) => Input$PictureInput.fromJson((e as Map<String, dynamic>)))
        .toList();
  }
  if (data.containsKey('insidePictures')) {
    final l$insidePictures = data['insidePictures'];
    result$data['insidePictures'] = (l$insidePictures as List<dynamic>?)
        ?.map((e) => Input$PictureInput.fromJson((e as Map<String, dynamic>)))
        .toList();
  }
  if (data.containsKey('openingHours')) {
    final l$openingHours = data['openingHours'];
    result$data['openingHours'] = l$openingHours == null
        ? null
        : Input$OpeningHoursInput.fromJson(
            (l$openingHours as Map<String, dynamic>));
  }
  if (data.containsKey('specialOffers')) {
    final l$specialOffers = data['specialOffers'];
    result$data['specialOffers'] = (l$specialOffers as List<dynamic>?)
        ?.map((e) =>
            Input$SpecilOfferInput.fromJson((e as Map<String, dynamic>)))
        .toList();
  }
  if (data.containsKey('locations')) {
    final l$locations = data['locations'];
    result$data['locations'] = (l$locations as List<dynamic>?)
        ?.map((e) =>
            Input$FullAddressInput.fromJson((e as Map<String, dynamic>)))
        .toList();
  }
  if (data.containsKey('email')) {
    final l$email = data['email'];
    result$data['email'] =
        (l$email as List<dynamic>?)?.map((e) => (e as String)).toList();
  }
  if (data.containsKey('contactEmails')) {
    final l$contactEmails = data['contactEmails'];
    result$data['contactEmails'] = (l$contactEmails as List<dynamic>?)
        ?.map((e) => (e as String))
        .toList();
  }
  if (data.containsKey('currencies')) {
    final l$currencies = data['currencies'];
    result$data['currencies'] = (l$currencies as List<dynamic>?)
        ?.map((e) =>
            Input$TargetCurrencyInput.fromJson((e as Map<String, dynamic>)))
        .toList();
  }
  if (data.containsKey('languages')) {
    final l$languages = data['languages'];
    result$data['languages'] =
        (l$languages as List<dynamic>?)?.map((e) => (e as String)).toList();
  }
  if (data.containsKey('phone')) {
    final l$phone = data['phone'];
    result$data['phone'] =
        (l$phone as List<dynamic>?)?.map((e) => (e as String)).toList();
  }
  if (data.containsKey('website')) {
    final l$website = data['website'];
    result$data['website'] = (l$website as String?);
  }
  if (data.containsKey('chatContact')) {
    final l$chatContact = data['chatContact'];
    result$data['chatContact'] = (l$chatContact as List<dynamic>?)
        ?.map((e) =>
            Input$SocialValueInput.fromJson((e as Map<String, dynamic>)))
        .toList();
  }
  if (data.containsKey('socialMedia')) {
    final l$socialMedia = data['socialMedia'];
    result$data['socialMedia'] = (l$socialMedia as List<dynamic>?)
        ?.map((e) =>
            Input$SocialValueInput.fromJson((e as Map<String, dynamic>)))
        .toList();
  }
  if (data.containsKey('averageCustomers')) {
    final l$averageCustomers = data['averageCustomers'];
    result$data['averageCustomers'] =
        (l$averageCustomers as num?)?.toDouble();
  }
  if (data.containsKey('turnover')) {
    final l$turnover = data['turnover'];
    result$data['turnover'] = (l$turnover as String?);
  }
  if (data.containsKey('posCategory')) {
    final l$posCategory = data['posCategory'];
    result$data['posCategory'] =
        (l$posCategory as List<dynamic>?)?.map((e) => (e as String)).toList();
  }
  if (data.containsKey('company')) {
    final l$company = data['company'];
    result$data['company'] = (l$company as String?);
  }
  if (data.containsKey('services')) {
    final l$services = data['services'];
    result$data['services'] =
        (l$services as List<dynamic>?)?.map((e) => (e as String)).toList();
  }
  if (data.containsKey('paymentMethods')) {
    final l$paymentMethods = data['paymentMethods'];
    result$data['paymentMethods'] = (l$paymentMethods as List<dynamic>?)
        ?.map((e) => (e as String))
        .toList();
  }
  if (data.containsKey('loyaltyPrograms')) {
    final l$loyaltyPrograms = data['loyaltyPrograms'];
    result$data['loyaltyPrograms'] = (l$loyaltyPrograms as List<dynamic>?)
        ?.map((e) =>
            Input$POSLoyaltyInput.fromJson((e as Map<String, dynamic>)))
        .toList();
  }
  return Input$PointOfSaleInput._(result$data);
}