build method

  1. @override
RawApiMap build()
override

Returns built response for api

Implementation

@override
RawApiMap build() => {
      'name': name,
      'event_type': eventType.value,
      'trigger_type': triggerType.value,
      'actions': actions.map((a) => a.build()).toList(),
      if (triggerMetadata != null) 'trigger_metadata': triggerMetadata!.build(),
      if (enabled != null) 'enabled': enabled,
      if (ignoredRoles != null) 'exempt_roles': ignoredRoles!.map((s) => s.toString()).toList(),
      if (ignoredChannels != null) 'exempt_channels': ignoredChannels!.map((s) => s.toString()).toList(),
    };