Entitlement.fromJson constructor
Entitlement.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Entitlement.fromJson(Map<String, dynamic> json) {
return Entitlement(
entitlementArn: json['entitlementArn'] as String,
name: json['name'] as String,
subscribers: (json['subscribers'] as List)
.whereNotNull()
.map((e) => e as String)
.toList(),
dataTransferSubscriberFeePercent:
json['dataTransferSubscriberFeePercent'] as int?,
description: json['description'] as String?,
encryption: json['encryption'] != null
? Encryption.fromJson(json['encryption'] as Map<String, dynamic>)
: null,
entitlementStatus:
(json['entitlementStatus'] as String?)?.toEntitlementStatus(),
);
}