<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: core/group.proto

namespace Zaly\Proto\Core;

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

/**
 * Generated from protobuf message <code>core.PublicGroupProfile</code>
 */
class PublicGroupProfile extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string id = 1;</code>
     */
    private $id = '';
    /**
     * Generated from protobuf field <code>string name = 2;</code>
     */
    private $name = '';
    /**
     * Generated from protobuf field <code>string nameInLatin = 3;</code>
     */
    private $nameInLatin = '';
    /**
     * Generated from protobuf field <code>string avatar = 4;</code>
     */
    private $avatar = '';
    /**
     * Generated from protobuf field <code>.core.GroupDescription description = 5;</code>
     */
    private $description = null;
    /**
     * Generated from protobuf field <code>.core.GroupJoinPermissionType permissionJoin = 6;</code>
     */
    private $permissionJoin = 0;
    /**
     * Generated from protobuf field <code>bool canGuestReadMessage = 7;</code>
     */
    private $canGuestReadMessage = false;
    /**
     * Generated from protobuf field <code>int64 timeCreate = 8;</code>
     */
    private $timeCreate = 0;
    /**
     * Generated from protobuf field <code>.core.PublicUserProfile owner = 9;</code>
     */
    private $owner = null;
    /**
     * Generated from protobuf field <code>repeated .core.PublicUserProfile admins = 10;</code>
     */
    private $admins;
    /**
     * Generated from protobuf field <code>repeated .core.PublicUserProfile speakers = 11;</code>
     */
    private $speakers;
    /**
     * Generated from protobuf field <code>bool canAddFriend = 12;</code>
     */
    private $canAddFriend = false;

    public function __construct() {
        \GPBMetadata\Core\Group::initOnce();
        parent::__construct();
    }

    /**
     * Generated from protobuf field <code>string id = 1;</code>
     * @return string
     */
    public function getId()
    {
        return $this->id;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string name = 2;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string nameInLatin = 3;</code>
     * @return string
     */
    public function getNameInLatin()
    {
        return $this->nameInLatin;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string avatar = 4;</code>
     * @return string
     */
    public function getAvatar()
    {
        return $this->avatar;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.core.GroupDescription description = 5;</code>
     * @return \Zaly\Proto\Core\GroupDescription
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Generated from protobuf field <code>.core.GroupDescription description = 5;</code>
     * @param \Zaly\Proto\Core\GroupDescription $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkMessage($var, \Zaly\Proto\Core\GroupDescription::class);
        $this->description = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.core.GroupJoinPermissionType permissionJoin = 6;</code>
     * @return int
     */
    public function getPermissionJoin()
    {
        return $this->permissionJoin;
    }

    /**
     * Generated from protobuf field <code>.core.GroupJoinPermissionType permissionJoin = 6;</code>
     * @param int $var
     * @return $this
     */
    public function setPermissionJoin($var)
    {
        GPBUtil::checkEnum($var, \Zaly\Proto\Core\GroupJoinPermissionType::class);
        $this->permissionJoin = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>bool canGuestReadMessage = 7;</code>
     * @return bool
     */
    public function getCanGuestReadMessage()
    {
        return $this->canGuestReadMessage;
    }

    /**
     * Generated from protobuf field <code>bool canGuestReadMessage = 7;</code>
     * @param bool $var
     * @return $this
     */
    public function setCanGuestReadMessage($var)
    {
        GPBUtil::checkBool($var);
        $this->canGuestReadMessage = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>int64 timeCreate = 8;</code>
     * @return int|string
     */
    public function getTimeCreate()
    {
        return $this->timeCreate;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.core.PublicUserProfile owner = 9;</code>
     * @return \Zaly\Proto\Core\PublicUserProfile
     */
    public function getOwner()
    {
        return $this->owner;
    }

    /**
     * Generated from protobuf field <code>.core.PublicUserProfile owner = 9;</code>
     * @param \Zaly\Proto\Core\PublicUserProfile $var
     * @return $this
     */
    public function setOwner($var)
    {
        GPBUtil::checkMessage($var, \Zaly\Proto\Core\PublicUserProfile::class);
        $this->owner = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .core.PublicUserProfile admins = 10;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getAdmins()
    {
        return $this->admins;
    }

    /**
     * Generated from protobuf field <code>repeated .core.PublicUserProfile admins = 10;</code>
     * @param \Zaly\Proto\Core\PublicUserProfile[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setAdmins($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Zaly\Proto\Core\PublicUserProfile::class);
        $this->admins = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .core.PublicUserProfile speakers = 11;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getSpeakers()
    {
        return $this->speakers;
    }

    /**
     * Generated from protobuf field <code>repeated .core.PublicUserProfile speakers = 11;</code>
     * @param \Zaly\Proto\Core\PublicUserProfile[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setSpeakers($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Zaly\Proto\Core\PublicUserProfile::class);
        $this->speakers = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>bool canAddFriend = 12;</code>
     * @return bool
     */
    public function getCanAddFriend()
    {
        return $this->canAddFriend;
    }

    /**
     * Generated from protobuf field <code>bool canAddFriend = 12;</code>
     * @param bool $var
     * @return $this
     */
    public function setCanAddFriend($var)
    {
        GPBUtil::checkBool($var);
        $this->canAddFriend = $var;

        return $this;
    }

}

