<?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 PackageContracts
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $PackageContracts;
    /**
     * 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::setPackageContracts()
     * @uses JP_SearchSegmentsServices::setCountryOfResidence()
     * @param \StructType\JP_SearchSegmentServices $searchSegmenServices
     * @param string $packageContracts
     * @param string $countryOfResidence
     */
    public function __construct(\StructType\JP_SearchSegmentServices $searchSegmenServices = null, $packageContracts = null, $countryOfResidence = null)
    {
        $this
            ->setSearchSegmenServices($searchSegmenServices)
            ->setPackageContracts($packageContracts)
            ->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 PackageContracts value
     * @return string|null
     */
    public function getPackageContracts()
    {
        return $this->PackageContracts;
    }
    /**
     * Set PackageContracts value
     * @uses \EnumType\JP_PackageContractsServices::valueIsValid()
     * @uses \EnumType\JP_PackageContractsServices::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $packageContracts
     * @return \StructType\JP_SearchSegmentsServices
     */
    public function setPackageContracts($packageContracts = null)
    {
        // validation for constraint: enumeration
        if (!\EnumType\JP_PackageContractsServices::valueIsValid($packageContracts)) {
            throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \EnumType\JP_PackageContractsServices', is_array($packageContracts) ? implode(', ', $packageContracts) : var_export($packageContracts, true), implode(', ', \EnumType\JP_PackageContractsServices::getValidValues())), __LINE__);
        }
        $this->PackageContracts = $packageContracts;
        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;
    }
}
