CertificateDetail.fromJson constructor
CertificateDetail.fromJson(
- Map<String, dynamic> json
)
Implementation
factory CertificateDetail.fromJson(Map<String, dynamic> json) {
return CertificateDetail(
certificateArn: json['CertificateArn'] as String?,
certificateAuthorityArn: json['CertificateAuthorityArn'] as String?,
createdAt: timeStampFromJson(json['CreatedAt']),
domainName: json['DomainName'] as String?,
domainValidationOptions: (json['DomainValidationOptions'] as List?)
?.whereNotNull()
.map((e) => DomainValidation.fromJson(e as Map<String, dynamic>))
.toList(),
extendedKeyUsages: (json['ExtendedKeyUsages'] as List?)
?.whereNotNull()
.map((e) => ExtendedKeyUsage.fromJson(e as Map<String, dynamic>))
.toList(),
failureReason: (json['FailureReason'] as String?)?.toFailureReason(),
importedAt: timeStampFromJson(json['ImportedAt']),
inUseBy: (json['InUseBy'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
issuedAt: timeStampFromJson(json['IssuedAt']),
issuer: json['Issuer'] as String?,
keyAlgorithm: (json['KeyAlgorithm'] as String?)?.toKeyAlgorithm(),
keyUsages: (json['KeyUsages'] as List?)
?.whereNotNull()
.map((e) => KeyUsage.fromJson(e as Map<String, dynamic>))
.toList(),
notAfter: timeStampFromJson(json['NotAfter']),
notBefore: timeStampFromJson(json['NotBefore']),
options: json['Options'] != null
? CertificateOptions.fromJson(json['Options'] as Map<String, dynamic>)
: null,
renewalEligibility:
(json['RenewalEligibility'] as String?)?.toRenewalEligibility(),
renewalSummary: json['RenewalSummary'] != null
? RenewalSummary.fromJson(
json['RenewalSummary'] as Map<String, dynamic>)
: null,
revocationReason:
(json['RevocationReason'] as String?)?.toRevocationReason(),
revokedAt: timeStampFromJson(json['RevokedAt']),
serial: json['Serial'] as String?,
signatureAlgorithm: json['SignatureAlgorithm'] as String?,
status: (json['Status'] as String?)?.toCertificateStatus(),
subject: json['Subject'] as String?,
subjectAlternativeNames: (json['SubjectAlternativeNames'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
type: (json['Type'] as String?)?.toCertificateType(),
);
}