<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for InboxInfo_V2 StructType
 * @subpackage Structs
 */
class InboxInfo_V2 extends InboxInfo
{
    /**
     * The UntreatedMessagesSinceLastRequest
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var int
     */
    public $UntreatedMessagesSinceLastRequest;
    /**
     * Constructor method for InboxInfo_V2
     * @uses InboxInfo_V2::setUntreatedMessagesSinceLastRequest()
     * @param int $untreatedMessagesSinceLastRequest
     */
    public function __construct($untreatedMessagesSinceLastRequest = null)
    {
        $this
            ->setUntreatedMessagesSinceLastRequest($untreatedMessagesSinceLastRequest);
    }
    /**
     * Get UntreatedMessagesSinceLastRequest value
     * @return int
     */
    public function getUntreatedMessagesSinceLastRequest()
    {
        return $this->UntreatedMessagesSinceLastRequest;
    }
    /**
     * Set UntreatedMessagesSinceLastRequest value
     * @param int $untreatedMessagesSinceLastRequest
     * @return \StructType\InboxInfo_V2
     */
    public function setUntreatedMessagesSinceLastRequest($untreatedMessagesSinceLastRequest = null)
    {
        // validation for constraint: int
        if (!is_null($untreatedMessagesSinceLastRequest) && !(is_int($untreatedMessagesSinceLastRequest) || ctype_digit($untreatedMessagesSinceLastRequest))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($untreatedMessagesSinceLastRequest, true), gettype($untreatedMessagesSinceLastRequest)), __LINE__);
        }
        $this->UntreatedMessagesSinceLastRequest = $untreatedMessagesSinceLastRequest;
        return $this;
    }
}
