<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: access.proto

namespace OS\PB;

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

/**
 ** \@brief Simulate an Access Control event by providing an Access Reader and Method
 *
 * Generated from protobuf message <code>OS.PB.AccessRequest</code>
 */
class AccessRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * General
     *
     * Generated from protobuf field <code>.OS.PB.AccessRequest.AccessRequestFlags Flags = 7;</code>
     */
    protected $Flags = 0;
    /**
     * Simulation Request
     *
     * Generated from protobuf field <code>.OS.PB.AccessReader Reader = 1;</code>
     */
    protected $Reader = null;
    /**
     * Specify the Method to simulate by its MethodType
     *
     * Generated from protobuf field <code>.OS.PB.AccessMethodConfig Method = 4;</code>
     */
    protected $Method = null;
    /**
     * In seconds. If 0, use the gateway's local time to simulate; or use a specific local datetime as part of simulation
     *
     * Generated from protobuf field <code>int64 LocalDateTime = 5;</code>
     */
    protected $LocalDateTime = 0;
    /**
     * Enrol Request
     *
     * Generated from protobuf field <code>uint32 Expected = 10;</code>
     */
    protected $Expected = 0;
    /**
     * Default 30: Enrol timeout in seconds
     *
     * Generated from protobuf field <code>uint32 Timeout = 11;</code>
     */
    protected $Timeout = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $Flags
     *           General
     *     @type \OS\PB\AccessReader $Reader
     *           Simulation Request
     *     @type \OS\PB\AccessMethodConfig $Method
     *           Specify the Method to simulate by its MethodType
     *     @type int|string $LocalDateTime
     *           In seconds. If 0, use the gateway's local time to simulate; or use a specific local datetime as part of simulation
     *     @type int $Expected
     *           Enrol Request
     *     @type int $Timeout
     *           Default 30: Enrol timeout in seconds
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Access::initOnce();
        parent::__construct($data);
    }

    /**
     * General
     *
     * Generated from protobuf field <code>.OS.PB.AccessRequest.AccessRequestFlags Flags = 7;</code>
     * @return int
     */
    public function getFlags()
    {
        return $this->Flags;
    }

    /**
     * General
     *
     * Generated from protobuf field <code>.OS.PB.AccessRequest.AccessRequestFlags Flags = 7;</code>
     * @param int $var
     * @return $this
     */
    public function setFlags($var)
    {
        GPBUtil::checkEnum($var, \OS\PB\AccessRequest\AccessRequestFlags::class);
        $this->Flags = $var;

        return $this;
    }

    /**
     * Simulation Request
     *
     * Generated from protobuf field <code>.OS.PB.AccessReader Reader = 1;</code>
     * @return \OS\PB\AccessReader|null
     */
    public function getReader()
    {
        return $this->Reader;
    }

    public function hasReader()
    {
        return isset($this->Reader);
    }

    public function clearReader()
    {
        unset($this->Reader);
    }

    /**
     * Simulation Request
     *
     * Generated from protobuf field <code>.OS.PB.AccessReader Reader = 1;</code>
     * @param \OS\PB\AccessReader $var
     * @return $this
     */
    public function setReader($var)
    {
        GPBUtil::checkMessage($var, \OS\PB\AccessReader::class);
        $this->Reader = $var;

        return $this;
    }

    /**
     * Specify the Method to simulate by its MethodType
     *
     * Generated from protobuf field <code>.OS.PB.AccessMethodConfig Method = 4;</code>
     * @return \OS\PB\AccessMethodConfig|null
     */
    public function getMethod()
    {
        return $this->Method;
    }

    public function hasMethod()
    {
        return isset($this->Method);
    }

    public function clearMethod()
    {
        unset($this->Method);
    }

    /**
     * Specify the Method to simulate by its MethodType
     *
     * Generated from protobuf field <code>.OS.PB.AccessMethodConfig Method = 4;</code>
     * @param \OS\PB\AccessMethodConfig $var
     * @return $this
     */
    public function setMethod($var)
    {
        GPBUtil::checkMessage($var, \OS\PB\AccessMethodConfig::class);
        $this->Method = $var;

        return $this;
    }

    /**
     * In seconds. If 0, use the gateway's local time to simulate; or use a specific local datetime as part of simulation
     *
     * Generated from protobuf field <code>int64 LocalDateTime = 5;</code>
     * @return int|string
     */
    public function getLocalDateTime()
    {
        return $this->LocalDateTime;
    }

    /**
     * In seconds. If 0, use the gateway's local time to simulate; or use a specific local datetime as part of simulation
     *
     * Generated from protobuf field <code>int64 LocalDateTime = 5;</code>
     * @param int|string $var
     * @return $this
     */
    public function setLocalDateTime($var)
    {
        GPBUtil::checkInt64($var);
        $this->LocalDateTime = $var;

        return $this;
    }

    /**
     * Enrol Request
     *
     * Generated from protobuf field <code>uint32 Expected = 10;</code>
     * @return int
     */
    public function getExpected()
    {
        return $this->Expected;
    }

    /**
     * Enrol Request
     *
     * Generated from protobuf field <code>uint32 Expected = 10;</code>
     * @param int $var
     * @return $this
     */
    public function setExpected($var)
    {
        GPBUtil::checkUint32($var);
        $this->Expected = $var;

        return $this;
    }

    /**
     * Default 30: Enrol timeout in seconds
     *
     * Generated from protobuf field <code>uint32 Timeout = 11;</code>
     * @return int
     */
    public function getTimeout()
    {
        return $this->Timeout;
    }

    /**
     * Default 30: Enrol timeout in seconds
     *
     * Generated from protobuf field <code>uint32 Timeout = 11;</code>
     * @param int $var
     * @return $this
     */
    public function setTimeout($var)
    {
        GPBUtil::checkUint32($var);
        $this->Timeout = $var;

        return $this;
    }

}

