<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for OTA_InsurancePlanSearchRQSearchTravInfo StructType
 * @package Dg
 * @subpackage Structs
 */
class DgOTA_InsurancePlanSearchRQSearchTravInfo extends AbstractStructBase
{
    /**
     * The SearchTravelers
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\ArrayType\DgArrayOfSearchTravelerType
     */
    public $SearchTravelers;
    /**
     * The CitizenCountryName
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\StructType\DgCountryNameType
     */
    public $CitizenCountryName;
    /**
     * The ResidenceCountryName
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\StructType\DgCountryNameType
     */
    public $ResidenceCountryName;
    /**
     * The Affiliations
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\StructType\DgBoundedAffiliationsType
     */
    public $Affiliations;
    /**
     * The MinTravelers
     * @var int
     */
    public $MinTravelers;
    /**
     * The MaxTravelers
     * @var int
     */
    public $MaxTravelers;
    /**
     * Constructor method for OTA_InsurancePlanSearchRQSearchTravInfo
     * @uses DgOTA_InsurancePlanSearchRQSearchTravInfo::setSearchTravelers()
     * @uses DgOTA_InsurancePlanSearchRQSearchTravInfo::setCitizenCountryName()
     * @uses DgOTA_InsurancePlanSearchRQSearchTravInfo::setResidenceCountryName()
     * @uses DgOTA_InsurancePlanSearchRQSearchTravInfo::setAffiliations()
     * @uses DgOTA_InsurancePlanSearchRQSearchTravInfo::setMinTravelers()
     * @uses DgOTA_InsurancePlanSearchRQSearchTravInfo::setMaxTravelers()
     * @param \dgsoft\ArrayType\DgArrayOfSearchTravelerType $searchTravelers
     * @param \dgsoft\StructType\DgCountryNameType $citizenCountryName
     * @param \dgsoft\StructType\DgCountryNameType $residenceCountryName
     * @param \dgsoft\StructType\DgBoundedAffiliationsType $affiliations
     * @param int $minTravelers
     * @param int $maxTravelers
     */
    public function __construct(\dgsoft\ArrayType\DgArrayOfSearchTravelerType $searchTravelers = null, \dgsoft\StructType\DgCountryNameType $citizenCountryName = null, \dgsoft\StructType\DgCountryNameType $residenceCountryName = null, \dgsoft\StructType\DgBoundedAffiliationsType $affiliations = null, $minTravelers = null, $maxTravelers = null)
    {
        $this
            ->setSearchTravelers($searchTravelers)
            ->setCitizenCountryName($citizenCountryName)
            ->setResidenceCountryName($residenceCountryName)
            ->setAffiliations($affiliations)
            ->setMinTravelers($minTravelers)
            ->setMaxTravelers($maxTravelers);
    }
    /**
     * Get SearchTravelers value
     * @return \dgsoft\ArrayType\DgArrayOfSearchTravelerType|null
     */
    public function getSearchTravelers()
    {
        return $this->SearchTravelers;
    }
    /**
     * Set SearchTravelers value
     * @param \dgsoft\ArrayType\DgArrayOfSearchTravelerType $searchTravelers
     * @return \dgsoft\StructType\DgOTA_InsurancePlanSearchRQSearchTravInfo
     */
    public function setSearchTravelers(\dgsoft\ArrayType\DgArrayOfSearchTravelerType $searchTravelers = null)
    {
        $this->SearchTravelers = $searchTravelers;
        return $this;
    }
    /**
     * Get CitizenCountryName value
     * @return \dgsoft\StructType\DgCountryNameType|null
     */
    public function getCitizenCountryName()
    {
        return $this->CitizenCountryName;
    }
    /**
     * Set CitizenCountryName value
     * @param \dgsoft\StructType\DgCountryNameType $citizenCountryName
     * @return \dgsoft\StructType\DgOTA_InsurancePlanSearchRQSearchTravInfo
     */
    public function setCitizenCountryName(\dgsoft\StructType\DgCountryNameType $citizenCountryName = null)
    {
        $this->CitizenCountryName = $citizenCountryName;
        return $this;
    }
    /**
     * Get ResidenceCountryName value
     * @return \dgsoft\StructType\DgCountryNameType|null
     */
    public function getResidenceCountryName()
    {
        return $this->ResidenceCountryName;
    }
    /**
     * Set ResidenceCountryName value
     * @param \dgsoft\StructType\DgCountryNameType $residenceCountryName
     * @return \dgsoft\StructType\DgOTA_InsurancePlanSearchRQSearchTravInfo
     */
    public function setResidenceCountryName(\dgsoft\StructType\DgCountryNameType $residenceCountryName = null)
    {
        $this->ResidenceCountryName = $residenceCountryName;
        return $this;
    }
    /**
     * Get Affiliations value
     * @return \dgsoft\StructType\DgBoundedAffiliationsType|null
     */
    public function getAffiliations()
    {
        return $this->Affiliations;
    }
    /**
     * Set Affiliations value
     * @param \dgsoft\StructType\DgBoundedAffiliationsType $affiliations
     * @return \dgsoft\StructType\DgOTA_InsurancePlanSearchRQSearchTravInfo
     */
    public function setAffiliations(\dgsoft\StructType\DgBoundedAffiliationsType $affiliations = null)
    {
        $this->Affiliations = $affiliations;
        return $this;
    }
    /**
     * Get MinTravelers value
     * @return int|null
     */
    public function getMinTravelers()
    {
        return $this->MinTravelers;
    }
    /**
     * Set MinTravelers value
     * @param int $minTravelers
     * @return \dgsoft\StructType\DgOTA_InsurancePlanSearchRQSearchTravInfo
     */
    public function setMinTravelers($minTravelers = null)
    {
        // validation for constraint: int
        if (!is_null($minTravelers) && !is_numeric($minTravelers)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($minTravelers)), __LINE__);
        }
        $this->MinTravelers = $minTravelers;
        return $this;
    }
    /**
     * Get MaxTravelers value
     * @return int|null
     */
    public function getMaxTravelers()
    {
        return $this->MaxTravelers;
    }
    /**
     * Set MaxTravelers value
     * @param int $maxTravelers
     * @return \dgsoft\StructType\DgOTA_InsurancePlanSearchRQSearchTravInfo
     */
    public function setMaxTravelers($maxTravelers = null)
    {
        // validation for constraint: int
        if (!is_null($maxTravelers) && !is_numeric($maxTravelers)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($maxTravelers)), __LINE__);
        }
        $this->MaxTravelers = $maxTravelers;
        return $this;
    }
    /**
     * Method called when an object has been exported with var_export() functions
     * It allows to return an object instantiated with the values
     * @see AbstractStructBase::__set_state()
     * @uses AbstractStructBase::__set_state()
     * @param array $array the exported values
     * @return \dgsoft\StructType\DgOTA_InsurancePlanSearchRQSearchTravInfo
     */
    public static function __set_state(array $array)
    {
        return parent::__set_state($array);
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
