<?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.BCallMessage</code>
 */
class BCallMessage extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string sessionId = 1;</code>
     */
    protected $sessionId = null;
    /**
     * Generated from protobuf field <code>optional .proto.Message.BCallMessage.MediaType mediaType = 2;</code>
     */
    protected $mediaType = null;
    /**
     * Generated from protobuf field <code>optional bytes masterKey = 3;</code>
     */
    protected $masterKey = null;
    /**
     * Generated from protobuf field <code>optional string caption = 4;</code>
     */
    protected $caption = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $sessionId
     *     @type int $mediaType
     *     @type string $masterKey
     *     @type string $caption
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

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

    public function hasSessionId()
    {
        return isset($this->sessionId);
    }

    public function clearSessionId()
    {
        unset($this->sessionId);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.BCallMessage.MediaType mediaType = 2;</code>
     * @return int
     */
    public function getMediaType()
    {
        return isset($this->mediaType) ? $this->mediaType : 0;
    }

    public function hasMediaType()
    {
        return isset($this->mediaType);
    }

    public function clearMediaType()
    {
        unset($this->mediaType);
    }

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

        return $this;
    }

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

    public function hasMasterKey()
    {
        return isset($this->masterKey);
    }

    public function clearMasterKey()
    {
        unset($this->masterKey);
    }

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

        return $this;
    }

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

        return $this;
    }

}

