<?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 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_SearchSegmentsTransfers
     * @uses JP_SearchSegmentsTransfers::setSearchSegmenTransfers()
     * @uses JP_SearchSegmentsTransfers::setPackageContracts()
     * @uses JP_SearchSegmentsTransfers::setCountryOfResidence()
     * @param \StructType\JP_SearchSegmentTransfers $searchSegmenTransfers
     * @param string $packageContracts
     * @param string $countryOfResidence
     */
    public function __construct(\StructType\JP_SearchSegmentTransfers $searchSegmenTransfers = null, $packageContracts = null, $countryOfResidence = null)
    {
        $this
            ->setSearchSegmenTransfers($searchSegmenTransfers)
            ->setPackageContracts($packageContracts)
            ->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 PackageContracts value
     * @return string|null
     */
    public function getPackageContracts()
    {
        return $this->PackageContracts;
    }
    /**
     * Set PackageContracts value
     * @uses \EnumType\JP_PackageContractsTransfers::valueIsValid()
     * @uses \EnumType\JP_PackageContractsTransfers::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $packageContracts
     * @return \StructType\JP_SearchSegmentsTransfers
     */
    public function setPackageContracts($packageContracts = null)
    {
        // validation for constraint: enumeration
        if (!\EnumType\JP_PackageContractsTransfers::valueIsValid($packageContracts)) {
            throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \EnumType\JP_PackageContractsTransfers', is_array($packageContracts) ? implode(', ', $packageContracts) : var_export($packageContracts, true), implode(', ', \EnumType\JP_PackageContractsTransfers::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_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;
    }
}
