<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_CheckAvailResults StructType
 * @subpackage Structs
 */
class JP_CheckAvailResults extends AbstractStructBase
{
    /**
     * The CruiseResult
     * Meta information extracted from the WSDL
     * - choice: CruiseResult | FlightResult | HotelResult | InsuranceResult | PackageResult | RentacarResult | ServiceResult | TransferResult | VisaResult
     * - choiceMaxOccurs: unbounded
     * - choiceMinOccurs: 0
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\JP_CruiseCheckAvailResult
     */
    public $CruiseResult;
    /**
     * The FlightResult
     * Meta information extracted from the WSDL
     * - choice: CruiseResult | FlightResult | HotelResult | InsuranceResult | PackageResult | RentacarResult | ServiceResult | TransferResult | VisaResult
     * - choiceMaxOccurs: unbounded
     * - choiceMinOccurs: 0
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\JP_FlightCheckAvailResult
     */
    public $FlightResult;
    /**
     * The HotelResult
     * Meta information extracted from the WSDL
     * - choice: CruiseResult | FlightResult | HotelResult | InsuranceResult | PackageResult | RentacarResult | ServiceResult | TransferResult | VisaResult
     * - choiceMaxOccurs: unbounded
     * - choiceMinOccurs: 0
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\JP_HotelCheckAvailResult
     */
    public $HotelResult;
    /**
     * The InsuranceResult
     * Meta information extracted from the WSDL
     * - choice: CruiseResult | FlightResult | HotelResult | InsuranceResult | PackageResult | RentacarResult | ServiceResult | TransferResult | VisaResult
     * - choiceMaxOccurs: unbounded
     * - choiceMinOccurs: 0
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\JP_InsuranceCheckAvailResult
     */
    public $InsuranceResult;
    /**
     * The PackageResult
     * Meta information extracted from the WSDL
     * - choice: CruiseResult | FlightResult | HotelResult | InsuranceResult | PackageResult | RentacarResult | ServiceResult | TransferResult | VisaResult
     * - choiceMaxOccurs: unbounded
     * - choiceMinOccurs: 0
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\JP_PackageResult
     */
    public $PackageResult;
    /**
     * The RentacarResult
     * Meta information extracted from the WSDL
     * - choice: CruiseResult | FlightResult | HotelResult | InsuranceResult | PackageResult | RentacarResult | ServiceResult | TransferResult | VisaResult
     * - choiceMaxOccurs: unbounded
     * - choiceMinOccurs: 0
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\JP_RentacarCheckAvailResult
     */
    public $RentacarResult;
    /**
     * The ServiceResult
     * Meta information extracted from the WSDL
     * - choice: CruiseResult | FlightResult | HotelResult | InsuranceResult | PackageResult | RentacarResult | ServiceResult | TransferResult | VisaResult
     * - choiceMaxOccurs: unbounded
     * - choiceMinOccurs: 0
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\JP_ServiceCheckAvailResult
     */
    public $ServiceResult;
    /**
     * The TransferResult
     * Meta information extracted from the WSDL
     * - choice: CruiseResult | FlightResult | HotelResult | InsuranceResult | PackageResult | RentacarResult | ServiceResult | TransferResult | VisaResult
     * - choiceMaxOccurs: unbounded
     * - choiceMinOccurs: 0
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\JP_TransferCheckAvailResult
     */
    public $TransferResult;
    /**
     * The VisaResult
     * Meta information extracted from the WSDL
     * - choice: CruiseResult | FlightResult | HotelResult | InsuranceResult | PackageResult | RentacarResult | ServiceResult | TransferResult | VisaResult
     * - choiceMaxOccurs: unbounded
     * - choiceMinOccurs: 0
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\JP_VisaCheckAvailResult
     */
    public $VisaResult;
    /**
     * Constructor method for JP_CheckAvailResults
     * @uses JP_CheckAvailResults::setCruiseResult()
     * @uses JP_CheckAvailResults::setFlightResult()
     * @uses JP_CheckAvailResults::setHotelResult()
     * @uses JP_CheckAvailResults::setInsuranceResult()
     * @uses JP_CheckAvailResults::setPackageResult()
     * @uses JP_CheckAvailResults::setRentacarResult()
     * @uses JP_CheckAvailResults::setServiceResult()
     * @uses JP_CheckAvailResults::setTransferResult()
     * @uses JP_CheckAvailResults::setVisaResult()
     * @param \StructType\JP_CruiseCheckAvailResult $cruiseResult
     * @param \StructType\JP_FlightCheckAvailResult $flightResult
     * @param \StructType\JP_HotelCheckAvailResult $hotelResult
     * @param \StructType\JP_InsuranceCheckAvailResult $insuranceResult
     * @param \StructType\JP_PackageResult $packageResult
     * @param \StructType\JP_RentacarCheckAvailResult $rentacarResult
     * @param \StructType\JP_ServiceCheckAvailResult $serviceResult
     * @param \StructType\JP_TransferCheckAvailResult $transferResult
     * @param \StructType\JP_VisaCheckAvailResult $visaResult
     */
    public function __construct(\StructType\JP_CruiseCheckAvailResult $cruiseResult = null, \StructType\JP_FlightCheckAvailResult $flightResult = null, \StructType\JP_HotelCheckAvailResult $hotelResult = null, \StructType\JP_InsuranceCheckAvailResult $insuranceResult = null, \StructType\JP_PackageResult $packageResult = null, \StructType\JP_RentacarCheckAvailResult $rentacarResult = null, \StructType\JP_ServiceCheckAvailResult $serviceResult = null, \StructType\JP_TransferCheckAvailResult $transferResult = null, \StructType\JP_VisaCheckAvailResult $visaResult = null)
    {
        $this
            ->setCruiseResult($cruiseResult)
            ->setFlightResult($flightResult)
            ->setHotelResult($hotelResult)
            ->setInsuranceResult($insuranceResult)
            ->setPackageResult($packageResult)
            ->setRentacarResult($rentacarResult)
            ->setServiceResult($serviceResult)
            ->setTransferResult($transferResult)
            ->setVisaResult($visaResult);
    }
    /**
     * Get CruiseResult value
     * @return \StructType\JP_CruiseCheckAvailResult|null
     */
    public function getCruiseResult()
    {
        return isset($this->CruiseResult) ? $this->CruiseResult : null;
    }
    /**
     * This method is responsible for validating the value passed to the setCruiseResult method
     * This method is willingly generated in order to preserve the one-line inline validation within the setCruiseResult method
     * This has to validate that the property which is being set is the only one among the given choices
     * @param mixed $value
     * @return string A non-empty message if the values does not match the validation rules
     */
    public function validateCruiseResultForChoiceConstraintsFromSetCruiseResult($value)
    {
        $message = '';
        if (is_null($value)) {
            return $message;
        }
        $properties = [
            'FlightResult',
            'HotelResult',
            'InsuranceResult',
            'PackageResult',
            'RentacarResult',
            'ServiceResult',
            'TransferResult',
            'VisaResult',
        ];
        try {
            foreach ($properties as $property) {
                if (isset($this->{$property})) {
                    throw new \InvalidArgumentException(sprintf('The property CruiseResult can\'t be set as the property %s is already set. Only one property must be set among these properties: CruiseResult, %s.', $property, implode(', ', $properties)), __LINE__);
                }
            }
        } catch (\InvalidArgumentException $e) {
            $message = $e->getMessage();
        }
        return $message;
    }
    /**
     * Set CruiseResult value
     * This property belongs to a choice that allows only one property to exist. It is
     * therefore removable from the request, consequently if the value assigned to this
     * property is null, the property is removed from this object
     * @throws \InvalidArgumentException
     * @param \StructType\JP_CruiseCheckAvailResult $cruiseResult
     * @return \StructType\JP_CheckAvailResults
     */
    public function setCruiseResult(\StructType\JP_CruiseCheckAvailResult $cruiseResult = null)
    {
        // validation for constraint: choice(CruiseResult, FlightResult, HotelResult, InsuranceResult, PackageResult, RentacarResult, ServiceResult, TransferResult, VisaResult)
        if ('' !== ($cruiseResultChoiceErrorMessage = self::validateCruiseResultForChoiceConstraintsFromSetCruiseResult($cruiseResult))) {
            throw new \InvalidArgumentException($cruiseResultChoiceErrorMessage, __LINE__);
        }
        if (is_null($cruiseResult) || (is_array($cruiseResult) && empty($cruiseResult))) {
            unset($this->CruiseResult);
        } else {
            $this->CruiseResult = $cruiseResult;
        }
        return $this;
    }
    /**
     * Get FlightResult value
     * @return \StructType\JP_FlightCheckAvailResult|null
     */
    public function getFlightResult()
    {
        return isset($this->FlightResult) ? $this->FlightResult : null;
    }
    /**
     * This method is responsible for validating the value passed to the setFlightResult method
     * This method is willingly generated in order to preserve the one-line inline validation within the setFlightResult method
     * This has to validate that the property which is being set is the only one among the given choices
     * @param mixed $value
     * @return string A non-empty message if the values does not match the validation rules
     */
    public function validateFlightResultForChoiceConstraintsFromSetFlightResult($value)
    {
        $message = '';
        if (is_null($value)) {
            return $message;
        }
        $properties = [
            'CruiseResult',
            'HotelResult',
            'InsuranceResult',
            'PackageResult',
            'RentacarResult',
            'ServiceResult',
            'TransferResult',
            'VisaResult',
        ];
        try {
            foreach ($properties as $property) {
                if (isset($this->{$property})) {
                    throw new \InvalidArgumentException(sprintf('The property FlightResult can\'t be set as the property %s is already set. Only one property must be set among these properties: FlightResult, %s.', $property, implode(', ', $properties)), __LINE__);
                }
            }
        } catch (\InvalidArgumentException $e) {
            $message = $e->getMessage();
        }
        return $message;
    }
    /**
     * Set FlightResult value
     * This property belongs to a choice that allows only one property to exist. It is
     * therefore removable from the request, consequently if the value assigned to this
     * property is null, the property is removed from this object
     * @throws \InvalidArgumentException
     * @param \StructType\JP_FlightCheckAvailResult $flightResult
     * @return \StructType\JP_CheckAvailResults
     */
    public function setFlightResult(\StructType\JP_FlightCheckAvailResult $flightResult = null)
    {
        // validation for constraint: choice(CruiseResult, FlightResult, HotelResult, InsuranceResult, PackageResult, RentacarResult, ServiceResult, TransferResult, VisaResult)
        if ('' !== ($flightResultChoiceErrorMessage = self::validateFlightResultForChoiceConstraintsFromSetFlightResult($flightResult))) {
            throw new \InvalidArgumentException($flightResultChoiceErrorMessage, __LINE__);
        }
        if (is_null($flightResult) || (is_array($flightResult) && empty($flightResult))) {
            unset($this->FlightResult);
        } else {
            $this->FlightResult = $flightResult;
        }
        return $this;
    }
    /**
     * Get HotelResult value
     * @return \StructType\JP_HotelCheckAvailResult|null
     */
    public function getHotelResult()
    {
        return isset($this->HotelResult) ? $this->HotelResult : null;
    }
    /**
     * This method is responsible for validating the value passed to the setHotelResult method
     * This method is willingly generated in order to preserve the one-line inline validation within the setHotelResult method
     * This has to validate that the property which is being set is the only one among the given choices
     * @param mixed $value
     * @return string A non-empty message if the values does not match the validation rules
     */
    public function validateHotelResultForChoiceConstraintsFromSetHotelResult($value)
    {
        $message = '';
        if (is_null($value)) {
            return $message;
        }
        $properties = [
            'CruiseResult',
            'FlightResult',
            'InsuranceResult',
            'PackageResult',
            'RentacarResult',
            'ServiceResult',
            'TransferResult',
            'VisaResult',
        ];
        try {
            foreach ($properties as $property) {
                if (isset($this->{$property})) {
                    throw new \InvalidArgumentException(sprintf('The property HotelResult can\'t be set as the property %s is already set. Only one property must be set among these properties: HotelResult, %s.', $property, implode(', ', $properties)), __LINE__);
                }
            }
        } catch (\InvalidArgumentException $e) {
            $message = $e->getMessage();
        }
        return $message;
    }
    /**
     * Set HotelResult value
     * This property belongs to a choice that allows only one property to exist. It is
     * therefore removable from the request, consequently if the value assigned to this
     * property is null, the property is removed from this object
     * @throws \InvalidArgumentException
     * @param \StructType\JP_HotelCheckAvailResult $hotelResult
     * @return \StructType\JP_CheckAvailResults
     */
    public function setHotelResult(\StructType\JP_HotelCheckAvailResult $hotelResult = null)
    {
        // validation for constraint: choice(CruiseResult, FlightResult, HotelResult, InsuranceResult, PackageResult, RentacarResult, ServiceResult, TransferResult, VisaResult)
        if ('' !== ($hotelResultChoiceErrorMessage = self::validateHotelResultForChoiceConstraintsFromSetHotelResult($hotelResult))) {
            throw new \InvalidArgumentException($hotelResultChoiceErrorMessage, __LINE__);
        }
        if (is_null($hotelResult) || (is_array($hotelResult) && empty($hotelResult))) {
            unset($this->HotelResult);
        } else {
            $this->HotelResult = $hotelResult;
        }
        return $this;
    }
    /**
     * Get InsuranceResult value
     * @return \StructType\JP_InsuranceCheckAvailResult|null
     */
    public function getInsuranceResult()
    {
        return isset($this->InsuranceResult) ? $this->InsuranceResult : null;
    }
    /**
     * This method is responsible for validating the value passed to the setInsuranceResult method
     * This method is willingly generated in order to preserve the one-line inline validation within the setInsuranceResult method
     * This has to validate that the property which is being set is the only one among the given choices
     * @param mixed $value
     * @return string A non-empty message if the values does not match the validation rules
     */
    public function validateInsuranceResultForChoiceConstraintsFromSetInsuranceResult($value)
    {
        $message = '';
        if (is_null($value)) {
            return $message;
        }
        $properties = [
            'CruiseResult',
            'FlightResult',
            'HotelResult',
            'PackageResult',
            'RentacarResult',
            'ServiceResult',
            'TransferResult',
            'VisaResult',
        ];
        try {
            foreach ($properties as $property) {
                if (isset($this->{$property})) {
                    throw new \InvalidArgumentException(sprintf('The property InsuranceResult can\'t be set as the property %s is already set. Only one property must be set among these properties: InsuranceResult, %s.', $property, implode(', ', $properties)), __LINE__);
                }
            }
        } catch (\InvalidArgumentException $e) {
            $message = $e->getMessage();
        }
        return $message;
    }
    /**
     * Set InsuranceResult value
     * This property belongs to a choice that allows only one property to exist. It is
     * therefore removable from the request, consequently if the value assigned to this
     * property is null, the property is removed from this object
     * @throws \InvalidArgumentException
     * @param \StructType\JP_InsuranceCheckAvailResult $insuranceResult
     * @return \StructType\JP_CheckAvailResults
     */
    public function setInsuranceResult(\StructType\JP_InsuranceCheckAvailResult $insuranceResult = null)
    {
        // validation for constraint: choice(CruiseResult, FlightResult, HotelResult, InsuranceResult, PackageResult, RentacarResult, ServiceResult, TransferResult, VisaResult)
        if ('' !== ($insuranceResultChoiceErrorMessage = self::validateInsuranceResultForChoiceConstraintsFromSetInsuranceResult($insuranceResult))) {
            throw new \InvalidArgumentException($insuranceResultChoiceErrorMessage, __LINE__);
        }
        if (is_null($insuranceResult) || (is_array($insuranceResult) && empty($insuranceResult))) {
            unset($this->InsuranceResult);
        } else {
            $this->InsuranceResult = $insuranceResult;
        }
        return $this;
    }
    /**
     * Get PackageResult value
     * @return \StructType\JP_PackageResult|null
     */
    public function getPackageResult()
    {
        return isset($this->PackageResult) ? $this->PackageResult : null;
    }
    /**
     * This method is responsible for validating the value passed to the setPackageResult method
     * This method is willingly generated in order to preserve the one-line inline validation within the setPackageResult method
     * This has to validate that the property which is being set is the only one among the given choices
     * @param mixed $value
     * @return string A non-empty message if the values does not match the validation rules
     */
    public function validatePackageResultForChoiceConstraintsFromSetPackageResult($value)
    {
        $message = '';
        if (is_null($value)) {
            return $message;
        }
        $properties = [
            'CruiseResult',
            'FlightResult',
            'HotelResult',
            'InsuranceResult',
            'RentacarResult',
            'ServiceResult',
            'TransferResult',
            'VisaResult',
        ];
        try {
            foreach ($properties as $property) {
                if (isset($this->{$property})) {
                    throw new \InvalidArgumentException(sprintf('The property PackageResult can\'t be set as the property %s is already set. Only one property must be set among these properties: PackageResult, %s.', $property, implode(', ', $properties)), __LINE__);
                }
            }
        } catch (\InvalidArgumentException $e) {
            $message = $e->getMessage();
        }
        return $message;
    }
    /**
     * Set PackageResult value
     * This property belongs to a choice that allows only one property to exist. It is
     * therefore removable from the request, consequently if the value assigned to this
     * property is null, the property is removed from this object
     * @throws \InvalidArgumentException
     * @param \StructType\JP_PackageResult $packageResult
     * @return \StructType\JP_CheckAvailResults
     */
    public function setPackageResult(\StructType\JP_PackageResult $packageResult = null)
    {
        // validation for constraint: choice(CruiseResult, FlightResult, HotelResult, InsuranceResult, PackageResult, RentacarResult, ServiceResult, TransferResult, VisaResult)
        if ('' !== ($packageResultChoiceErrorMessage = self::validatePackageResultForChoiceConstraintsFromSetPackageResult($packageResult))) {
            throw new \InvalidArgumentException($packageResultChoiceErrorMessage, __LINE__);
        }
        if (is_null($packageResult) || (is_array($packageResult) && empty($packageResult))) {
            unset($this->PackageResult);
        } else {
            $this->PackageResult = $packageResult;
        }
        return $this;
    }
    /**
     * Get RentacarResult value
     * @return \StructType\JP_RentacarCheckAvailResult|null
     */
    public function getRentacarResult()
    {
        return isset($this->RentacarResult) ? $this->RentacarResult : null;
    }
    /**
     * This method is responsible for validating the value passed to the setRentacarResult method
     * This method is willingly generated in order to preserve the one-line inline validation within the setRentacarResult method
     * This has to validate that the property which is being set is the only one among the given choices
     * @param mixed $value
     * @return string A non-empty message if the values does not match the validation rules
     */
    public function validateRentacarResultForChoiceConstraintsFromSetRentacarResult($value)
    {
        $message = '';
        if (is_null($value)) {
            return $message;
        }
        $properties = [
            'CruiseResult',
            'FlightResult',
            'HotelResult',
            'InsuranceResult',
            'PackageResult',
            'ServiceResult',
            'TransferResult',
            'VisaResult',
        ];
        try {
            foreach ($properties as $property) {
                if (isset($this->{$property})) {
                    throw new \InvalidArgumentException(sprintf('The property RentacarResult can\'t be set as the property %s is already set. Only one property must be set among these properties: RentacarResult, %s.', $property, implode(', ', $properties)), __LINE__);
                }
            }
        } catch (\InvalidArgumentException $e) {
            $message = $e->getMessage();
        }
        return $message;
    }
    /**
     * Set RentacarResult value
     * This property belongs to a choice that allows only one property to exist. It is
     * therefore removable from the request, consequently if the value assigned to this
     * property is null, the property is removed from this object
     * @throws \InvalidArgumentException
     * @param \StructType\JP_RentacarCheckAvailResult $rentacarResult
     * @return \StructType\JP_CheckAvailResults
     */
    public function setRentacarResult(\StructType\JP_RentacarCheckAvailResult $rentacarResult = null)
    {
        // validation for constraint: choice(CruiseResult, FlightResult, HotelResult, InsuranceResult, PackageResult, RentacarResult, ServiceResult, TransferResult, VisaResult)
        if ('' !== ($rentacarResultChoiceErrorMessage = self::validateRentacarResultForChoiceConstraintsFromSetRentacarResult($rentacarResult))) {
            throw new \InvalidArgumentException($rentacarResultChoiceErrorMessage, __LINE__);
        }
        if (is_null($rentacarResult) || (is_array($rentacarResult) && empty($rentacarResult))) {
            unset($this->RentacarResult);
        } else {
            $this->RentacarResult = $rentacarResult;
        }
        return $this;
    }
    /**
     * Get ServiceResult value
     * @return \StructType\JP_ServiceCheckAvailResult|null
     */
    public function getServiceResult()
    {
        return isset($this->ServiceResult) ? $this->ServiceResult : null;
    }
    /**
     * This method is responsible for validating the value passed to the setServiceResult method
     * This method is willingly generated in order to preserve the one-line inline validation within the setServiceResult method
     * This has to validate that the property which is being set is the only one among the given choices
     * @param mixed $value
     * @return string A non-empty message if the values does not match the validation rules
     */
    public function validateServiceResultForChoiceConstraintsFromSetServiceResult($value)
    {
        $message = '';
        if (is_null($value)) {
            return $message;
        }
        $properties = [
            'CruiseResult',
            'FlightResult',
            'HotelResult',
            'InsuranceResult',
            'PackageResult',
            'RentacarResult',
            'TransferResult',
            'VisaResult',
        ];
        try {
            foreach ($properties as $property) {
                if (isset($this->{$property})) {
                    throw new \InvalidArgumentException(sprintf('The property ServiceResult can\'t be set as the property %s is already set. Only one property must be set among these properties: ServiceResult, %s.', $property, implode(', ', $properties)), __LINE__);
                }
            }
        } catch (\InvalidArgumentException $e) {
            $message = $e->getMessage();
        }
        return $message;
    }
    /**
     * Set ServiceResult value
     * This property belongs to a choice that allows only one property to exist. It is
     * therefore removable from the request, consequently if the value assigned to this
     * property is null, the property is removed from this object
     * @throws \InvalidArgumentException
     * @param \StructType\JP_ServiceCheckAvailResult $serviceResult
     * @return \StructType\JP_CheckAvailResults
     */
    public function setServiceResult(\StructType\JP_ServiceCheckAvailResult $serviceResult = null)
    {
        // validation for constraint: choice(CruiseResult, FlightResult, HotelResult, InsuranceResult, PackageResult, RentacarResult, ServiceResult, TransferResult, VisaResult)
        if ('' !== ($serviceResultChoiceErrorMessage = self::validateServiceResultForChoiceConstraintsFromSetServiceResult($serviceResult))) {
            throw new \InvalidArgumentException($serviceResultChoiceErrorMessage, __LINE__);
        }
        if (is_null($serviceResult) || (is_array($serviceResult) && empty($serviceResult))) {
            unset($this->ServiceResult);
        } else {
            $this->ServiceResult = $serviceResult;
        }
        return $this;
    }
    /**
     * Get TransferResult value
     * @return \StructType\JP_TransferCheckAvailResult|null
     */
    public function getTransferResult()
    {
        return isset($this->TransferResult) ? $this->TransferResult : null;
    }
    /**
     * This method is responsible for validating the value passed to the setTransferResult method
     * This method is willingly generated in order to preserve the one-line inline validation within the setTransferResult method
     * This has to validate that the property which is being set is the only one among the given choices
     * @param mixed $value
     * @return string A non-empty message if the values does not match the validation rules
     */
    public function validateTransferResultForChoiceConstraintsFromSetTransferResult($value)
    {
        $message = '';
        if (is_null($value)) {
            return $message;
        }
        $properties = [
            'CruiseResult',
            'FlightResult',
            'HotelResult',
            'InsuranceResult',
            'PackageResult',
            'RentacarResult',
            'ServiceResult',
            'VisaResult',
        ];
        try {
            foreach ($properties as $property) {
                if (isset($this->{$property})) {
                    throw new \InvalidArgumentException(sprintf('The property TransferResult can\'t be set as the property %s is already set. Only one property must be set among these properties: TransferResult, %s.', $property, implode(', ', $properties)), __LINE__);
                }
            }
        } catch (\InvalidArgumentException $e) {
            $message = $e->getMessage();
        }
        return $message;
    }
    /**
     * Set TransferResult value
     * This property belongs to a choice that allows only one property to exist. It is
     * therefore removable from the request, consequently if the value assigned to this
     * property is null, the property is removed from this object
     * @throws \InvalidArgumentException
     * @param \StructType\JP_TransferCheckAvailResult $transferResult
     * @return \StructType\JP_CheckAvailResults
     */
    public function setTransferResult(\StructType\JP_TransferCheckAvailResult $transferResult = null)
    {
        // validation for constraint: choice(CruiseResult, FlightResult, HotelResult, InsuranceResult, PackageResult, RentacarResult, ServiceResult, TransferResult, VisaResult)
        if ('' !== ($transferResultChoiceErrorMessage = self::validateTransferResultForChoiceConstraintsFromSetTransferResult($transferResult))) {
            throw new \InvalidArgumentException($transferResultChoiceErrorMessage, __LINE__);
        }
        if (is_null($transferResult) || (is_array($transferResult) && empty($transferResult))) {
            unset($this->TransferResult);
        } else {
            $this->TransferResult = $transferResult;
        }
        return $this;
    }
    /**
     * Get VisaResult value
     * @return \StructType\JP_VisaCheckAvailResult|null
     */
    public function getVisaResult()
    {
        return isset($this->VisaResult) ? $this->VisaResult : null;
    }
    /**
     * This method is responsible for validating the value passed to the setVisaResult method
     * This method is willingly generated in order to preserve the one-line inline validation within the setVisaResult method
     * This has to validate that the property which is being set is the only one among the given choices
     * @param mixed $value
     * @return string A non-empty message if the values does not match the validation rules
     */
    public function validateVisaResultForChoiceConstraintsFromSetVisaResult($value)
    {
        $message = '';
        if (is_null($value)) {
            return $message;
        }
        $properties = [
            'CruiseResult',
            'FlightResult',
            'HotelResult',
            'InsuranceResult',
            'PackageResult',
            'RentacarResult',
            'ServiceResult',
            'TransferResult',
        ];
        try {
            foreach ($properties as $property) {
                if (isset($this->{$property})) {
                    throw new \InvalidArgumentException(sprintf('The property VisaResult can\'t be set as the property %s is already set. Only one property must be set among these properties: VisaResult, %s.', $property, implode(', ', $properties)), __LINE__);
                }
            }
        } catch (\InvalidArgumentException $e) {
            $message = $e->getMessage();
        }
        return $message;
    }
    /**
     * Set VisaResult value
     * This property belongs to a choice that allows only one property to exist. It is
     * therefore removable from the request, consequently if the value assigned to this
     * property is null, the property is removed from this object
     * @throws \InvalidArgumentException
     * @param \StructType\JP_VisaCheckAvailResult $visaResult
     * @return \StructType\JP_CheckAvailResults
     */
    public function setVisaResult(\StructType\JP_VisaCheckAvailResult $visaResult = null)
    {
        // validation for constraint: choice(CruiseResult, FlightResult, HotelResult, InsuranceResult, PackageResult, RentacarResult, ServiceResult, TransferResult, VisaResult)
        if ('' !== ($visaResultChoiceErrorMessage = self::validateVisaResultForChoiceConstraintsFromSetVisaResult($visaResult))) {
            throw new \InvalidArgumentException($visaResultChoiceErrorMessage, __LINE__);
        }
        if (is_null($visaResult) || (is_array($visaResult) && empty($visaResult))) {
            unset($this->VisaResult);
        } else {
            $this->VisaResult = $visaResult;
        }
        return $this;
    }
}
