RelationalDatabase.fromJson constructor

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

Implementation

factory RelationalDatabase.fromJson(Map<String, dynamic> json) {
  return RelationalDatabase(
    arn: json['arn'] as String?,
    backupRetentionEnabled: json['backupRetentionEnabled'] as bool?,
    caCertificateIdentifier: json['caCertificateIdentifier'] as String?,
    createdAt: timeStampFromJson(json['createdAt']),
    engine: json['engine'] as String?,
    engineVersion: json['engineVersion'] as String?,
    hardware: json['hardware'] != null
        ? RelationalDatabaseHardware.fromJson(
            json['hardware'] as Map<String, dynamic>)
        : null,
    latestRestorableTime: timeStampFromJson(json['latestRestorableTime']),
    location: json['location'] != null
        ? ResourceLocation.fromJson(json['location'] as Map<String, dynamic>)
        : null,
    masterDatabaseName: json['masterDatabaseName'] as String?,
    masterEndpoint: json['masterEndpoint'] != null
        ? RelationalDatabaseEndpoint.fromJson(
            json['masterEndpoint'] as Map<String, dynamic>)
        : null,
    masterUsername: json['masterUsername'] as String?,
    name: json['name'] as String?,
    parameterApplyStatus: json['parameterApplyStatus'] as String?,
    pendingMaintenanceActions: (json['pendingMaintenanceActions'] as List?)
        ?.whereNotNull()
        .map((e) =>
            PendingMaintenanceAction.fromJson(e as Map<String, dynamic>))
        .toList(),
    pendingModifiedValues: json['pendingModifiedValues'] != null
        ? PendingModifiedRelationalDatabaseValues.fromJson(
            json['pendingModifiedValues'] as Map<String, dynamic>)
        : null,
    preferredBackupWindow: json['preferredBackupWindow'] as String?,
    preferredMaintenanceWindow: json['preferredMaintenanceWindow'] as String?,
    publiclyAccessible: json['publiclyAccessible'] as bool?,
    relationalDatabaseBlueprintId:
        json['relationalDatabaseBlueprintId'] as String?,
    relationalDatabaseBundleId: json['relationalDatabaseBundleId'] as String?,
    resourceType: (json['resourceType'] as String?)?.toResourceType(),
    secondaryAvailabilityZone: json['secondaryAvailabilityZone'] as String?,
    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(),
  );
}