<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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