GrantedLicense.fromJson constructor
GrantedLicense.fromJson(
- Map<String, dynamic> json
)
Implementation
factory GrantedLicense.fromJson(Map<String, dynamic> json) {
return GrantedLicense(
beneficiary: json['Beneficiary'] as String?,
consumptionConfiguration: json['ConsumptionConfiguration'] != null
? ConsumptionConfiguration.fromJson(
json['ConsumptionConfiguration'] as Map<String, dynamic>)
: null,
createTime: json['CreateTime'] as String?,
entitlements: (json['Entitlements'] as List?)
?.whereNotNull()
.map((e) => Entitlement.fromJson(e as Map<String, dynamic>))
.toList(),
homeRegion: json['HomeRegion'] as String?,
issuer: json['Issuer'] != null
? IssuerDetails.fromJson(json['Issuer'] as Map<String, dynamic>)
: null,
licenseArn: json['LicenseArn'] as String?,
licenseMetadata: (json['LicenseMetadata'] as List?)
?.whereNotNull()
.map((e) => Metadata.fromJson(e as Map<String, dynamic>))
.toList(),
licenseName: json['LicenseName'] as String?,
productName: json['ProductName'] as String?,
productSKU: json['ProductSKU'] as String?,
receivedMetadata: json['ReceivedMetadata'] != null
? ReceivedMetadata.fromJson(
json['ReceivedMetadata'] as Map<String, dynamic>)
: null,
status: (json['Status'] as String?)?.toLicenseStatus(),
validity: json['Validity'] != null
? DatetimeRange.fromJson(json['Validity'] as Map<String, dynamic>)
: null,
version: json['Version'] as String?,
);
}