<?php
 
 
 

namespace PhpWA\Protocol\Proto\Message;

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




class PollCreationMessage extends \Google\Protobuf\Internal\Message
{
    


    protected $encKey = null;
    


    protected $name = null;
    


    private $options;
    


    protected $selectableOptionsCount = null;
    


    protected $contextInfo = null;
    


    protected $pollContentType = null;
    


    protected $pollType = null;
    


    protected $correctAnswer = null;

    















    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    



    public function getEncKey()
    {
        return isset($this->encKey) ? $this->encKey : '';
    }

    public function hasEncKey()
    {
        return isset($this->encKey);
    }

    public function clearEncKey()
    {
        unset($this->encKey);
    }

    




    public function setEncKey($var)
    {
        GPBUtil::checkString($var, False);
        $this->encKey = $var;

        return $this;
    }

    



    public function getName()
    {
        return isset($this->name) ? $this->name : '';
    }

    public function hasName()
    {
        return isset($this->name);
    }

    public function clearName()
    {
        unset($this->name);
    }

    




    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    



    public function getOptions()
    {
        return $this->options;
    }

    




    public function setOptions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PhpWA\Protocol\Proto\Message\PollCreationMessage\Option::class);
        $this->options = $arr;

        return $this;
    }

    



    public function getSelectableOptionsCount()
    {
        return isset($this->selectableOptionsCount) ? $this->selectableOptionsCount : 0;
    }

    public function hasSelectableOptionsCount()
    {
        return isset($this->selectableOptionsCount);
    }

    public function clearSelectableOptionsCount()
    {
        unset($this->selectableOptionsCount);
    }

    




    public function setSelectableOptionsCount($var)
    {
        GPBUtil::checkUint32($var);
        $this->selectableOptionsCount = $var;

        return $this;
    }

    



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

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

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

    




    public function setContextInfo($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\ContextInfo::class);
        $this->contextInfo = $var;

        return $this;
    }

    



    public function getPollContentType()
    {
        return isset($this->pollContentType) ? $this->pollContentType : 0;
    }

    public function hasPollContentType()
    {
        return isset($this->pollContentType);
    }

    public function clearPollContentType()
    {
        unset($this->pollContentType);
    }

    




    public function setPollContentType($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\Message\PollContentType::class);
        $this->pollContentType = $var;

        return $this;
    }

    



    public function getPollType()
    {
        return isset($this->pollType) ? $this->pollType : 0;
    }

    public function hasPollType()
    {
        return isset($this->pollType);
    }

    public function clearPollType()
    {
        unset($this->pollType);
    }

    




    public function setPollType($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\Message\PollType::class);
        $this->pollType = $var;

        return $this;
    }

    



    public function getCorrectAnswer()
    {
        return $this->correctAnswer;
    }

    public function hasCorrectAnswer()
    {
        return isset($this->correctAnswer);
    }

    public function clearCorrectAnswer()
    {
        unset($this->correctAnswer);
    }

    




    public function setCorrectAnswer($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\Message\PollCreationMessage\Option::class);
        $this->correctAnswer = $var;

        return $this;
    }

}

