<?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.AudioMessage</code>
 */
class AudioMessage 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 bytes fileSha256 = 3;</code>
     */
    protected $fileSha256 = null;
    /**
     * Generated from protobuf field <code>optional uint64 fileLength = 4;</code>
     */
    protected $fileLength = null;
    /**
     * Generated from protobuf field <code>optional uint32 seconds = 5;</code>
     */
    protected $seconds = null;
    /**
     * Generated from protobuf field <code>optional bool ptt = 6;</code>
     */
    protected $ptt = null;
    /**
     * Generated from protobuf field <code>optional bytes mediaKey = 7;</code>
     */
    protected $mediaKey = null;
    /**
     * Generated from protobuf field <code>optional bytes fileEncSha256 = 8;</code>
     */
    protected $fileEncSha256 = null;
    /**
     * Generated from protobuf field <code>optional string directPath = 9;</code>
     */
    protected $directPath = null;
    /**
     * Generated from protobuf field <code>optional int64 mediaKeyTimestamp = 10;</code>
     */
    protected $mediaKeyTimestamp = null;
    /**
     * Generated from protobuf field <code>optional .proto.ContextInfo contextInfo = 17;</code>
     */
    protected $contextInfo = null;
    /**
     * Generated from protobuf field <code>optional bytes streamingSidecar = 18;</code>
     */
    protected $streamingSidecar = null;
    /**
     * Generated from protobuf field <code>optional bytes waveform = 19;</code>
     */
    protected $waveform = null;
    /**
     * Generated from protobuf field <code>optional fixed32 backgroundArgb = 20;</code>
     */
    protected $backgroundArgb = null;
    /**
     * Generated from protobuf field <code>optional bool viewOnce = 21;</code>
     */
    protected $viewOnce = null;
    /**
     * Generated from protobuf field <code>optional string accessibilityLabel = 22;</code>
     */
    protected $accessibilityLabel = null;
    /**
     * Generated from protobuf field <code>optional .proto.Message.MediaKeyDomain mediaKeyDomain = 23;</code>
     */
    protected $mediaKeyDomain = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $url
     *     @type string $mimetype
     *     @type string $fileSha256
     *     @type int|string $fileLength
     *     @type int $seconds
     *     @type bool $ptt
     *     @type string $mediaKey
     *     @type string $fileEncSha256
     *     @type string $directPath
     *     @type int|string $mediaKeyTimestamp
     *     @type \PhpWA\Protocol\Proto\ContextInfo $contextInfo
     *     @type string $streamingSidecar
     *     @type string $waveform
     *     @type int $backgroundArgb
     *     @type bool $viewOnce
     *     @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 bytes fileSha256 = 3;</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 = 3;</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 = 4;</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 = 4;</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 seconds = 5;</code>
     * @return int
     */
    public function getSeconds()
    {
        return isset($this->seconds) ? $this->seconds : 0;
    }

    public function hasSeconds()
    {
        return isset($this->seconds);
    }

    public function clearSeconds()
    {
        unset($this->seconds);
    }

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

        return $this;
    }

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

    public function hasPtt()
    {
        return isset($this->ptt);
    }

    public function clearPtt()
    {
        unset($this->ptt);
    }

    /**
     * Generated from protobuf field <code>optional bool ptt = 6;</code>
     * @param bool $var
     * @return $this
     */
    public function setPtt($var)
    {
        GPBUtil::checkBool($var);
        $this->ptt = $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 bytes fileEncSha256 = 8;</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 = 8;</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 = 9;</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 = 9;</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 = 10;</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 = 10;</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 = 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 bytes streamingSidecar = 18;</code>
     * @return string
     */
    public function getStreamingSidecar()
    {
        return isset($this->streamingSidecar) ? $this->streamingSidecar : '';
    }

    public function hasStreamingSidecar()
    {
        return isset($this->streamingSidecar);
    }

    public function clearStreamingSidecar()
    {
        unset($this->streamingSidecar);
    }

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

        return $this;
    }

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

    public function hasWaveform()
    {
        return isset($this->waveform);
    }

    public function clearWaveform()
    {
        unset($this->waveform);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional fixed32 backgroundArgb = 20;</code>
     * @return int
     */
    public function getBackgroundArgb()
    {
        return isset($this->backgroundArgb) ? $this->backgroundArgb : 0;
    }

    public function hasBackgroundArgb()
    {
        return isset($this->backgroundArgb);
    }

    public function clearBackgroundArgb()
    {
        unset($this->backgroundArgb);
    }

    /**
     * Generated from protobuf field <code>optional fixed32 backgroundArgb = 20;</code>
     * @param int $var
     * @return $this
     */
    public function setBackgroundArgb($var)
    {
        GPBUtil::checkUint32($var);
        $this->backgroundArgb = $var;

        return $this;
    }

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

    public function hasViewOnce()
    {
        return isset($this->viewOnce);
    }

    public function clearViewOnce()
    {
        unset($this->viewOnce);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string accessibilityLabel = 22;</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 = 22;</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 = 23;</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 = 23;</code>
     * @param int $var
     * @return $this
     */
    public function setMediaKeyDomain($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\Message\MediaKeyDomain::class);
        $this->mediaKeyDomain = $var;

        return $this;
    }

}

