toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final destinationArn = this.destinationArn;
  final events = this.events;
  final name = this.name;
  final branches = this.branches;
  final customData = this.customData;
  return {
    'destinationArn': destinationArn,
    'events': events.map((e) => e.toValue()).toList(),
    'name': name,
    if (branches != null) 'branches': branches,
    if (customData != null) 'customData': customData,
  };
}