toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final actions = this.actions;
  final eventSource = this.eventSource;
  final parameters = this.parameters;
  final policyType = this.policyType;
  final resourceTypes = this.resourceTypes;
  final schedules = this.schedules;
  final targetTags = this.targetTags;
  return {
    if (actions != null) 'Actions': actions,
    if (eventSource != null) 'EventSource': eventSource,
    if (parameters != null) 'Parameters': parameters,
    if (policyType != null) 'PolicyType': policyType.toValue(),
    if (resourceTypes != null)
      'ResourceTypes': resourceTypes.map((e) => e.toValue()).toList(),
    if (schedules != null) 'Schedules': schedules,
    if (targetTags != null) 'TargetTags': targetTags,
  };
}