EventSelector.fromJson constructor

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

Implementation

factory EventSelector.fromJson(Map<String, dynamic> json) {
  return EventSelector(
    dataResources: (json['DataResources'] as List?)
        ?.whereNotNull()
        .map((e) => DataResource.fromJson(e as Map<String, dynamic>))
        .toList(),
    excludeManagementEventSources:
        (json['ExcludeManagementEventSources'] as List?)
            ?.whereNotNull()
            .map((e) => e as String)
            .toList(),
    includeManagementEvents: json['IncludeManagementEvents'] as bool?,
    readWriteType: (json['ReadWriteType'] as String?)?.toReadWriteType(),
  );
}