toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final matchingEventTypes = this.matchingEventTypes;
  final name = this.name;
  final cloudWatchDestination = this.cloudWatchDestination;
  final enabled = this.enabled;
  final kinesisFirehoseDestination = this.kinesisFirehoseDestination;
  final sNSDestination = this.sNSDestination;
  return {
    'MatchingEventTypes': matchingEventTypes.map((e) => e.toValue()).toList(),
    'Name': name,
    if (cloudWatchDestination != null)
      'CloudWatchDestination': cloudWatchDestination,
    if (enabled != null) 'Enabled': enabled,
    if (kinesisFirehoseDestination != null)
      'KinesisFirehoseDestination': kinesisFirehoseDestination,
    if (sNSDestination != null) 'SNSDestination': sNSDestination,
  };
}