public function toArray()
    {
        if ($this->stub) {
            $json = ['stub' => true];
        } else {
            $json = ['data' => $this->getBase64EncodedData()];
            if ($this->contentType) {
                $json['content_type'] = $this->contentType;
            }
        }

        return $json;
    }