Cluster.fromJson constructor
Cluster.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Cluster.fromJson(Map<String, dynamic> json) {
return Cluster(
arn: json['arn'] as String?,
certificateAuthority: json['certificateAuthority'] != null
? Certificate.fromJson(
json['certificateAuthority'] as Map<String, dynamic>)
: null,
clientRequestToken: json['clientRequestToken'] as String?,
createdAt: timeStampFromJson(json['createdAt']),
encryptionConfig: (json['encryptionConfig'] as List?)
?.whereNotNull()
.map((e) => EncryptionConfig.fromJson(e as Map<String, dynamic>))
.toList(),
endpoint: json['endpoint'] as String?,
identity: json['identity'] != null
? Identity.fromJson(json['identity'] as Map<String, dynamic>)
: null,
kubernetesNetworkConfig: json['kubernetesNetworkConfig'] != null
? KubernetesNetworkConfigResponse.fromJson(
json['kubernetesNetworkConfig'] as Map<String, dynamic>)
: null,
logging: json['logging'] != null
? Logging.fromJson(json['logging'] as Map<String, dynamic>)
: null,
name: json['name'] as String?,
platformVersion: json['platformVersion'] as String?,
resourcesVpcConfig: json['resourcesVpcConfig'] != null
? VpcConfigResponse.fromJson(
json['resourcesVpcConfig'] as Map<String, dynamic>)
: null,
roleArn: json['roleArn'] as String?,
status: (json['status'] as String?)?.toClusterStatus(),
tags: (json['tags'] as Map<String, dynamic>?)
?.map((k, e) => MapEntry(k, e as String)),
version: json['version'] as String?,
);
}