toJson method
Implementation
Map<String, dynamic> toJson() {
final cloudWatchDestination = this.cloudWatchDestination;
final enabled = this.enabled;
final kinesisFirehoseDestination = this.kinesisFirehoseDestination;
final matchingEventTypes = this.matchingEventTypes;
final pinpointDestination = this.pinpointDestination;
final snsDestination = this.snsDestination;
return {
if (cloudWatchDestination != null)
'CloudWatchDestination': cloudWatchDestination,
if (enabled != null) 'Enabled': enabled,
if (kinesisFirehoseDestination != null)
'KinesisFirehoseDestination': kinesisFirehoseDestination,
if (matchingEventTypes != null)
'MatchingEventTypes':
matchingEventTypes.map((e) => e.toValue()).toList(),
if (pinpointDestination != null)
'PinpointDestination': pinpointDestination,
if (snsDestination != null) 'SnsDestination': snsDestination,
};
}