<?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 When a User uses one of their entries or exits, this action propagates across the network to change the redeemed amount for that user on
 *         other gateways
 * \@version from 1.4
 *
 * Generated from protobuf message <code>OS.PB.AccessAction</code>
 */
class AccessAction extends \Google\Protobuf\Internal\Message
{
    /**
     * Access User Adjust Actions
     *
     * Generated from protobuf field <code>uint64 UserId = 1;</code>
     */
    protected $UserId = 0;
    /**
     * The new amount of entries that have been used
     *
     * Generated from protobuf field <code>uint32 EntriesRedeemed = 2;</code>
     */
    protected $EntriesRedeemed = 0;
    /**
     * The new amount of exits that have been used
     *
     * Generated from protobuf field <code>uint32 ExitsRedeemed = 3;</code>
     */
    protected $ExitsRedeemed = 0;
    /**
     * Access Control Override Specific Actions
     *
     * Generated from protobuf field <code>.OS.PB.Toggle OverrideControl = 5;</code>
     */
    protected $OverrideControl = 0;
    /**
     * A date time in UTC seconds when until Access Control Override will cease, can't be more than one week
     *
     * Generated from protobuf field <code>int64 EndDateTime = 6;</code>
     */
    protected $EndDateTime = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $UserId
     *           Access User Adjust Actions
     *     @type int $EntriesRedeemed
     *           The new amount of entries that have been used
     *     @type int $ExitsRedeemed
     *           The new amount of exits that have been used
     *     @type int $OverrideControl
     *           Access Control Override Specific Actions
     *     @type int|string $EndDateTime
     *           A date time in UTC seconds when until Access Control Override will cease, can't be more than one week
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Access::initOnce();
        parent::__construct($data);
    }

    /**
     * Access User Adjust Actions
     *
     * Generated from protobuf field <code>uint64 UserId = 1;</code>
     * @return int|string
     */
    public function getUserId()
    {
        return $this->UserId;
    }

    /**
     * Access User Adjust Actions
     *
     * Generated from protobuf field <code>uint64 UserId = 1;</code>
     * @param int|string $var
     * @return $this
     */
    public function setUserId($var)
    {
        GPBUtil::checkUint64($var);
        $this->UserId = $var;

        return $this;
    }

    /**
     * The new amount of entries that have been used
     *
     * Generated from protobuf field <code>uint32 EntriesRedeemed = 2;</code>
     * @return int
     */
    public function getEntriesRedeemed()
    {
        return $this->EntriesRedeemed;
    }

    /**
     * The new amount of entries that have been used
     *
     * Generated from protobuf field <code>uint32 EntriesRedeemed = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setEntriesRedeemed($var)
    {
        GPBUtil::checkUint32($var);
        $this->EntriesRedeemed = $var;

        return $this;
    }

    /**
     * The new amount of exits that have been used
     *
     * Generated from protobuf field <code>uint32 ExitsRedeemed = 3;</code>
     * @return int
     */
    public function getExitsRedeemed()
    {
        return $this->ExitsRedeemed;
    }

    /**
     * The new amount of exits that have been used
     *
     * Generated from protobuf field <code>uint32 ExitsRedeemed = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setExitsRedeemed($var)
    {
        GPBUtil::checkUint32($var);
        $this->ExitsRedeemed = $var;

        return $this;
    }

    /**
     * Access Control Override Specific Actions
     *
     * Generated from protobuf field <code>.OS.PB.Toggle OverrideControl = 5;</code>
     * @return int
     */
    public function getOverrideControl()
    {
        return $this->OverrideControl;
    }

    /**
     * Access Control Override Specific Actions
     *
     * Generated from protobuf field <code>.OS.PB.Toggle OverrideControl = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setOverrideControl($var)
    {
        GPBUtil::checkEnum($var, \OS\PB\Toggle::class);
        $this->OverrideControl = $var;

        return $this;
    }

    /**
     * A date time in UTC seconds when until Access Control Override will cease, can't be more than one week
     *
     * Generated from protobuf field <code>int64 EndDateTime = 6;</code>
     * @return int|string
     */
    public function getEndDateTime()
    {
        return $this->EndDateTime;
    }

    /**
     * A date time in UTC seconds when until Access Control Override will cease, can't be more than one week
     *
     * Generated from protobuf field <code>int64 EndDateTime = 6;</code>
     * @param int|string $var
     * @return $this
     */
    public function setEndDateTime($var)
    {
        GPBUtil::checkInt64($var);
        $this->EndDateTime = $var;

        return $this;
    }

}

