RelationalDatabaseSnapshot.fromJson constructor

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

Implementation

factory RelationalDatabaseSnapshot.fromJson(Map<String, dynamic> json) {
  return RelationalDatabaseSnapshot(
    arn: json['arn'] as String?,
    createdAt: timeStampFromJson(json['createdAt']),
    engine: json['engine'] as String?,
    engineVersion: json['engineVersion'] as String?,
    fromRelationalDatabaseArn: json['fromRelationalDatabaseArn'] as String?,
    fromRelationalDatabaseBlueprintId:
        json['fromRelationalDatabaseBlueprintId'] as String?,
    fromRelationalDatabaseBundleId:
        json['fromRelationalDatabaseBundleId'] as String?,
    fromRelationalDatabaseName: json['fromRelationalDatabaseName'] as String?,
    location: json['location'] != null
        ? ResourceLocation.fromJson(json['location'] as Map<String, dynamic>)
        : null,
    name: json['name'] as String?,
    resourceType: (json['resourceType'] as String?)?.toResourceType(),
    sizeInGb: json['sizeInGb'] as int?,
    state: json['state'] as String?,
    supportCode: json['supportCode'] as String?,
    tags: (json['tags'] as List?)
        ?.whereNotNull()
        .map((e) => Tag.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}