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

namespace PhpWA\Protocol\Proto\MsgOpaqueData;

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

/**
 * Generated from protobuf message <code>proto.MsgOpaqueData.PollVoteSnapshot</code>
 */
class PollVoteSnapshot extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional .proto.MsgOpaqueData.PollOption option = 1;</code>
     */
    protected $option = null;
    /**
     * Generated from protobuf field <code>optional int32 optionVoteCount = 2;</code>
     */
    protected $optionVoteCount = null;

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

    /**
     * Generated from protobuf field <code>optional .proto.MsgOpaqueData.PollOption option = 1;</code>
     * @return \PhpWA\Protocol\Proto\MsgOpaqueData\PollOption|null
     */
    public function getOption()
    {
        return $this->option;
    }

    public function hasOption()
    {
        return isset($this->option);
    }

    public function clearOption()
    {
        unset($this->option);
    }

    /**
     * Generated from protobuf field <code>optional .proto.MsgOpaqueData.PollOption option = 1;</code>
     * @param \PhpWA\Protocol\Proto\MsgOpaqueData\PollOption $var
     * @return $this
     */
    public function setOption($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\MsgOpaqueData\PollOption::class);
        $this->option = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional int32 optionVoteCount = 2;</code>
     * @return int
     */
    public function getOptionVoteCount()
    {
        return isset($this->optionVoteCount) ? $this->optionVoteCount : 0;
    }

    public function hasOptionVoteCount()
    {
        return isset($this->optionVoteCount);
    }

    public function clearOptionVoteCount()
    {
        unset($this->optionVoteCount);
    }

    /**
     * Generated from protobuf field <code>optional int32 optionVoteCount = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setOptionVoteCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->optionVoteCount = $var;

        return $this;
    }

}

