DescribeUserResponse.fromJson constructor

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

Implementation

factory DescribeUserResponse.fromJson(Map<String, dynamic> json) {
  return DescribeUserResponse(
    brokerId: json['brokerId'] as String?,
    consoleAccess: json['consoleAccess'] as bool?,
    groups: (json['groups'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    pending: json['pending'] != null
        ? UserPendingChanges.fromJson(json['pending'] as Map<String, dynamic>)
        : null,
    username: json['username'] as String?,
  );
}