DescribedServer.fromJson constructor
DescribedServer.fromJson(
- Map<String, dynamic> json
)
Implementation
factory DescribedServer.fromJson(Map<String, dynamic> json) {
return DescribedServer(
arn: json['Arn'] as String,
certificate: json['Certificate'] as String?,
endpointDetails: json['EndpointDetails'] != null
? EndpointDetails.fromJson(
json['EndpointDetails'] as Map<String, dynamic>)
: null,
endpointType: (json['EndpointType'] as String?)?.toEndpointType(),
hostKeyFingerprint: json['HostKeyFingerprint'] as String?,
identityProviderDetails: json['IdentityProviderDetails'] != null
? IdentityProviderDetails.fromJson(
json['IdentityProviderDetails'] as Map<String, dynamic>)
: null,
identityProviderType:
(json['IdentityProviderType'] as String?)?.toIdentityProviderType(),
loggingRole: json['LoggingRole'] as String?,
protocols: (json['Protocols'] as List?)
?.whereNotNull()
.map((e) => (e as String).toProtocol())
.toList(),
securityPolicyName: json['SecurityPolicyName'] as String?,
serverId: json['ServerId'] as String?,
state: (json['State'] as String?)?.toState(),
tags: (json['Tags'] as List?)
?.whereNotNull()
.map((e) => Tag.fromJson(e as Map<String, dynamic>))
.toList(),
userCount: json['UserCount'] as int?,
);
}