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

namespace PhpWA\Protocol\Proto;

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

/**
 * Generated from protobuf message <code>proto.CommentMetadata</code>
 */
class CommentMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional .proto.MessageKey commentParentKey = 1;</code>
     */
    protected $commentParentKey = null;
    /**
     * Generated from protobuf field <code>optional uint32 replyCount = 2;</code>
     */
    protected $replyCount = null;

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

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

    public function hasCommentParentKey()
    {
        return isset($this->commentParentKey);
    }

    public function clearCommentParentKey()
    {
        unset($this->commentParentKey);
    }

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

        return $this;
    }

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

    public function hasReplyCount()
    {
        return isset($this->replyCount);
    }

    public function clearReplyCount()
    {
        unset($this->replyCount);
    }

    /**
     * Generated from protobuf field <code>optional uint32 replyCount = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setReplyCount($var)
    {
        GPBUtil::checkUint32($var);
        $this->replyCount = $var;

        return $this;
    }

}

