<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: keyapis/vc/v1/keyapis_vc_camera_access_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.CameraAccess</code>
 */
class CameraAccess extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор камеры в vcfront.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>string external_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $external_id = '';
    /**
     * Тип субъекта доступа
     *
     * Generated from protobuf field <code>.keyapis.vc.v1.CameraAccess.AccessorType accessor_type = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $accessor_type = 0;
    /**
     * Идентификатор субъекта доступа.
     * # Диапазон: 1..36
     *
     * Generated from protobuf field <code>string accessor_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $accessor_id = '';
    /**
     * Идентификатор компании в vcfront.
     * # Диапазон: 1..2147483647
     *
     * Generated from protobuf field <code>int32 vc_company_id = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $vc_company_id = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $external_id
     *           Идентификатор камеры в vcfront.
     *           # Тип: Guid
     *     @type int $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\KeyapisVcCameraAccessV1::initOnce();
        parent::__construct($data);
    }

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

    /**
     * Идентификатор камеры в vcfront.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>string external_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setExternalId($var)
    {
        GPBUtil::checkString($var, True);
        $this->external_id = $var;

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Идентификатор субъекта доступа.
     * # Диапазон: 1..36
     *
     * Generated from protobuf field <code>string accessor_id = 3 [(.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 = 3 [(.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 = 4 [(.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 = 4 [(.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;
    }

}

