/**
  * @param TaskId $taskId
  * @param TaskType $taskType
  * @param MessageHandler $messageHandler
  * @param Prototype $processingType
  * @param ProcessingMetadata $metadata
  * @return TaskWasSetUp
  */
 public static function with(TaskId $taskId, TaskType $taskType, MessageHandler $messageHandler, Prototype $processingType, ProcessingMetadata $metadata)
 {
     $event = self::occur($taskId->toString(), ['task_type' => $taskType->toString(), 'message_handler_id' => $messageHandler->messageHandlerId()->toString(), 'processing_type' => $processingType->of(), 'task_metadata' => $metadata->toArray()]);
     $event->taskId = $taskId;
     $event->taskType = $taskType;
     $event->messageHandlerId = $messageHandler->messageHandlerId();
     $event->processingType = $processingType;
     $event->taskMetadata = $metadata;
     return $event;
 }
 /**
  * @param TaskType $other
  * @return bool
  */
 public function equals(TaskType $other)
 {
     return $this->toString() === $other->toString();
 }