SecretListEntry.fromJson constructor

SecretListEntry.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory SecretListEntry.fromJson(Map<String, dynamic> json) {
  return SecretListEntry(
    arn: json['ARN'] as String?,
    createdDate: timeStampFromJson(json['CreatedDate']),
    deletedDate: timeStampFromJson(json['DeletedDate']),
    description: json['Description'] as String?,
    kmsKeyId: json['KmsKeyId'] as String?,
    lastAccessedDate: timeStampFromJson(json['LastAccessedDate']),
    lastChangedDate: timeStampFromJson(json['LastChangedDate']),
    lastRotatedDate: timeStampFromJson(json['LastRotatedDate']),
    name: json['Name'] as String?,
    owningService: json['OwningService'] as String?,
    rotationEnabled: json['RotationEnabled'] as bool?,
    rotationLambdaARN: json['RotationLambdaARN'] as String?,
    rotationRules: json['RotationRules'] != null
        ? RotationRulesType.fromJson(
            json['RotationRules'] as Map<String, dynamic>)
        : null,
    secretVersionsToStages: (json['SecretVersionsToStages']
            as Map<String, dynamic>?)
        ?.map((k, e) => MapEntry(
            k, (e as List).whereNotNull().map((e) => e as String).toList())),
    tags: (json['Tags'] as List?)
        ?.whereNotNull()
        .map((e) => Tag.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}