EventDestination.fromJson constructor
EventDestination.fromJson(
- Map<String, dynamic> json
)
Implementation
factory EventDestination.fromJson(Map<String, dynamic> json) {
return EventDestination(
matchingEventTypes: (json['MatchingEventTypes'] as List)
.whereNotNull()
.map((e) => (e as String).toEventType())
.toList(),
name: json['Name'] as String,
cloudWatchDestination: json['CloudWatchDestination'] != null
? CloudWatchDestination.fromJson(
json['CloudWatchDestination'] as Map<String, dynamic>)
: null,
enabled: json['Enabled'] as bool?,
kinesisFirehoseDestination: json['KinesisFirehoseDestination'] != null
? KinesisFirehoseDestination.fromJson(
json['KinesisFirehoseDestination'] as Map<String, dynamic>)
: null,
pinpointDestination: json['PinpointDestination'] != null
? PinpointDestination.fromJson(
json['PinpointDestination'] as Map<String, dynamic>)
: null,
snsDestination: json['SnsDestination'] != null
? SnsDestination.fromJson(
json['SnsDestination'] as Map<String, dynamic>)
: null,
);
}