GetUserResponse.fromJson constructor

GetUserResponse.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory GetUserResponse.fromJson(Map<String, dynamic> json) {
  return GetUserResponse(
    userAttributes: (json['UserAttributes'] as List)
        .whereNotNull()
        .map((e) => AttributeType.fromJson(e as Map<String, dynamic>))
        .toList(),
    username: json['Username'] as String,
    mFAOptions: (json['MFAOptions'] as List?)
        ?.whereNotNull()
        .map((e) => MFAOptionType.fromJson(e as Map<String, dynamic>))
        .toList(),
    preferredMfaSetting: json['PreferredMfaSetting'] as String?,
    userMFASettingList: (json['UserMFASettingList'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
  );
}