code: public function setDefinition($definition)
      {
          if (is_array($definition)) {
              $this->definition = $definition;
  
              return $this;
          }
          $this->definition = json_decode($definition, true);
          if (null === $this->definition) {
              $this->definition = $definition;
          }
  
          return $this;
      }
docs: Sets the "definition" of the Protocol.
  
  @param array|string $definition
  
  @return Protocol