<?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.GroupParticipant</code>
 */
class GroupParticipant extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string userJid = 1;</code>
     */
    protected $userJid = null;
    /**
     * Generated from protobuf field <code>optional .proto.GroupParticipant.Rank rank = 2;</code>
     */
    protected $rank = null;
    /**
     * Generated from protobuf field <code>optional .proto.MemberLabel memberLabel = 3;</code>
     */
    protected $memberLabel = null;

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

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

    public function hasUserJid()
    {
        return isset($this->userJid);
    }

    public function clearUserJid()
    {
        unset($this->userJid);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.GroupParticipant.Rank rank = 2;</code>
     * @return int
     */
    public function getRank()
    {
        return isset($this->rank) ? $this->rank : 0;
    }

    public function hasRank()
    {
        return isset($this->rank);
    }

    public function clearRank()
    {
        unset($this->rank);
    }

    /**
     * Generated from protobuf field <code>optional .proto.GroupParticipant.Rank rank = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setRank($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\GroupParticipant\Rank::class);
        $this->rank = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.MemberLabel memberLabel = 3;</code>
     * @return \PhpWA\Protocol\Proto\MemberLabel|null
     */
    public function getMemberLabel()
    {
        return $this->memberLabel;
    }

    public function hasMemberLabel()
    {
        return isset($this->memberLabel);
    }

    public function clearMemberLabel()
    {
        unset($this->memberLabel);
    }

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

        return $this;
    }

}

