<?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.PastParticipants</code>
 */
class PastParticipants extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string groupJid = 1;</code>
     */
    protected $groupJid = null;
    /**
     * Generated from protobuf field <code>repeated .proto.PastParticipant pastParticipants = 2;</code>
     */
    private $pastParticipants;

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

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

    public function hasGroupJid()
    {
        return isset($this->groupJid);
    }

    public function clearGroupJid()
    {
        unset($this->groupJid);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.PastParticipant pastParticipants = 2;</code>
     * @return RepeatedField<\PhpWA\Protocol\Proto\PastParticipant>
     */
    public function getPastParticipants()
    {
        return $this->pastParticipants;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.PastParticipant pastParticipants = 2;</code>
     * @param \PhpWA\Protocol\Proto\PastParticipant[] $var
     * @return $this
     */
    public function setPastParticipants($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PhpWA\Protocol\Proto\PastParticipant::class);
        $this->pastParticipants = $arr;

        return $this;
    }

}

