toAutomationCommands method

AutomationCommands toAutomationCommands()

Convert from a SYZ_AUTOMATION_COMMANDS member.

Implementation

AutomationCommands toAutomationCommands() {
  switch (this) {
    case SYZ_AUTOMATION_COMMANDS.SYZ_AUTOMATION_COMMAND_APPEND_PROPERTY:
      return AutomationCommands.appendProperty;
    case SYZ_AUTOMATION_COMMANDS.SYZ_AUTOMATION_COMMAND_SEND_USER_EVENT:
      return AutomationCommands.sendUserEvent;
    case SYZ_AUTOMATION_COMMANDS.SYZ_AUTOMATION_COMMAND_CLEAR_PROPERTY:
      return AutomationCommands.clearProperty;
    case SYZ_AUTOMATION_COMMANDS.SYZ_AUTOMATION_COMMAND_CLEAR_EVENTS:
      return AutomationCommands.clearEvents;
    case SYZ_AUTOMATION_COMMANDS.SYZ_AUTOMATION_COMMAND_CLEAR_ALL_PROPERTIES:
      return AutomationCommands.clearAllProperties;
    default:
      throw SynthizerError(
        'Unrecognised `SYZ_AUTOMATION_COMMANDS` member.',
        this,
      );
  }
}