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

namespace Keyapis\Vc\V1;

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

/**
 * Задача на создание доступа к камере.
 * Очередь key.vc.create_camera_access
 *
 * Generated from protobuf message <code>keyapis.vc.v1.CreateCameraAccessTask</code>
 */
class CreateCameraAccessTask extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор запроса
     *
     * Generated from protobuf field <code>string request_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $request_id = '';
    /**
     * Идентификаторы камер в vcfront.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>repeated string external_ids = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $external_ids;
    /**
     * Тип субъекта доступа
     *
     * Generated from protobuf field <code>.keyapis.vc.v1.CameraAccess.AccessorType camera_access_accessor_type = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $camera_access_accessor_type = 0;
    /**
     * Идентификатор субъекта доступа.
     * # Диапазон: 1..36
     *
     * Generated from protobuf field <code>string accessor_id = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $accessor_id = '';
    /**
     * Идентификатор компании в vcfront.
     * # Диапазон: 1..2147483647
     *
     * Generated from protobuf field <code>int32 vc_company_id = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $vc_company_id = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $request_id
     *           Идентификатор запроса
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $external_ids
     *           Идентификаторы камер в vcfront.
     *           # Тип: Guid
     *     @type int $camera_access_accessor_type
     *           Тип субъекта доступа
     *     @type string $accessor_id
     *           Идентификатор субъекта доступа.
     *           # Диапазон: 1..36
     *     @type int $vc_company_id
     *           Идентификатор компании в vcfront.
     *           # Диапазон: 1..2147483647
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Vc\V1\KeyapisVcEventsV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Идентификатор запроса
     *
     * Generated from protobuf field <code>string request_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getRequestId()
    {
        return $this->request_id;
    }

    /**
     * Идентификатор запроса
     *
     * Generated from protobuf field <code>string request_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setRequestId($var)
    {
        GPBUtil::checkString($var, True);
        $this->request_id = $var;

        return $this;
    }

    /**
     * Идентификаторы камер в vcfront.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>repeated string external_ids = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getExternalIds()
    {
        return $this->external_ids;
    }

    /**
     * Идентификаторы камер в vcfront.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>repeated string external_ids = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setExternalIds($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->external_ids = $arr;

        return $this;
    }

    /**
     * Тип субъекта доступа
     *
     * Generated from protobuf field <code>.keyapis.vc.v1.CameraAccess.AccessorType camera_access_accessor_type = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getCameraAccessAccessorType()
    {
        return $this->camera_access_accessor_type;
    }

    /**
     * Тип субъекта доступа
     *
     * Generated from protobuf field <code>.keyapis.vc.v1.CameraAccess.AccessorType camera_access_accessor_type = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setCameraAccessAccessorType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\Vc\V1\CameraAccess\AccessorType::class);
        $this->camera_access_accessor_type = $var;

        return $this;
    }

    /**
     * Идентификатор субъекта доступа.
     * # Диапазон: 1..36
     *
     * Generated from protobuf field <code>string accessor_id = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getAccessorId()
    {
        return $this->accessor_id;
    }

    /**
     * Идентификатор субъекта доступа.
     * # Диапазон: 1..36
     *
     * Generated from protobuf field <code>string accessor_id = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setAccessorId($var)
    {
        GPBUtil::checkString($var, True);
        $this->accessor_id = $var;

        return $this;
    }

    /**
     * Идентификатор компании в vcfront.
     * # Диапазон: 1..2147483647
     *
     * Generated from protobuf field <code>int32 vc_company_id = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getVcCompanyId()
    {
        return $this->vc_company_id;
    }

    /**
     * Идентификатор компании в vcfront.
     * # Диапазон: 1..2147483647
     *
     * Generated from protobuf field <code>int32 vc_company_id = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setVcCompanyId($var)
    {
        GPBUtil::checkInt32($var);
        $this->vc_company_id = $var;

        return $this;
    }

}

