toJson method

Map<String, dynamic> toJson()

Implementation

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