<?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.MessageHistoryBundle</code>
 */
class MessageHistoryBundle extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string mimetype = 1;</code>
     */
    protected $mimetype = null;
    /**
     * Generated from protobuf field <code>optional bytes fileSha256 = 2;</code>
     */
    protected $fileSha256 = null;
    /**
     * Generated from protobuf field <code>optional bytes mediaKey = 3;</code>
     */
    protected $mediaKey = null;
    /**
     * Generated from protobuf field <code>optional bytes fileEncSha256 = 4;</code>
     */
    protected $fileEncSha256 = null;
    /**
     * Generated from protobuf field <code>optional string directPath = 5;</code>
     */
    protected $directPath = null;
    /**
     * Generated from protobuf field <code>optional int64 mediaKeyTimestamp = 6;</code>
     */
    protected $mediaKeyTimestamp = null;
    /**
     * Generated from protobuf field <code>optional .proto.ContextInfo contextInfo = 7;</code>
     */
    protected $contextInfo = null;
    /**
     * Generated from protobuf field <code>optional .proto.Message.MessageHistoryMetadata messageHistoryMetadata = 8;</code>
     */
    protected $messageHistoryMetadata = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $mimetype
     *     @type string $fileSha256
     *     @type string $mediaKey
     *     @type string $fileEncSha256
     *     @type string $directPath
     *     @type int|string $mediaKeyTimestamp
     *     @type \PhpWA\Protocol\Proto\ContextInfo $contextInfo
     *     @type \PhpWA\Protocol\Proto\Message\MessageHistoryMetadata $messageHistoryMetadata
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional string mimetype = 1;</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 = 1;</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 bytes fileSha256 = 2;</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 = 2;</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 bytes mediaKey = 3;</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 = 3;</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 bytes fileEncSha256 = 4;</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 = 4;</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 = 5;</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 = 5;</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 = 6;</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 = 6;</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 .proto.ContextInfo contextInfo = 7;</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 = 7;</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 .proto.Message.MessageHistoryMetadata messageHistoryMetadata = 8;</code>
     * @return \PhpWA\Protocol\Proto\Message\MessageHistoryMetadata|null
     */
    public function getMessageHistoryMetadata()
    {
        return $this->messageHistoryMetadata;
    }

    public function hasMessageHistoryMetadata()
    {
        return isset($this->messageHistoryMetadata);
    }

    public function clearMessageHistoryMetadata()
    {
        unset($this->messageHistoryMetadata);
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.MessageHistoryMetadata messageHistoryMetadata = 8;</code>
     * @param \PhpWA\Protocol\Proto\Message\MessageHistoryMetadata $var
     * @return $this
     */
    public function setMessageHistoryMetadata($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\Message\MessageHistoryMetadata::class);
        $this->messageHistoryMetadata = $var;

        return $this;
    }

}

