code: protected function getMessageFromEvent(ResourceEventInterface $event)
      {
          $message = $event->getResource();
  
          if (!$message instanceof TicketMessageInterface) {
              throw new UnexpectedValueException("Expected instance of " . TicketMessageInterface::class);
          }
  
          return $message;
      }
docs: Returns the message from the event.
  
  @param ResourceEventInterface $event
  
  @return TicketMessageInterface