<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: WAProto.proto

namespace PhpWA\Protocol\Proto\Message;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\RepeatedField;

/**
 * Generated from protobuf message <code>proto.Message.DocumentMessage</code>
 */
class DocumentMessage extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string url = 1;</code>
     */
    protected $url = null;
    /**
     * Generated from protobuf field <code>optional string mimetype = 2;</code>
     */
    protected $mimetype = null;
    /**
     * Generated from protobuf field <code>optional string title = 3;</code>
     */
    protected $title = null;
    /**
     * Generated from protobuf field <code>optional bytes fileSha256 = 4;</code>
     */
    protected $fileSha256 = null;
    /**
     * Generated from protobuf field <code>optional uint64 fileLength = 5;</code>
     */
    protected $fileLength = null;
    /**
     * Generated from protobuf field <code>optional uint32 pageCount = 6;</code>
     */
    protected $pageCount = null;
    /**
     * Generated from protobuf field <code>optional bytes mediaKey = 7;</code>
     */
    protected $mediaKey = null;
    /**
     * Generated from protobuf field <code>optional string fileName = 8;</code>
     */
    protected $fileName = null;
    /**
     * Generated from protobuf field <code>optional bytes fileEncSha256 = 9;</code>
     */
    protected $fileEncSha256 = null;
    /**
     * Generated from protobuf field <code>optional string directPath = 10;</code>
     */
    protected $directPath = null;
    /**
     * Generated from protobuf field <code>optional int64 mediaKeyTimestamp = 11;</code>
     */
    protected $mediaKeyTimestamp = null;
    /**
     * Generated from protobuf field <code>optional bool contactVcard = 12;</code>
     */
    protected $contactVcard = null;
    /**
     * Generated from protobuf field <code>optional string thumbnailDirectPath = 13;</code>
     */
    protected $thumbnailDirectPath = null;
    /**
     * Generated from protobuf field <code>optional bytes thumbnailSha256 = 14;</code>
     */
    protected $thumbnailSha256 = null;
    /**
     * Generated from protobuf field <code>optional bytes thumbnailEncSha256 = 15;</code>
     */
    protected $thumbnailEncSha256 = null;
    /**
     * Generated from protobuf field <code>optional bytes jpegThumbnail = 16;</code>
     */
    protected $jpegThumbnail = null;
    /**
     * Generated from protobuf field <code>optional .proto.ContextInfo contextInfo = 17;</code>
     */
    protected $contextInfo = null;
    /**
     * Generated from protobuf field <code>optional uint32 thumbnailHeight = 18;</code>
     */
    protected $thumbnailHeight = null;
    /**
     * Generated from protobuf field <code>optional uint32 thumbnailWidth = 19;</code>
     */
    protected $thumbnailWidth = null;
    /**
     * Generated from protobuf field <code>optional string caption = 20;</code>
     */
    protected $caption = null;
    /**
     * Generated from protobuf field <code>optional string accessibilityLabel = 21;</code>
     */
    protected $accessibilityLabel = null;
    /**
     * Generated from protobuf field <code>optional .proto.Message.MediaKeyDomain mediaKeyDomain = 22;</code>
     */
    protected $mediaKeyDomain = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $url
     *     @type string $mimetype
     *     @type string $title
     *     @type string $fileSha256
     *     @type int|string $fileLength
     *     @type int $pageCount
     *     @type string $mediaKey
     *     @type string $fileName
     *     @type string $fileEncSha256
     *     @type string $directPath
     *     @type int|string $mediaKeyTimestamp
     *     @type bool $contactVcard
     *     @type string $thumbnailDirectPath
     *     @type string $thumbnailSha256
     *     @type string $thumbnailEncSha256
     *     @type string $jpegThumbnail
     *     @type \PhpWA\Protocol\Proto\ContextInfo $contextInfo
     *     @type int $thumbnailHeight
     *     @type int $thumbnailWidth
     *     @type string $caption
     *     @type string $accessibilityLabel
     *     @type int $mediaKeyDomain
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional string url = 1;</code>
     * @return string
     */
    public function getUrl()
    {
        return isset($this->url) ? $this->url : '';
    }

    public function hasUrl()
    {
        return isset($this->url);
    }

    public function clearUrl()
    {
        unset($this->url);
    }

    /**
     * Generated from protobuf field <code>optional string url = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setUrl($var)
    {
        GPBUtil::checkString($var, True);
        $this->url = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string mimetype = 2;</code>
     * @return string
     */
    public function getMimetype()
    {
        return isset($this->mimetype) ? $this->mimetype : '';
    }

    public function hasMimetype()
    {
        return isset($this->mimetype);
    }

    public function clearMimetype()
    {
        unset($this->mimetype);
    }

    /**
     * Generated from protobuf field <code>optional string mimetype = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setMimetype($var)
    {
        GPBUtil::checkString($var, True);
        $this->mimetype = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string title = 3;</code>
     * @return string
     */
    public function getTitle()
    {
        return isset($this->title) ? $this->title : '';
    }

    public function hasTitle()
    {
        return isset($this->title);
    }

    public function clearTitle()
    {
        unset($this->title);
    }

    /**
     * Generated from protobuf field <code>optional string title = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setTitle($var)
    {
        GPBUtil::checkString($var, True);
        $this->title = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional bytes fileSha256 = 4;</code>
     * @return string
     */
    public function getFileSha256()
    {
        return isset($this->fileSha256) ? $this->fileSha256 : '';
    }

    public function hasFileSha256()
    {
        return isset($this->fileSha256);
    }

    public function clearFileSha256()
    {
        unset($this->fileSha256);
    }

    /**
     * Generated from protobuf field <code>optional bytes fileSha256 = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setFileSha256($var)
    {
        GPBUtil::checkString($var, False);
        $this->fileSha256 = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional uint64 fileLength = 5;</code>
     * @return int|string
     */
    public function getFileLength()
    {
        return isset($this->fileLength) ? $this->fileLength : 0;
    }

    public function hasFileLength()
    {
        return isset($this->fileLength);
    }

    public function clearFileLength()
    {
        unset($this->fileLength);
    }

    /**
     * Generated from protobuf field <code>optional uint64 fileLength = 5;</code>
     * @param int|string $var
     * @return $this
     */
    public function setFileLength($var)
    {
        GPBUtil::checkUint64($var);
        $this->fileLength = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional uint32 pageCount = 6;</code>
     * @return int
     */
    public function getPageCount()
    {
        return isset($this->pageCount) ? $this->pageCount : 0;
    }

    public function hasPageCount()
    {
        return isset($this->pageCount);
    }

    public function clearPageCount()
    {
        unset($this->pageCount);
    }

    /**
     * Generated from protobuf field <code>optional uint32 pageCount = 6;</code>
     * @param int $var
     * @return $this
     */
    public function setPageCount($var)
    {
        GPBUtil::checkUint32($var);
        $this->pageCount = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional bytes mediaKey = 7;</code>
     * @return string
     */
    public function getMediaKey()
    {
        return isset($this->mediaKey) ? $this->mediaKey : '';
    }

    public function hasMediaKey()
    {
        return isset($this->mediaKey);
    }

    public function clearMediaKey()
    {
        unset($this->mediaKey);
    }

    /**
     * Generated from protobuf field <code>optional bytes mediaKey = 7;</code>
     * @param string $var
     * @return $this
     */
    public function setMediaKey($var)
    {
        GPBUtil::checkString($var, False);
        $this->mediaKey = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string fileName = 8;</code>
     * @return string
     */
    public function getFileName()
    {
        return isset($this->fileName) ? $this->fileName : '';
    }

    public function hasFileName()
    {
        return isset($this->fileName);
    }

    public function clearFileName()
    {
        unset($this->fileName);
    }

    /**
     * Generated from protobuf field <code>optional string fileName = 8;</code>
     * @param string $var
     * @return $this
     */
    public function setFileName($var)
    {
        GPBUtil::checkString($var, True);
        $this->fileName = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional bytes fileEncSha256 = 9;</code>
     * @return string
     */
    public function getFileEncSha256()
    {
        return isset($this->fileEncSha256) ? $this->fileEncSha256 : '';
    }

    public function hasFileEncSha256()
    {
        return isset($this->fileEncSha256);
    }

    public function clearFileEncSha256()
    {
        unset($this->fileEncSha256);
    }

    /**
     * Generated from protobuf field <code>optional bytes fileEncSha256 = 9;</code>
     * @param string $var
     * @return $this
     */
    public function setFileEncSha256($var)
    {
        GPBUtil::checkString($var, False);
        $this->fileEncSha256 = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string directPath = 10;</code>
     * @return string
     */
    public function getDirectPath()
    {
        return isset($this->directPath) ? $this->directPath : '';
    }

    public function hasDirectPath()
    {
        return isset($this->directPath);
    }

    public function clearDirectPath()
    {
        unset($this->directPath);
    }

    /**
     * Generated from protobuf field <code>optional string directPath = 10;</code>
     * @param string $var
     * @return $this
     */
    public function setDirectPath($var)
    {
        GPBUtil::checkString($var, True);
        $this->directPath = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional int64 mediaKeyTimestamp = 11;</code>
     * @return int|string
     */
    public function getMediaKeyTimestamp()
    {
        return isset($this->mediaKeyTimestamp) ? $this->mediaKeyTimestamp : 0;
    }

    public function hasMediaKeyTimestamp()
    {
        return isset($this->mediaKeyTimestamp);
    }

    public function clearMediaKeyTimestamp()
    {
        unset($this->mediaKeyTimestamp);
    }

    /**
     * Generated from protobuf field <code>optional int64 mediaKeyTimestamp = 11;</code>
     * @param int|string $var
     * @return $this
     */
    public function setMediaKeyTimestamp($var)
    {
        GPBUtil::checkInt64($var);
        $this->mediaKeyTimestamp = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional bool contactVcard = 12;</code>
     * @return bool
     */
    public function getContactVcard()
    {
        return isset($this->contactVcard) ? $this->contactVcard : false;
    }

    public function hasContactVcard()
    {
        return isset($this->contactVcard);
    }

    public function clearContactVcard()
    {
        unset($this->contactVcard);
    }

    /**
     * Generated from protobuf field <code>optional bool contactVcard = 12;</code>
     * @param bool $var
     * @return $this
     */
    public function setContactVcard($var)
    {
        GPBUtil::checkBool($var);
        $this->contactVcard = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string thumbnailDirectPath = 13;</code>
     * @return string
     */
    public function getThumbnailDirectPath()
    {
        return isset($this->thumbnailDirectPath) ? $this->thumbnailDirectPath : '';
    }

    public function hasThumbnailDirectPath()
    {
        return isset($this->thumbnailDirectPath);
    }

    public function clearThumbnailDirectPath()
    {
        unset($this->thumbnailDirectPath);
    }

    /**
     * Generated from protobuf field <code>optional string thumbnailDirectPath = 13;</code>
     * @param string $var
     * @return $this
     */
    public function setThumbnailDirectPath($var)
    {
        GPBUtil::checkString($var, True);
        $this->thumbnailDirectPath = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional bytes thumbnailSha256 = 14;</code>
     * @return string
     */
    public function getThumbnailSha256()
    {
        return isset($this->thumbnailSha256) ? $this->thumbnailSha256 : '';
    }

    public function hasThumbnailSha256()
    {
        return isset($this->thumbnailSha256);
    }

    public function clearThumbnailSha256()
    {
        unset($this->thumbnailSha256);
    }

    /**
     * Generated from protobuf field <code>optional bytes thumbnailSha256 = 14;</code>
     * @param string $var
     * @return $this
     */
    public function setThumbnailSha256($var)
    {
        GPBUtil::checkString($var, False);
        $this->thumbnailSha256 = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional bytes thumbnailEncSha256 = 15;</code>
     * @return string
     */
    public function getThumbnailEncSha256()
    {
        return isset($this->thumbnailEncSha256) ? $this->thumbnailEncSha256 : '';
    }

    public function hasThumbnailEncSha256()
    {
        return isset($this->thumbnailEncSha256);
    }

    public function clearThumbnailEncSha256()
    {
        unset($this->thumbnailEncSha256);
    }

    /**
     * Generated from protobuf field <code>optional bytes thumbnailEncSha256 = 15;</code>
     * @param string $var
     * @return $this
     */
    public function setThumbnailEncSha256($var)
    {
        GPBUtil::checkString($var, False);
        $this->thumbnailEncSha256 = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional bytes jpegThumbnail = 16;</code>
     * @return string
     */
    public function getJpegThumbnail()
    {
        return isset($this->jpegThumbnail) ? $this->jpegThumbnail : '';
    }

    public function hasJpegThumbnail()
    {
        return isset($this->jpegThumbnail);
    }

    public function clearJpegThumbnail()
    {
        unset($this->jpegThumbnail);
    }

    /**
     * Generated from protobuf field <code>optional bytes jpegThumbnail = 16;</code>
     * @param string $var
     * @return $this
     */
    public function setJpegThumbnail($var)
    {
        GPBUtil::checkString($var, False);
        $this->jpegThumbnail = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.ContextInfo contextInfo = 17;</code>
     * @return \PhpWA\Protocol\Proto\ContextInfo|null
     */
    public function getContextInfo()
    {
        return $this->contextInfo;
    }

    public function hasContextInfo()
    {
        return isset($this->contextInfo);
    }

    public function clearContextInfo()
    {
        unset($this->contextInfo);
    }

    /**
     * Generated from protobuf field <code>optional .proto.ContextInfo contextInfo = 17;</code>
     * @param \PhpWA\Protocol\Proto\ContextInfo $var
     * @return $this
     */
    public function setContextInfo($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\ContextInfo::class);
        $this->contextInfo = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional uint32 thumbnailHeight = 18;</code>
     * @return int
     */
    public function getThumbnailHeight()
    {
        return isset($this->thumbnailHeight) ? $this->thumbnailHeight : 0;
    }

    public function hasThumbnailHeight()
    {
        return isset($this->thumbnailHeight);
    }

    public function clearThumbnailHeight()
    {
        unset($this->thumbnailHeight);
    }

    /**
     * Generated from protobuf field <code>optional uint32 thumbnailHeight = 18;</code>
     * @param int $var
     * @return $this
     */
    public function setThumbnailHeight($var)
    {
        GPBUtil::checkUint32($var);
        $this->thumbnailHeight = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional uint32 thumbnailWidth = 19;</code>
     * @return int
     */
    public function getThumbnailWidth()
    {
        return isset($this->thumbnailWidth) ? $this->thumbnailWidth : 0;
    }

    public function hasThumbnailWidth()
    {
        return isset($this->thumbnailWidth);
    }

    public function clearThumbnailWidth()
    {
        unset($this->thumbnailWidth);
    }

    /**
     * Generated from protobuf field <code>optional uint32 thumbnailWidth = 19;</code>
     * @param int $var
     * @return $this
     */
    public function setThumbnailWidth($var)
    {
        GPBUtil::checkUint32($var);
        $this->thumbnailWidth = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string caption = 20;</code>
     * @return string
     */
    public function getCaption()
    {
        return isset($this->caption) ? $this->caption : '';
    }

    public function hasCaption()
    {
        return isset($this->caption);
    }

    public function clearCaption()
    {
        unset($this->caption);
    }

    /**
     * Generated from protobuf field <code>optional string caption = 20;</code>
     * @param string $var
     * @return $this
     */
    public function setCaption($var)
    {
        GPBUtil::checkString($var, True);
        $this->caption = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string accessibilityLabel = 21;</code>
     * @return string
     */
    public function getAccessibilityLabel()
    {
        return isset($this->accessibilityLabel) ? $this->accessibilityLabel : '';
    }

    public function hasAccessibilityLabel()
    {
        return isset($this->accessibilityLabel);
    }

    public function clearAccessibilityLabel()
    {
        unset($this->accessibilityLabel);
    }

    /**
     * Generated from protobuf field <code>optional string accessibilityLabel = 21;</code>
     * @param string $var
     * @return $this
     */
    public function setAccessibilityLabel($var)
    {
        GPBUtil::checkString($var, True);
        $this->accessibilityLabel = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.MediaKeyDomain mediaKeyDomain = 22;</code>
     * @return int
     */
    public function getMediaKeyDomain()
    {
        return isset($this->mediaKeyDomain) ? $this->mediaKeyDomain : 0;
    }

    public function hasMediaKeyDomain()
    {
        return isset($this->mediaKeyDomain);
    }

    public function clearMediaKeyDomain()
    {
        unset($this->mediaKeyDomain);
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.MediaKeyDomain mediaKeyDomain = 22;</code>
     * @param int $var
     * @return $this
     */
    public function setMediaKeyDomain($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\Message\MediaKeyDomain::class);
        $this->mediaKeyDomain = $var;

        return $this;
    }

}

