Account.fromJson constructor

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

Implementation

factory Account.fromJson(Map<String, dynamic> json) {
  return Account(
    accountId: json['AccountId'] as String,
    awsAccountId: json['AwsAccountId'] as String,
    name: json['Name'] as String,
    accountType: (json['AccountType'] as String?)?.toAccountType(),
    createdTimestamp: timeStampFromJson(json['CreatedTimestamp']),
    defaultLicense: (json['DefaultLicense'] as String?)?.toLicense(),
    signinDelegateGroups: (json['SigninDelegateGroups'] as List?)
        ?.whereNotNull()
        .map((e) => SigninDelegateGroup.fromJson(e as Map<String, dynamic>))
        .toList(),
    supportedLicenses: (json['SupportedLicenses'] as List?)
        ?.whereNotNull()
        .map((e) => (e as String).toLicense())
        .toList(),
  );
}