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

namespace PhpWA\Protocol\Proto\Message\PollResultSnapshotMessage;

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

/**
 * Generated from protobuf message <code>proto.Message.PollResultSnapshotMessage.PollVote</code>
 */
class PollVote extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string optionName = 1;</code>
     */
    protected $optionName = null;
    /**
     * Generated from protobuf field <code>optional int64 optionVoteCount = 2;</code>
     */
    protected $optionVoteCount = null;

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

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

    public function hasOptionName()
    {
        return isset($this->optionName);
    }

    public function clearOptionName()
    {
        unset($this->optionName);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional int64 optionVoteCount = 2;</code>
     * @return int|string
     */
    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 int64 optionVoteCount = 2;</code>
     * @param int|string $var
     * @return $this
     */
    public function setOptionVoteCount($var)
    {
        GPBUtil::checkInt64($var);
        $this->optionVoteCount = $var;

        return $this;
    }

}

