<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_SearchSegmentsTransfers StructType
 * @subpackage Structs
 */
class JP_SearchSegmentsTransfers extends AbstractStructBase
{
    /**
     * The SearchSegmenTransfers
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\JP_SearchSegmentTransfers
     */
    public $SearchSegmenTransfers;
    /**
     * The CountryOfResidence
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $CountryOfResidence;
    /**
     * Constructor method for JP_SearchSegmentsTransfers
     * @uses JP_SearchSegmentsTransfers::setSearchSegmenTransfers()
     * @uses JP_SearchSegmentsTransfers::setCountryOfResidence()
     * @param \StructType\JP_SearchSegmentTransfers $searchSegmenTransfers
     * @param string $countryOfResidence
     */
    public function __construct(\StructType\JP_SearchSegmentTransfers $searchSegmenTransfers = null, $countryOfResidence = null)
    {
        $this
            ->setSearchSegmenTransfers($searchSegmenTransfers)
            ->setCountryOfResidence($countryOfResidence);
    }
    /**
     * Get SearchSegmenTransfers value
     * @return \StructType\JP_SearchSegmentTransfers|null
     */
    public function getSearchSegmenTransfers()
    {
        return $this->SearchSegmenTransfers;
    }
    /**
     * Set SearchSegmenTransfers value
     * @param \StructType\JP_SearchSegmentTransfers $searchSegmenTransfers
     * @return \StructType\JP_SearchSegmentsTransfers
     */
    public function setSearchSegmenTransfers(\StructType\JP_SearchSegmentTransfers $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_SearchSegmentsTransfers
     */
    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;
    }
}
