<?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.AccessUserConfig</code>
 */
class AccessUserConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * The Id referred to in AccessMethod.AccessUserId, cannot be 0
     *
     * Generated from protobuf field <code>uint64 Id = 1;</code>
     */
    protected $Id = 0;
    /**
     * Visitor specific config fields
     *
     * Generated from protobuf field <code>bool FirstExitsThenEnters = 5;</code>
     */
    protected $FirstExitsThenEnters = false;
    /**
     * If the visitor is family or friend, typically an exit will be allowed to roll over to next day if an entry is used but no exits are used yet.
     *
     * Generated from protobuf field <code>bool RollOverExitToNextDay = 6;</code>
     */
    protected $RollOverExitToNextDay = false;
    /**
     * 0 for disabled, or infinite if exits is also 0, the number of entries allowed.
     *
     * Generated from protobuf field <code>sint32 EntryUses = 10;</code>
     */
    protected $EntryUses = 0;
    /**
     * 0 for disabled, or infinite if entries is also 0, the number of exits allowed, most of time it is typically 1
     *
     * Generated from protobuf field <code>sint32 ExitUses = 11;</code>
     */
    protected $ExitUses = 0;
    /**
     * General Access User Fields
     *
     * Generated from protobuf field <code>int64 StartDateTime = 13;</code>
     */
    protected $StartDateTime = 0;
    /**
     * Local Time: When this user expires, useful when visitor is only allowed for a certain duration
     *
     * Generated from protobuf field <code>int64 EndDateTime = 14;</code>
     */
    protected $EndDateTime = 0;
    /**
     * Which Access Rights this User belongs to, on this site
     *
     * Generated from protobuf field <code>repeated uint64 RightsIds = 15;</code>
     */
    private $RightsIds;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $Id
     *           The Id referred to in AccessMethod.AccessUserId, cannot be 0
     *     @type bool $FirstExitsThenEnters
     *           Visitor specific config fields
     *     @type bool $RollOverExitToNextDay
     *           If the visitor is family or friend, typically an exit will be allowed to roll over to next day if an entry is used but no exits are used yet.
     *     @type int $EntryUses
     *           0 for disabled, or infinite if exits is also 0, the number of entries allowed.
     *     @type int $ExitUses
     *           0 for disabled, or infinite if entries is also 0, the number of exits allowed, most of time it is typically 1
     *     @type int|string $StartDateTime
     *           General Access User Fields
     *     @type int|string $EndDateTime
     *           Local Time: When this user expires, useful when visitor is only allowed for a certain duration
     *     @type int[]|string[] $RightsIds
     *           Which Access Rights this User belongs to, on this site
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Access::initOnce();
        parent::__construct($data);
    }

    /**
     * The Id referred to in AccessMethod.AccessUserId, cannot be 0
     *
     * Generated from protobuf field <code>uint64 Id = 1;</code>
     * @return int|string
     */
    public function getId()
    {
        return $this->Id;
    }

    /**
     * The Id referred to in AccessMethod.AccessUserId, cannot be 0
     *
     * Generated from protobuf field <code>uint64 Id = 1;</code>
     * @param int|string $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkUint64($var);
        $this->Id = $var;

        return $this;
    }

    /**
     * Visitor specific config fields
     *
     * Generated from protobuf field <code>bool FirstExitsThenEnters = 5;</code>
     * @return bool
     */
    public function getFirstExitsThenEnters()
    {
        return $this->FirstExitsThenEnters;
    }

    /**
     * Visitor specific config fields
     *
     * Generated from protobuf field <code>bool FirstExitsThenEnters = 5;</code>
     * @param bool $var
     * @return $this
     */
    public function setFirstExitsThenEnters($var)
    {
        GPBUtil::checkBool($var);
        $this->FirstExitsThenEnters = $var;

        return $this;
    }

    /**
     * If the visitor is family or friend, typically an exit will be allowed to roll over to next day if an entry is used but no exits are used yet.
     *
     * Generated from protobuf field <code>bool RollOverExitToNextDay = 6;</code>
     * @return bool
     */
    public function getRollOverExitToNextDay()
    {
        return $this->RollOverExitToNextDay;
    }

    /**
     * If the visitor is family or friend, typically an exit will be allowed to roll over to next day if an entry is used but no exits are used yet.
     *
     * Generated from protobuf field <code>bool RollOverExitToNextDay = 6;</code>
     * @param bool $var
     * @return $this
     */
    public function setRollOverExitToNextDay($var)
    {
        GPBUtil::checkBool($var);
        $this->RollOverExitToNextDay = $var;

        return $this;
    }

    /**
     * 0 for disabled, or infinite if exits is also 0, the number of entries allowed.
     *
     * Generated from protobuf field <code>sint32 EntryUses = 10;</code>
     * @return int
     */
    public function getEntryUses()
    {
        return $this->EntryUses;
    }

    /**
     * 0 for disabled, or infinite if exits is also 0, the number of entries allowed.
     *
     * Generated from protobuf field <code>sint32 EntryUses = 10;</code>
     * @param int $var
     * @return $this
     */
    public function setEntryUses($var)
    {
        GPBUtil::checkInt32($var);
        $this->EntryUses = $var;

        return $this;
    }

    /**
     * 0 for disabled, or infinite if entries is also 0, the number of exits allowed, most of time it is typically 1
     *
     * Generated from protobuf field <code>sint32 ExitUses = 11;</code>
     * @return int
     */
    public function getExitUses()
    {
        return $this->ExitUses;
    }

    /**
     * 0 for disabled, or infinite if entries is also 0, the number of exits allowed, most of time it is typically 1
     *
     * Generated from protobuf field <code>sint32 ExitUses = 11;</code>
     * @param int $var
     * @return $this
     */
    public function setExitUses($var)
    {
        GPBUtil::checkInt32($var);
        $this->ExitUses = $var;

        return $this;
    }

    /**
     * General Access User Fields
     *
     * Generated from protobuf field <code>int64 StartDateTime = 13;</code>
     * @return int|string
     */
    public function getStartDateTime()
    {
        return $this->StartDateTime;
    }

    /**
     * General Access User Fields
     *
     * Generated from protobuf field <code>int64 StartDateTime = 13;</code>
     * @param int|string $var
     * @return $this
     */
    public function setStartDateTime($var)
    {
        GPBUtil::checkInt64($var);
        $this->StartDateTime = $var;

        return $this;
    }

    /**
     * Local Time: When this user expires, useful when visitor is only allowed for a certain duration
     *
     * Generated from protobuf field <code>int64 EndDateTime = 14;</code>
     * @return int|string
     */
    public function getEndDateTime()
    {
        return $this->EndDateTime;
    }

    /**
     * Local Time: When this user expires, useful when visitor is only allowed for a certain duration
     *
     * Generated from protobuf field <code>int64 EndDateTime = 14;</code>
     * @param int|string $var
     * @return $this
     */
    public function setEndDateTime($var)
    {
        GPBUtil::checkInt64($var);
        $this->EndDateTime = $var;

        return $this;
    }

    /**
     * Which Access Rights this User belongs to, on this site
     *
     * Generated from protobuf field <code>repeated uint64 RightsIds = 15;</code>
     * @return RepeatedField<int>|RepeatedField<string>
     */
    public function getRightsIds()
    {
        return $this->RightsIds;
    }

    /**
     * Which Access Rights this User belongs to, on this site
     *
     * Generated from protobuf field <code>repeated uint64 RightsIds = 15;</code>
     * @param int[]|string[] $var
     * @return $this
     */
    public function setRightsIds($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT64);
        $this->RightsIds = $arr;

        return $this;
    }

}

