LoggingOptions.fromJson constructor

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

Implementation

factory LoggingOptions.fromJson(Map<String, dynamic> json) {
  return LoggingOptions(
    enabled: json['enabled'] as bool,
    level: (json['level'] as String).toLoggingLevel(),
    roleArn: json['roleArn'] as String,
    detectorDebugOptions: (json['detectorDebugOptions'] as List?)
        ?.whereNotNull()
        .map((e) => DetectorDebugOption.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}