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

namespace Rv\Data\ProLink;

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

/**
 * Generated from protobuf message <code>rv.data.ProLink.GroupDefinition</code>
 */
class GroupDefinition extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.rv.data.Timestamp timestamp = 1;</code>
     */
    protected $timestamp = null;
    /**
     * Generated from protobuf field <code>string secret = 2;</code>
     */
    protected $secret = '';
    /**
     * Generated from protobuf field <code>string name = 3;</code>
     */
    protected $name = '';
    /**
     * Generated from protobuf field <code>repeated .rv.data.ProLink.GroupDefinition.Member members = 4;</code>
     */
    private $members;
    /**
     * Generated from protobuf field <code>.rv.data.UUID group_identifier = 5;</code>
     */
    protected $group_identifier = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Rv\Data\Timestamp $timestamp
     *     @type string $secret
     *     @type string $name
     *     @type array<\Rv\Data\ProLink\GroupDefinition\Member>|\Google\Protobuf\Internal\RepeatedField $members
     *     @type \Rv\Data\UUID $group_identifier
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\ProApi::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.rv.data.Timestamp timestamp = 1;</code>
     * @return \Rv\Data\Timestamp|null
     */
    public function getTimestamp()
    {
        return $this->timestamp;
    }

    public function hasTimestamp()
    {
        return isset($this->timestamp);
    }

    public function clearTimestamp()
    {
        unset($this->timestamp);
    }

    /**
     * Generated from protobuf field <code>.rv.data.Timestamp timestamp = 1;</code>
     * @param \Rv\Data\Timestamp $var
     * @return $this
     */
    public function setTimestamp($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\Timestamp::class);
        $this->timestamp = $var;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .rv.data.ProLink.GroupDefinition.Member members = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getMembers()
    {
        return $this->members;
    }

    /**
     * Generated from protobuf field <code>repeated .rv.data.ProLink.GroupDefinition.Member members = 4;</code>
     * @param array<\Rv\Data\ProLink\GroupDefinition\Member>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setMembers($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Rv\Data\ProLink\GroupDefinition\Member::class);
        $this->members = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.UUID group_identifier = 5;</code>
     * @return \Rv\Data\UUID|null
     */
    public function getGroupIdentifier()
    {
        return $this->group_identifier;
    }

    public function hasGroupIdentifier()
    {
        return isset($this->group_identifier);
    }

    public function clearGroupIdentifier()
    {
        unset($this->group_identifier);
    }

    /**
     * Generated from protobuf field <code>.rv.data.UUID group_identifier = 5;</code>
     * @param \Rv\Data\UUID $var
     * @return $this
     */
    public function setGroupIdentifier($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\UUID::class);
        $this->group_identifier = $var;

        return $this;
    }

}

