Domain.fromJson constructor

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

Implementation

factory Domain.fromJson(Map<String, dynamic> json) {
  return Domain(
    arn: json['arn'] as String?,
    createdAt: timeStampFromJson(json['createdAt']),
    domainEntries: (json['domainEntries'] as List?)
        ?.whereNotNull()
        .map((e) => DomainEntry.fromJson(e as Map<String, dynamic>))
        .toList(),
    location: json['location'] != null
        ? ResourceLocation.fromJson(json['location'] as Map<String, dynamic>)
        : null,
    name: json['name'] as String?,
    resourceType: (json['resourceType'] as String?)?.toResourceType(),
    supportCode: json['supportCode'] as String?,
    tags: (json['tags'] as List?)
        ?.whereNotNull()
        .map((e) => Tag.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}