Cluster.fromJson constructor
Cluster.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Cluster.fromJson(Map<String, dynamic> json) {
return Cluster(
activeNodes: json['ActiveNodes'] as int?,
clusterArn: json['ClusterArn'] as String?,
clusterDiscoveryEndpoint: json['ClusterDiscoveryEndpoint'] != null
? Endpoint.fromJson(
json['ClusterDiscoveryEndpoint'] as Map<String, dynamic>)
: null,
clusterName: json['ClusterName'] as String?,
description: json['Description'] as String?,
iamRoleArn: json['IamRoleArn'] as String?,
nodeIdsToRemove: (json['NodeIdsToRemove'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
nodeType: json['NodeType'] as String?,
nodes: (json['Nodes'] as List?)
?.whereNotNull()
.map((e) => Node.fromJson(e as Map<String, dynamic>))
.toList(),
notificationConfiguration: json['NotificationConfiguration'] != null
? NotificationConfiguration.fromJson(
json['NotificationConfiguration'] as Map<String, dynamic>)
: null,
parameterGroup: json['ParameterGroup'] != null
? ParameterGroupStatus.fromJson(
json['ParameterGroup'] as Map<String, dynamic>)
: null,
preferredMaintenanceWindow: json['PreferredMaintenanceWindow'] as String?,
sSEDescription: json['SSEDescription'] != null
? SSEDescription.fromJson(
json['SSEDescription'] as Map<String, dynamic>)
: null,
securityGroups: (json['SecurityGroups'] as List?)
?.whereNotNull()
.map((e) =>
SecurityGroupMembership.fromJson(e as Map<String, dynamic>))
.toList(),
status: json['Status'] as String?,
subnetGroup: json['SubnetGroup'] as String?,
totalNodes: json['TotalNodes'] as int?,
);
}