<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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