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