<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: osdp.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.OSDPConfig</code>
 */
class OSDPConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Sets up the addresses to poll for events
     *
     * Generated from protobuf field <code>repeated uint32 Addresses = 1;</code>
     */
    private $Addresses;
    /**
     * Default: 60 seconds before generating a OSDPOfflineEvent
     *
     * Generated from protobuf field <code>uint32 OfflineTimeout = 2;</code>
     */
    protected $OfflineTimeout = 0;
    /**
     * Generated from protobuf field <code>.OS.PB.OSDPConfig.KeypadModes KeypadMode = 8;</code>
     */
    protected $KeypadMode = 0;
    /**
     * Default 6: Valid only if keypad mode is not disabled, allows a certain number of digits permitted. 
     *
     * Generated from protobuf field <code>uint32 KeypadDigits = 9;</code>
     */
    protected $KeypadDigits = 0;
    /**
     * Default 4s: Timeout in seconds to reset keys already entered    
     *
     * Generated from protobuf field <code>uint32 KeypadResetTimeout = 10;</code>
     */
    protected $KeypadResetTimeout = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int[] $Addresses
     *           Sets up the addresses to poll for events
     *     @type int $OfflineTimeout
     *           Default: 60 seconds before generating a OSDPOfflineEvent
     *     @type int $KeypadMode
     *     @type int $KeypadDigits
     *           Default 6: Valid only if keypad mode is not disabled, allows a certain number of digits permitted. 
     *     @type int $KeypadResetTimeout
     *           Default 4s: Timeout in seconds to reset keys already entered    
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Osdp::initOnce();
        parent::__construct($data);
    }

    /**
     * Sets up the addresses to poll for events
     *
     * Generated from protobuf field <code>repeated uint32 Addresses = 1;</code>
     * @return RepeatedField<int>
     */
    public function getAddresses()
    {
        return $this->Addresses;
    }

    /**
     * Sets up the addresses to poll for events
     *
     * Generated from protobuf field <code>repeated uint32 Addresses = 1;</code>
     * @param int[] $var
     * @return $this
     */
    public function setAddresses($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT32);
        $this->Addresses = $arr;

        return $this;
    }

    /**
     * Default: 60 seconds before generating a OSDPOfflineEvent
     *
     * Generated from protobuf field <code>uint32 OfflineTimeout = 2;</code>
     * @return int
     */
    public function getOfflineTimeout()
    {
        return $this->OfflineTimeout;
    }

    /**
     * Default: 60 seconds before generating a OSDPOfflineEvent
     *
     * Generated from protobuf field <code>uint32 OfflineTimeout = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setOfflineTimeout($var)
    {
        GPBUtil::checkUint32($var);
        $this->OfflineTimeout = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.OS.PB.OSDPConfig.KeypadModes KeypadMode = 8;</code>
     * @return int
     */
    public function getKeypadMode()
    {
        return $this->KeypadMode;
    }

    /**
     * Generated from protobuf field <code>.OS.PB.OSDPConfig.KeypadModes KeypadMode = 8;</code>
     * @param int $var
     * @return $this
     */
    public function setKeypadMode($var)
    {
        GPBUtil::checkEnum($var, \OS\PB\OSDPConfig\KeypadModes::class);
        $this->KeypadMode = $var;

        return $this;
    }

    /**
     * Default 6: Valid only if keypad mode is not disabled, allows a certain number of digits permitted. 
     *
     * Generated from protobuf field <code>uint32 KeypadDigits = 9;</code>
     * @return int
     */
    public function getKeypadDigits()
    {
        return $this->KeypadDigits;
    }

    /**
     * Default 6: Valid only if keypad mode is not disabled, allows a certain number of digits permitted. 
     *
     * Generated from protobuf field <code>uint32 KeypadDigits = 9;</code>
     * @param int $var
     * @return $this
     */
    public function setKeypadDigits($var)
    {
        GPBUtil::checkUint32($var);
        $this->KeypadDigits = $var;

        return $this;
    }

    /**
     * Default 4s: Timeout in seconds to reset keys already entered    
     *
     * Generated from protobuf field <code>uint32 KeypadResetTimeout = 10;</code>
     * @return int
     */
    public function getKeypadResetTimeout()
    {
        return $this->KeypadResetTimeout;
    }

    /**
     * Default 4s: Timeout in seconds to reset keys already entered    
     *
     * Generated from protobuf field <code>uint32 KeypadResetTimeout = 10;</code>
     * @param int $var
     * @return $this
     */
    public function setKeypadResetTimeout($var)
    {
        GPBUtil::checkUint32($var);
        $this->KeypadResetTimeout = $var;

        return $this;
    }

}

