<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_SearchSegmentsTransfersByHotel StructType
 * @subpackage Structs
 */
class JP_SearchSegmentsTransfersByHotel extends AbstractStructBase
{
    /**
     * The SearchSegmenTransfers
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\JP_SearchSegmentTransfersByHotel
     */
    public $SearchSegmenTransfers;
    /**
     * The CountryOfResidence
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $CountryOfResidence;
    /**
     * Constructor method for JP_SearchSegmentsTransfersByHotel
     * @uses JP_SearchSegmentsTransfersByHotel::setSearchSegmenTransfers()
     * @uses JP_SearchSegmentsTransfersByHotel::setCountryOfResidence()
     * @param \StructType\JP_SearchSegmentTransfersByHotel $searchSegmenTransfers
     * @param string $countryOfResidence
     */
    public function __construct(\StructType\JP_SearchSegmentTransfersByHotel $searchSegmenTransfers = null, $countryOfResidence = null)
    {
        $this
            ->setSearchSegmenTransfers($searchSegmenTransfers)
            ->setCountryOfResidence($countryOfResidence);
    }
    /**
     * Get SearchSegmenTransfers value
     * @return \StructType\JP_SearchSegmentTransfersByHotel|null
     */
    public function getSearchSegmenTransfers()
    {
        return $this->SearchSegmenTransfers;
    }
    /**
     * Set SearchSegmenTransfers value
     * @param \StructType\JP_SearchSegmentTransfersByHotel $searchSegmenTransfers
     * @return \StructType\JP_SearchSegmentsTransfersByHotel
     */
    public function setSearchSegmenTransfers(\StructType\JP_SearchSegmentTransfersByHotel $searchSegmenTransfers = null)
    {
        $this->SearchSegmenTransfers = $searchSegmenTransfers;
        return $this;
    }
    /**
     * Get CountryOfResidence value
     * @return string|null
     */
    public function getCountryOfResidence()
    {
        return $this->CountryOfResidence;
    }
    /**
     * Set CountryOfResidence value
     * @param string $countryOfResidence
     * @return \StructType\JP_SearchSegmentsTransfersByHotel
     */
    public function setCountryOfResidence($countryOfResidence = null)
    {
        // validation for constraint: string
        if (!is_null($countryOfResidence) && !is_string($countryOfResidence)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($countryOfResidence, true), gettype($countryOfResidence)), __LINE__);
        }
        $this->CountryOfResidence = $countryOfResidence;
        return $this;
    }
}
