DedicatedDatabase.fromMap constructor
DedicatedDatabase.fromMap(
- Map<String, dynamic> map
)
Implementation
factory DedicatedDatabase.fromMap(Map<String, dynamic> map) {
return DedicatedDatabase(
$id: map['\$id'].toString(),
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
projectId: map['projectId'].toString(),
name: map['name'].toString(),
api: map['api'].toString(),
engine: map['engine'].toString(),
version: map['version'].toString(),
specification: map['specification'].toString(),
backend: map['backend'].toString(),
hostname: map['hostname'].toString(),
connectionPort: map['connectionPort'],
connectionUser: map['connectionUser'].toString(),
connectionPassword: map['connectionPassword'].toString(),
connectionString: map['connectionString'].toString(),
ssl: map['ssl'],
status: map['status'].toString(),
containerStatus: map['containerStatus'].toString(),
lastAccessedAt: map['lastAccessedAt']?.toString(),
idleUntil: map['idleUntil']?.toString(),
lifecycleState: map['lifecycleState'].toString(),
idleTimeoutMinutes: map['idleTimeoutMinutes'],
cpu: map['cpu'],
memory: map['memory'],
storage: map['storage'],
storageClass: map['storageClass'].toString(),
storageMaxGb: map['storageMaxGb'],
nodePool: map['nodePool'].toString(),
replicas: map['replicas'],
syncMode: map['syncMode'].toString(),
crossRegionReplicas: map['crossRegionReplicas'],
networkMaxConnections: map['networkMaxConnections'],
networkIdleTimeoutSeconds: map['networkIdleTimeoutSeconds'],
networkIPAllowlist: List.from(map['networkIPAllowlist'] ?? []),
backupEnabled: map['backupEnabled'],
pitr: map['pitr'],
pitrRetentionDays: map['pitrRetentionDays'],
storageAutoscaling: map['storageAutoscaling'],
storageAutoscalingThresholdPercent:
map['storageAutoscalingThresholdPercent'],
storageAutoscalingMaxGb: map['storageAutoscalingMaxGb'],
maintenanceWindowDay: map['maintenanceWindowDay'].toString(),
maintenanceWindowHourUtc: map['maintenanceWindowHourUtc'],
metricsEnabled: map['metricsEnabled'],
sqlApiEnabled: map['sqlApiEnabled'],
sqlApiAllowedStatements: List.from(map['sqlApiAllowedStatements'] ?? []),
sqlApiMaxRows: map['sqlApiMaxRows'],
sqlApiMaxBytes: map['sqlApiMaxBytes'],
sqlApiTimeoutSeconds: map['sqlApiTimeoutSeconds'],
error: map['error'].toString(),
);
}