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

namespace PhpWA\Protocol\Proto\Message;

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

/**
 * Generated from protobuf message <code>proto.Message.GroupInviteMessage</code>
 */
class GroupInviteMessage extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string groupJid = 1;</code>
     */
    protected $groupJid = null;
    /**
     * Generated from protobuf field <code>optional string inviteCode = 2;</code>
     */
    protected $inviteCode = null;
    /**
     * Generated from protobuf field <code>optional int64 inviteExpiration = 3;</code>
     */
    protected $inviteExpiration = null;
    /**
     * Generated from protobuf field <code>optional string groupName = 4;</code>
     */
    protected $groupName = null;
    /**
     * Generated from protobuf field <code>optional bytes jpegThumbnail = 5;</code>
     */
    protected $jpegThumbnail = null;
    /**
     * Generated from protobuf field <code>optional string caption = 6;</code>
     */
    protected $caption = null;
    /**
     * Generated from protobuf field <code>optional .proto.ContextInfo contextInfo = 7;</code>
     */
    protected $contextInfo = null;
    /**
     * Generated from protobuf field <code>optional .proto.Message.GroupInviteMessage.GroupType groupType = 8;</code>
     */
    protected $groupType = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $groupJid
     *     @type string $inviteCode
     *     @type int|string $inviteExpiration
     *     @type string $groupName
     *     @type string $jpegThumbnail
     *     @type string $caption
     *     @type \PhpWA\Protocol\Proto\ContextInfo $contextInfo
     *     @type int $groupType
     * }
     */
    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>optional string inviteCode = 2;</code>
     * @return string
     */
    public function getInviteCode()
    {
        return isset($this->inviteCode) ? $this->inviteCode : '';
    }

    public function hasInviteCode()
    {
        return isset($this->inviteCode);
    }

    public function clearInviteCode()
    {
        unset($this->inviteCode);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional int64 inviteExpiration = 3;</code>
     * @return int|string
     */
    public function getInviteExpiration()
    {
        return isset($this->inviteExpiration) ? $this->inviteExpiration : 0;
    }

    public function hasInviteExpiration()
    {
        return isset($this->inviteExpiration);
    }

    public function clearInviteExpiration()
    {
        unset($this->inviteExpiration);
    }

    /**
     * Generated from protobuf field <code>optional int64 inviteExpiration = 3;</code>
     * @param int|string $var
     * @return $this
     */
    public function setInviteExpiration($var)
    {
        GPBUtil::checkInt64($var);
        $this->inviteExpiration = $var;

        return $this;
    }

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

    public function hasGroupName()
    {
        return isset($this->groupName);
    }

    public function clearGroupName()
    {
        unset($this->groupName);
    }

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

        return $this;
    }

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

    public function hasJpegThumbnail()
    {
        return isset($this->jpegThumbnail);
    }

    public function clearJpegThumbnail()
    {
        unset($this->jpegThumbnail);
    }

    /**
     * Generated from protobuf field <code>optional bytes jpegThumbnail = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setJpegThumbnail($var)
    {
        GPBUtil::checkString($var, False);
        $this->jpegThumbnail = $var;

        return $this;
    }

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

    public function hasCaption()
    {
        return isset($this->caption);
    }

    public function clearCaption()
    {
        unset($this->caption);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.ContextInfo contextInfo = 7;</code>
     * @return \PhpWA\Protocol\Proto\ContextInfo|null
     */
    public function getContextInfo()
    {
        return $this->contextInfo;
    }

    public function hasContextInfo()
    {
        return isset($this->contextInfo);
    }

    public function clearContextInfo()
    {
        unset($this->contextInfo);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.GroupInviteMessage.GroupType groupType = 8;</code>
     * @return int
     */
    public function getGroupType()
    {
        return isset($this->groupType) ? $this->groupType : 0;
    }

    public function hasGroupType()
    {
        return isset($this->groupType);
    }

    public function clearGroupType()
    {
        unset($this->groupType);
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.GroupInviteMessage.GroupType groupType = 8;</code>
     * @param int $var
     * @return $this
     */
    public function setGroupType($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\Message\GroupInviteMessage\GroupType::class);
        $this->groupType = $var;

        return $this;
    }

}

