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

namespace PhpWA\Protocol\Proto;

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

/**
 * Generated from protobuf message <code>proto.ExternalBlobReference</code>
 */
class ExternalBlobReference extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional bytes mediaKey = 1;</code>
     */
    protected $mediaKey = null;
    /**
     * Generated from protobuf field <code>optional string directPath = 2;</code>
     */
    protected $directPath = null;
    /**
     * Generated from protobuf field <code>optional string handle = 3;</code>
     */
    protected $handle = null;
    /**
     * Generated from protobuf field <code>optional uint64 fileSizeBytes = 4;</code>
     */
    protected $fileSizeBytes = null;
    /**
     * Generated from protobuf field <code>optional bytes fileSha256 = 5;</code>
     */
    protected $fileSha256 = null;
    /**
     * Generated from protobuf field <code>optional bytes fileEncSha256 = 6;</code>
     */
    protected $fileEncSha256 = null;

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

    /**
     * Generated from protobuf field <code>optional bytes mediaKey = 1;</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 = 1;</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 directPath = 2;</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 = 2;</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 string handle = 3;</code>
     * @return string
     */
    public function getHandle()
    {
        return isset($this->handle) ? $this->handle : '';
    }

    public function hasHandle()
    {
        return isset($this->handle);
    }

    public function clearHandle()
    {
        unset($this->handle);
    }

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

        return $this;
    }

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

    public function hasFileSizeBytes()
    {
        return isset($this->fileSizeBytes);
    }

    public function clearFileSizeBytes()
    {
        unset($this->fileSizeBytes);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional bytes fileSha256 = 5;</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 = 5;</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 fileEncSha256 = 6;</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 = 6;</code>
     * @param string $var
     * @return $this
     */
    public function setFileEncSha256($var)
    {
        GPBUtil::checkString($var, False);
        $this->fileEncSha256 = $var;

        return $this;
    }

}

