<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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