<?php

namespace Speedex\SpeedexStruct;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GetCODByVoucher SpeedexStruct
 * @package Speedex
 * @subpackage Structs
 */
class SpeedexGetCODByVoucher extends AbstractStructBase
{
    /**
     * The typeofSearch
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var int
     */
    public $typeofSearch;
    /**
     * The sessionID
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $sessionID;
    /**
     * The SearchCode
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $SearchCode;
    /**
     * Constructor method for GetCODByVoucher
     * @uses SpeedexGetCODByVoucher::setTypeofSearch()
     * @uses SpeedexGetCODByVoucher::setSessionID()
     * @uses SpeedexGetCODByVoucher::setSearchCode()
     * @param int $typeofSearch
     * @param string $sessionID
     * @param string $searchCode
     */
    public function __construct($typeofSearch = null, $sessionID = null, $searchCode = null)
    {
        $this
            ->setTypeofSearch($typeofSearch)
            ->setSessionID($sessionID)
            ->setSearchCode($searchCode);
    }
    /**
     * Get typeofSearch value
     * @return int
     */
    public function getTypeofSearch()
    {
        return $this->typeofSearch;
    }
    /**
     * Set typeofSearch value
     * @param int $typeofSearch
     * @return \Speedex\SpeedexStruct\SpeedexGetCODByVoucher
     */
    public function setTypeofSearch($typeofSearch = null)
    {
        // validation for constraint: int
        if (!is_null($typeofSearch) && !(is_int($typeofSearch) || ctype_digit($typeofSearch))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($typeofSearch, true), gettype($typeofSearch)), __LINE__);
        }
        $this->typeofSearch = $typeofSearch;
        return $this;
    }
    /**
     * Get sessionID value
     * @return string|null
     */
    public function getSessionID()
    {
        return $this->sessionID;
    }
    /**
     * Set sessionID value
     * @param string $sessionID
     * @return \Speedex\SpeedexStruct\SpeedexGetCODByVoucher
     */
    public function setSessionID($sessionID = null)
    {
        // validation for constraint: string
        if (!is_null($sessionID) && !is_string($sessionID)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($sessionID, true), gettype($sessionID)), __LINE__);
        }
        $this->sessionID = $sessionID;
        return $this;
    }
    /**
     * Get SearchCode value
     * @return string|null
     */
    public function getSearchCode()
    {
        return $this->SearchCode;
    }
    /**
     * Set SearchCode value
     * @param string $searchCode
     * @return \Speedex\SpeedexStruct\SpeedexGetCODByVoucher
     */
    public function setSearchCode($searchCode = null)
    {
        // validation for constraint: string
        if (!is_null($searchCode) && !is_string($searchCode)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($searchCode, true), gettype($searchCode)), __LINE__);
        }
        $this->SearchCode = $searchCode;
        return $this;
    }
}
