<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/apps/meet/v2beta/resource.proto

namespace Google\Apps\Meet\V2beta;

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

/**
 * Users who are configured to have a role in the space. These users can
 * join the space without knocking.
 *
 * Generated from protobuf message <code>google.apps.meet.v2beta.Member</code>
 */
class Member extends \Google\Protobuf\Internal\Message
{
    /**
     * Identifier. Resource name of the member.
     * Format: spaces/{space}/members/{member}
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     */
    protected $name = '';
    /**
     * Email for the member. This is required for creating the member.
     *
     * Generated from protobuf field <code>string email = 2;</code>
     */
    protected $email = '';
    /**
     * The meeting role assigned to the member.
     *
     * Generated from protobuf field <code>.google.apps.meet.v2beta.Member.Role role = 3;</code>
     */
    protected $role = 0;
    /**
     * [Developer Preview](https://developers.google.com/workspace/preview):
     * Unique name for the user. Interoperable with Admin SDK API and People API.
     * This will be empty for non google users. Setting both user and email in
     * request will result in error. Format: `users/{user}`
     *
     * Generated from protobuf field <code>string user = 4;</code>
     */
    protected $user = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Identifier. Resource name of the member.
     *           Format: spaces/{space}/members/{member}
     *     @type string $email
     *           Email for the member. This is required for creating the member.
     *     @type int $role
     *           The meeting role assigned to the member.
     *     @type string $user
     *           [Developer Preview](https://developers.google.com/workspace/preview):
     *           Unique name for the user. Interoperable with Admin SDK API and People API.
     *           This will be empty for non google users. Setting both user and email in
     *           request will result in error. Format: `users/{user}`
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Apps\Meet\V2Beta\Resource::initOnce();
        parent::__construct($data);
    }

    /**
     * Identifier. Resource name of the member.
     * Format: spaces/{space}/members/{member}
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Identifier. Resource name of the member.
     * Format: spaces/{space}/members/{member}
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Email for the member. This is required for creating the member.
     *
     * Generated from protobuf field <code>string email = 2;</code>
     * @return string
     */
    public function getEmail()
    {
        return $this->email;
    }

    /**
     * Email for the member. This is required for creating the member.
     *
     * Generated from protobuf field <code>string email = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setEmail($var)
    {
        GPBUtil::checkString($var, True);
        $this->email = $var;

        return $this;
    }

    /**
     * The meeting role assigned to the member.
     *
     * Generated from protobuf field <code>.google.apps.meet.v2beta.Member.Role role = 3;</code>
     * @return int
     */
    public function getRole()
    {
        return $this->role;
    }

    /**
     * The meeting role assigned to the member.
     *
     * Generated from protobuf field <code>.google.apps.meet.v2beta.Member.Role role = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setRole($var)
    {
        GPBUtil::checkEnum($var, \Google\Apps\Meet\V2beta\Member\Role::class);
        $this->role = $var;

        return $this;
    }

    /**
     * [Developer Preview](https://developers.google.com/workspace/preview):
     * Unique name for the user. Interoperable with Admin SDK API and People API.
     * This will be empty for non google users. Setting both user and email in
     * request will result in error. Format: `users/{user}`
     *
     * Generated from protobuf field <code>string user = 4;</code>
     * @return string
     */
    public function getUser()
    {
        return $this->user;
    }

    /**
     * [Developer Preview](https://developers.google.com/workspace/preview):
     * Unique name for the user. Interoperable with Admin SDK API and People API.
     * This will be empty for non google users. Setting both user and email in
     * request will result in error. Format: `users/{user}`
     *
     * Generated from protobuf field <code>string user = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setUser($var)
    {
        GPBUtil::checkString($var, True);
        $this->user = $var;

        return $this;
    }

}

