<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: deviceapis/device/v1/deviceapis_device_user_v1.proto

namespace Deviceapis\Device\V1\PostUserPermissionReplaceRequest;

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

/**
 * Поле на замену
 *
 * Generated from protobuf message <code>deviceapis.device.v1.PostUserPermissionReplaceRequest.ReplaceTo</code>
 */
class ReplaceTo extends \Google\Protobuf\Internal\Message
{
    /**
     * Права доступа
     *
     * Generated from protobuf field <code>repeated .deviceapis.device.v1.User.Permission permission = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {</code>
     */
    private $permission;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Deviceapis\Device\V1\User\Permission>|\Google\Protobuf\Internal\RepeatedField $permission
     *           Права доступа
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Deviceapis\Device\V1\DeviceapisDeviceUserV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Права доступа
     *
     * Generated from protobuf field <code>repeated .deviceapis.device.v1.User.Permission permission = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getPermission()
    {
        return $this->permission;
    }

    /**
     * Права доступа
     *
     * Generated from protobuf field <code>repeated .deviceapis.device.v1.User.Permission permission = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {</code>
     * @param array<\Deviceapis\Device\V1\User\Permission>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setPermission($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Deviceapis\Device\V1\User\Permission::class);
        $this->permission = $arr;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ReplaceTo::class, \Deviceapis\Device\V1\PostUserPermissionReplaceRequest_ReplaceTo::class);

