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

namespace Mynaparrot\PlugnmeetProto;

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

/**
 * Generated from protobuf message <code>plugnmeet.PollResponse</code>
 */
class PollResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>bool status = 1;</code>
     */
    protected $status = false;
    /**
     * Generated from protobuf field <code>string msg = 2;</code>
     */
    protected $msg = '';
    /**
     * Generated from protobuf field <code>optional string poll_id = 3;</code>
     */
    protected $poll_id = null;
    /**
     * Generated from protobuf field <code>optional uint64 total_responses = 4;</code>
     */
    protected $total_responses = null;
    /**
     * Generated from protobuf field <code>optional uint64 voted = 5;</code>
     */
    protected $voted = null;
    /**
     * Generated from protobuf field <code>map<string, string> responses = 6;</code>
     */
    private $responses;
    /**
     * Generated from protobuf field <code>repeated .plugnmeet.PollInfo polls = 7;</code>
     */
    private $polls;
    /**
     * Generated from protobuf field <code>optional .plugnmeet.PollsStats stats = 8;</code>
     */
    protected $stats = null;
    /**
     * Generated from protobuf field <code>optional uint64 total_polls = 9;</code>
     */
    protected $total_polls = null;
    /**
     * Generated from protobuf field <code>optional uint64 total_running = 10;</code>
     */
    protected $total_running = null;
    /**
     * Generated from protobuf field <code>optional .plugnmeet.PollResponsesResult poll_responses_result = 11;</code>
     */
    protected $poll_responses_result = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $status
     *     @type string $msg
     *     @type string $poll_id
     *     @type int|string $total_responses
     *     @type int|string $voted
     *     @type array|\Google\Protobuf\Internal\MapField $responses
     *     @type \Mynaparrot\PlugnmeetProto\PollInfo[] $polls
     *     @type \Mynaparrot\PlugnmeetProto\PollsStats $stats
     *     @type int|string $total_polls
     *     @type int|string $total_running
     *     @type \Mynaparrot\PlugnmeetProto\PollResponsesResult $poll_responses_result
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\PlugnmeetPolls::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>bool status = 1;</code>
     * @return bool
     */
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * Generated from protobuf field <code>bool status = 1;</code>
     * @param bool $var
     * @return $this
     */
    public function setStatus($var)
    {
        GPBUtil::checkBool($var);
        $this->status = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string msg = 2;</code>
     * @return string
     */
    public function getMsg()
    {
        return $this->msg;
    }

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

        return $this;
    }

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

    public function hasPollId()
    {
        return isset($this->poll_id);
    }

    public function clearPollId()
    {
        unset($this->poll_id);
    }

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

        return $this;
    }

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

    public function hasTotalResponses()
    {
        return isset($this->total_responses);
    }

    public function clearTotalResponses()
    {
        unset($this->total_responses);
    }

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

        return $this;
    }

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

    public function hasVoted()
    {
        return isset($this->voted);
    }

    public function clearVoted()
    {
        unset($this->voted);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>map<string, string> responses = 6;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getResponses()
    {
        return $this->responses;
    }

    /**
     * Generated from protobuf field <code>map<string, string> responses = 6;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setResponses($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->responses = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .plugnmeet.PollInfo polls = 7;</code>
     * @return RepeatedField<\Mynaparrot\PlugnmeetProto\PollInfo>
     */
    public function getPolls()
    {
        return $this->polls;
    }

    /**
     * Generated from protobuf field <code>repeated .plugnmeet.PollInfo polls = 7;</code>
     * @param \Mynaparrot\PlugnmeetProto\PollInfo[] $var
     * @return $this
     */
    public function setPolls($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Mynaparrot\PlugnmeetProto\PollInfo::class);
        $this->polls = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .plugnmeet.PollsStats stats = 8;</code>
     * @return \Mynaparrot\PlugnmeetProto\PollsStats|null
     */
    public function getStats()
    {
        return $this->stats;
    }

    public function hasStats()
    {
        return isset($this->stats);
    }

    public function clearStats()
    {
        unset($this->stats);
    }

    /**
     * Generated from protobuf field <code>optional .plugnmeet.PollsStats stats = 8;</code>
     * @param \Mynaparrot\PlugnmeetProto\PollsStats $var
     * @return $this
     */
    public function setStats($var)
    {
        GPBUtil::checkMessage($var, \Mynaparrot\PlugnmeetProto\PollsStats::class);
        $this->stats = $var;

        return $this;
    }

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

    public function hasTotalPolls()
    {
        return isset($this->total_polls);
    }

    public function clearTotalPolls()
    {
        unset($this->total_polls);
    }

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

        return $this;
    }

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

    public function hasTotalRunning()
    {
        return isset($this->total_running);
    }

    public function clearTotalRunning()
    {
        unset($this->total_running);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .plugnmeet.PollResponsesResult poll_responses_result = 11;</code>
     * @return \Mynaparrot\PlugnmeetProto\PollResponsesResult|null
     */
    public function getPollResponsesResult()
    {
        return $this->poll_responses_result;
    }

    public function hasPollResponsesResult()
    {
        return isset($this->poll_responses_result);
    }

    public function clearPollResponsesResult()
    {
        unset($this->poll_responses_result);
    }

    /**
     * Generated from protobuf field <code>optional .plugnmeet.PollResponsesResult poll_responses_result = 11;</code>
     * @param \Mynaparrot\PlugnmeetProto\PollResponsesResult $var
     * @return $this
     */
    public function setPollResponsesResult($var)
    {
        GPBUtil::checkMessage($var, \Mynaparrot\PlugnmeetProto\PollResponsesResult::class);
        $this->poll_responses_result = $var;

        return $this;
    }

}

