<?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;

/**
 * Generated from protobuf message <code>OS.PB.AccessResponse</code>
 */
class AccessResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * General
     *
     * Generated from protobuf field <code>.OS.PB.Result Result = 7;</code>
     */
    protected $Result = 0;
    /**
     * Additional response information contained in this field
     *
     * Generated from protobuf field <code>string Message = 5;</code>
     */
    protected $Message = '';
    /**
     * AccessSimulation
     *
     * Generated from protobuf field <code>.OS.PB.AccessEvent Event = 1;</code>
     */
    protected $Event = null;
    /**
     * Deprecated from V1.1.1+0 in favour of Response
     *
     * Generated from protobuf field <code>bool DEPRECATEDRelayActivated = 2;</code>
     */
    protected $DEPRECATEDRelayActivated = false;
    /**
     * AccessEnrol
     *
     * Generated from protobuf field <code>.OS.PB.AccessMethodConfig Method = 10;</code>
     */
    protected $Method = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $Result
     *           General
     *     @type string $Message
     *           Additional response information contained in this field
     *     @type \OS\PB\AccessEvent $Event
     *           AccessSimulation
     *     @type bool $DEPRECATEDRelayActivated
     *           Deprecated from V1.1.1+0 in favour of Response
     *     @type \OS\PB\AccessMethodConfig $Method
     *           AccessEnrol
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Access::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

    /**
     * Additional response information contained in this field
     *
     * Generated from protobuf field <code>string Message = 5;</code>
     * @return string
     */
    public function getMessage()
    {
        return $this->Message;
    }

    /**
     * Additional response information contained in this field
     *
     * Generated from protobuf field <code>string Message = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setMessage($var)
    {
        GPBUtil::checkString($var, True);
        $this->Message = $var;

        return $this;
    }

    /**
     * AccessSimulation
     *
     * Generated from protobuf field <code>.OS.PB.AccessEvent Event = 1;</code>
     * @return \OS\PB\AccessEvent|null
     */
    public function getEvent()
    {
        return $this->Event;
    }

    public function hasEvent()
    {
        return isset($this->Event);
    }

    public function clearEvent()
    {
        unset($this->Event);
    }

    /**
     * AccessSimulation
     *
     * Generated from protobuf field <code>.OS.PB.AccessEvent Event = 1;</code>
     * @param \OS\PB\AccessEvent $var
     * @return $this
     */
    public function setEvent($var)
    {
        GPBUtil::checkMessage($var, \OS\PB\AccessEvent::class);
        $this->Event = $var;

        return $this;
    }

    /**
     * Deprecated from V1.1.1+0 in favour of Response
     *
     * Generated from protobuf field <code>bool DEPRECATEDRelayActivated = 2;</code>
     * @return bool
     */
    public function getDEPRECATEDRelayActivated()
    {
        return $this->DEPRECATEDRelayActivated;
    }

    /**
     * Deprecated from V1.1.1+0 in favour of Response
     *
     * Generated from protobuf field <code>bool DEPRECATEDRelayActivated = 2;</code>
     * @param bool $var
     * @return $this
     */
    public function setDEPRECATEDRelayActivated($var)
    {
        GPBUtil::checkBool($var);
        $this->DEPRECATEDRelayActivated = $var;

        return $this;
    }

    /**
     * AccessEnrol
     *
     * Generated from protobuf field <code>.OS.PB.AccessMethodConfig Method = 10;</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);
    }

    /**
     * AccessEnrol
     *
     * Generated from protobuf field <code>.OS.PB.AccessMethodConfig Method = 10;</code>
     * @param \OS\PB\AccessMethodConfig $var
     * @return $this
     */
    public function setMethod($var)
    {
        GPBUtil::checkMessage($var, \OS\PB\AccessMethodConfig::class);
        $this->Method = $var;

        return $this;
    }

}

