<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: keyapis/vc/v1/keyapis_vc_camera_dictionary_v1.proto

namespace Keyapis\Vc\V1;

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

/**
 * Роль
 *
 * Generated from protobuf message <code>keyapis.vc.v1.Role</code>
 */
class Role extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор
     *
     * Generated from protobuf field <code>int32 id = 1;</code>
     */
    protected $id = 0;
    /**
     * Наименование
     *
     * Generated from protobuf field <code>string title = 2;</code>
     */
    protected $title = '';
    /**
     * Доступы
     *
     * Generated from protobuf field <code>repeated string permissions = 3;</code>
     */
    private $permissions;
    /**
     * Является ли роль глобальной
     *
     * Generated from protobuf field <code>bool is_global = 4;</code>
     */
    protected $is_global = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $id
     *           Идентификатор
     *     @type string $title
     *           Наименование
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $permissions
     *           Доступы
     *     @type bool $is_global
     *           Является ли роль глобальной
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Vc\V1\KeyapisVcCameraDictionaryV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Идентификатор
     *
     * Generated from protobuf field <code>int32 id = 1;</code>
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Идентификатор
     *
     * Generated from protobuf field <code>int32 id = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkInt32($var);
        $this->id = $var;

        return $this;
    }

    /**
     * Наименование
     *
     * Generated from protobuf field <code>string title = 2;</code>
     * @return string
     */
    public function getTitle()
    {
        return $this->title;
    }

    /**
     * Наименование
     *
     * Generated from protobuf field <code>string title = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setTitle($var)
    {
        GPBUtil::checkString($var, True);
        $this->title = $var;

        return $this;
    }

    /**
     * Доступы
     *
     * Generated from protobuf field <code>repeated string permissions = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getPermissions()
    {
        return $this->permissions;
    }

    /**
     * Доступы
     *
     * Generated from protobuf field <code>repeated string permissions = 3;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setPermissions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->permissions = $arr;

        return $this;
    }

    /**
     * Является ли роль глобальной
     *
     * Generated from protobuf field <code>bool is_global = 4;</code>
     * @return bool
     */
    public function getIsGlobal()
    {
        return $this->is_global;
    }

    /**
     * Является ли роль глобальной
     *
     * Generated from protobuf field <code>bool is_global = 4;</code>
     * @param bool $var
     * @return $this
     */
    public function setIsGlobal($var)
    {
        GPBUtil::checkBool($var);
        $this->is_global = $var;

        return $this;
    }

}

