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

namespace Keyapis\AccessControl\V1;

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

/**
 * Запрос создания связи подъезда и устройства
 *
 * Generated from protobuf message <code>keyapis.access_control.v1.PutEntranceDeviceAttachRequest</code>
 */
class PutEntranceDeviceAttachRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Связь подъезда и устройства
     *
     * Generated from protobuf field <code>.keyapis.access_control.v1.EntranceDevice entrance_device = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $entrance_device = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Keyapis\AccessControl\V1\EntranceDevice $entrance_device
     *           Связь подъезда и устройства
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\AccessControl\V1\KeyapisAccessControlEntranceV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Связь подъезда и устройства
     *
     * Generated from protobuf field <code>.keyapis.access_control.v1.EntranceDevice entrance_device = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Keyapis\AccessControl\V1\EntranceDevice|null
     */
    public function getEntranceDevice()
    {
        return $this->entrance_device;
    }

    public function hasEntranceDevice()
    {
        return isset($this->entrance_device);
    }

    public function clearEntranceDevice()
    {
        unset($this->entrance_device);
    }

    /**
     * Связь подъезда и устройства
     *
     * Generated from protobuf field <code>.keyapis.access_control.v1.EntranceDevice entrance_device = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Keyapis\AccessControl\V1\EntranceDevice $var
     * @return $this
     */
    public function setEntranceDevice($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\AccessControl\V1\EntranceDevice::class);
        $this->entrance_device = $var;

        return $this;
    }

}

