Input$UserWithTargetInput.fromJson constructor

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

Implementation

factory Input$UserWithTargetInput.fromJson(Map<String, dynamic> data) {
  final result$data = <String, dynamic>{};
  if (data.containsKey('email')) {
    final l$email = data['email'];
    result$data['email'] = (l$email as String?);
  }
  if (data.containsKey('username')) {
    final l$username = data['username'];
    result$data['username'] = (l$username as String?);
  }
  if (data.containsKey('phone')) {
    final l$phone = data['phone'];
    result$data['phone'] = l$phone == null
        ? null
        : Input$IPhoneInput.fromJson((l$phone as Map<String, dynamic>));
  }
  if (data.containsKey('permission')) {
    final l$permission = data['permission'];
    result$data['permission'] = (l$permission as String?);
  }
  final l$password = data['password'];
  result$data['password'] = (l$password as String);
  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('pictures')) {
    final l$pictures = data['pictures'];
    result$data['pictures'] = (l$pictures as List<dynamic>?)
        ?.map((e) => Input$PictureInput.fromJson((e as Map<String, dynamic>)))
        .toList();
  }
  if (data.containsKey('covers')) {
    final l$covers = data['covers'];
    result$data['covers'] = (l$covers as List<dynamic>?)
        ?.map((e) => Input$PictureInput.fromJson((e as Map<String, dynamic>)))
        .toList();
  }
  if (data.containsKey('firstName')) {
    final l$firstName = data['firstName'];
    result$data['firstName'] = (l$firstName as String?);
  }
  if (data.containsKey('status')) {
    final l$status = data['status'];
    result$data['status'] = l$status == null
        ? null
        : fromJson$Enum$UserStatus((l$status as String));
  }
  if (data.containsKey('title')) {
    final l$title = data['title'];
    result$data['title'] = (l$title as String?);
  }
  if (data.containsKey('about')) {
    final l$about = data['about'];
    result$data['about'] = (l$about as String?);
  }
  if (data.containsKey('lastName')) {
    final l$lastName = data['lastName'];
    result$data['lastName'] = (l$lastName as String?);
  }
  if (data.containsKey('maritalStatus')) {
    final l$maritalStatus = data['maritalStatus'];
    result$data['maritalStatus'] = l$maritalStatus == null
        ? null
        : fromJson$Enum$MaritalStatus((l$maritalStatus as String));
  }
  if (data.containsKey('gender')) {
    final l$gender = data['gender'];
    result$data['gender'] =
        l$gender == null ? null : fromJson$Enum$Gender((l$gender as String));
  }
  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('education')) {
    final l$education = data['education'];
    result$data['education'] = (l$education as List<dynamic>?)
        ?.map((e) =>
            Input$UserEducationInput.fromJson((e as Map<String, dynamic>)))
        .toList();
  }
  if (data.containsKey('work')) {
    final l$work = data['work'];
    result$data['work'] = (l$work as List<dynamic>?)
        ?.map(
            (e) => Input$UserWorkInput.fromJson((e as Map<String, dynamic>)))
        .toList();
  }
  if (data.containsKey('lived')) {
    final l$lived = data['lived'];
    result$data['lived'] =
        (l$lived as List<dynamic>?)?.map((e) => (e as String)).toList();
  }
  if (data.containsKey('hobbies')) {
    final l$hobbies = data['hobbies'];
    result$data['hobbies'] =
        (l$hobbies as List<dynamic>?)?.map((e) => (e as String)).toList();
  }
  if (data.containsKey('interests')) {
    final l$interests = data['interests'];
    result$data['interests'] =
        (l$interests as List<dynamic>?)?.map((e) => (e as String)).toList();
  }
  if (data.containsKey('isMailValid')) {
    final l$isMailValid = data['isMailValid'];
    result$data['isMailValid'] = (l$isMailValid as bool?);
  }
  if (data.containsKey('plugged')) {
    final l$plugged = data['plugged'];
    result$data['plugged'] = (l$plugged as bool?);
  }
  if (data.containsKey('dateOfBirth')) {
    final l$dateOfBirth = data['dateOfBirth'];
    result$data['dateOfBirth'] =
        l$dateOfBirth == null ? null : dateTimeFromJson(l$dateOfBirth);
  }
  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('nationality')) {
    final l$nationality = data['nationality'];
    result$data['nationality'] = (l$nationality as String?);
  }
  if (data.containsKey('locale')) {
    final l$locale = data['locale'];
    result$data['locale'] = (l$locale as String?);
  }
  if (data.containsKey('placeOfBirth')) {
    final l$placeOfBirth = data['placeOfBirth'];
    result$data['placeOfBirth'] = (l$placeOfBirth as String?);
  }
  if (data.containsKey('residentialAddress')) {
    final l$residentialAddress = data['residentialAddress'];
    result$data['residentialAddress'] =
        (l$residentialAddress as List<dynamic>?)
            ?.map((e) =>
                Input$FullAddressInput.fromJson((e as Map<String, dynamic>)))
            .toList();
  }
  if (data.containsKey('shippingAddress')) {
    final l$shippingAddress = data['shippingAddress'];
    result$data['shippingAddress'] = (l$shippingAddress as List<dynamic>?)
        ?.map((e) =>
            Input$FullAddressInput.fromJson((e as Map<String, dynamic>)))
        .toList();
  }
  if (data.containsKey('billingAddress')) {
    final l$billingAddress = data['billingAddress'];
    result$data['billingAddress'] = (l$billingAddress as List<dynamic>?)
        ?.map((e) =>
            Input$FullAddressInput.fromJson((e as Map<String, dynamic>)))
        .toList();
  }
  if (data.containsKey('mobileTheme')) {
    final l$mobileTheme = data['mobileTheme'];
    result$data['mobileTheme'] = l$mobileTheme == null
        ? null
        : fromJson$Enum$MobileThemesEnum((l$mobileTheme as String));
  }
  if (data.containsKey('source')) {
    final l$source = data['source'];
    result$data['source'] = l$source == null
        ? null
        : fromJson$Enum$SourcesEnum((l$source as String));
  }
  if (data.containsKey('newsletterSubs')) {
    final l$newsletterSubs = data['newsletterSubs'];
    result$data['newsletterSubs'] = (l$newsletterSubs as bool?);
  }
  if (data.containsKey('custom')) {
    final l$custom = data['custom'];
    result$data['custom'] = (l$custom as List<dynamic>?)
        ?.map((e) =>
            Input$UserCustomInput.fromJson((e as Map<String, dynamic>)))
        .toList();
  }
  final l$roles = data['roles'];
  result$data['roles'] = (l$roles as List<dynamic>)
      .map((e) => fromJson$Enum$UserRole((e as String)))
      .toList();
  if (data.containsKey('apps')) {
    final l$apps = data['apps'];
    result$data['apps'] = (l$apps as List<dynamic>?)
        ?.map((e) => fromJson$Enum$App((e as String)))
        .toList();
  }
  if (data.containsKey('phoneNumber')) {
    final l$phoneNumber = data['phoneNumber'];
    result$data['phoneNumber'] = (l$phoneNumber as String?);
  }
  final l$target = data['target'];
  result$data['target'] =
      Input$TargetACIInput.fromJson((l$target as Map<String, dynamic>));
  if (data.containsKey('subject')) {
    final l$subject = data['subject'];
    result$data['subject'] = (l$subject as String?);
  }
  return Input$UserWithTargetInput._(result$data);
}