<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_BookingRules StructType
 * @subpackage Structs
 */
class JP_BookingRules extends AbstractStructBase
{
    /**
     * The AdjustmentResult
     * Meta information extracted from the WSDL
     * - choice: AdjustmentResult | CruiseResult | FlightResult | HotelResult | InsuranceResult | PackageResult | RentacarResult | ServiceResult | TransferResult | VisaResult
     * - choiceMaxOccurs: unbounded
     * - choiceMinOccurs: 0
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\JP_AdjustmentResult
     */
    public $AdjustmentResult;
    /**
     * The CruiseResult
     * Meta information extracted from the WSDL
     * - choice: AdjustmentResult | CruiseResult | FlightResult | HotelResult | InsuranceResult | PackageResult | RentacarResult | ServiceResult | TransferResult | VisaResult
     * - choiceMaxOccurs: unbounded
     * - choiceMinOccurs: 0
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\JP_CruiseResultsBookingRules
     */
    public $CruiseResult;
    /**
     * The FlightResult
     * Meta information extracted from the WSDL
     * - choice: AdjustmentResult | CruiseResult | FlightResult | HotelResult | InsuranceResult | PackageResult | RentacarResult | ServiceResult | TransferResult | VisaResult
     * - choiceMaxOccurs: unbounded
     * - choiceMinOccurs: 0
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\JP_FlightBookingRules
     */
    public $FlightResult;
    /**
     * The HotelResult
     * Meta information extracted from the WSDL
     * - choice: AdjustmentResult | CruiseResult | FlightResult | HotelResult | InsuranceResult | PackageResult | RentacarResult | ServiceResult | TransferResult | VisaResult
     * - choiceMaxOccurs: unbounded
     * - choiceMinOccurs: 0
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\JP_HotelResultsBookingRules
     */
    public $HotelResult;
    /**
     * The InsuranceResult
     * Meta information extracted from the WSDL
     * - choice: AdjustmentResult | CruiseResult | FlightResult | HotelResult | InsuranceResult | PackageResult | RentacarResult | ServiceResult | TransferResult | VisaResult
     * - choiceMaxOccurs: unbounded
     * - choiceMinOccurs: 0
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\JP_InsuranceBookingRules
     */
    public $InsuranceResult;
    /**
     * The PackageResult
     * Meta information extracted from the WSDL
     * - choice: AdjustmentResult | CruiseResult | FlightResult | HotelResult | InsuranceResult | PackageResult | RentacarResult | ServiceResult | TransferResult | VisaResult
     * - choiceMaxOccurs: unbounded
     * - choiceMinOccurs: 0
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\JP_PackageBookingRules
     */
    public $PackageResult;
    /**
     * The RentacarResult
     * Meta information extracted from the WSDL
     * - choice: AdjustmentResult | CruiseResult | FlightResult | HotelResult | InsuranceResult | PackageResult | RentacarResult | ServiceResult | TransferResult | VisaResult
     * - choiceMaxOccurs: unbounded
     * - choiceMinOccurs: 0
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\JP_RentacarResultsBookingRules
     */
    public $RentacarResult;
    /**
     * The ServiceResult
     * Meta information extracted from the WSDL
     * - choice: AdjustmentResult | CruiseResult | FlightResult | HotelResult | InsuranceResult | PackageResult | RentacarResult | ServiceResult | TransferResult | VisaResult
     * - choiceMaxOccurs: unbounded
     * - choiceMinOccurs: 0
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\JP_ServiceBookingRules
     */
    public $ServiceResult;
    /**
     * The TransferResult
     * Meta information extracted from the WSDL
     * - choice: AdjustmentResult | CruiseResult | FlightResult | HotelResult | InsuranceResult | PackageResult | RentacarResult | ServiceResult | TransferResult | VisaResult
     * - choiceMaxOccurs: unbounded
     * - choiceMinOccurs: 0
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\JP_TransferBookingRules
     */
    public $TransferResult;
    /**
     * The VisaResult
     * Meta information extracted from the WSDL
     * - choice: AdjustmentResult | CruiseResult | FlightResult | HotelResult | InsuranceResult | PackageResult | RentacarResult | ServiceResult | TransferResult | VisaResult
     * - choiceMaxOccurs: unbounded
     * - choiceMinOccurs: 0
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\JP_VisaBookingRules
     */
    public $VisaResult;
    /**
     * Constructor method for JP_BookingRules
     * @uses JP_BookingRules::setAdjustmentResult()
     * @uses JP_BookingRules::setCruiseResult()
     * @uses JP_BookingRules::setFlightResult()
     * @uses JP_BookingRules::setHotelResult()
     * @uses JP_BookingRules::setInsuranceResult()
     * @uses JP_BookingRules::setPackageResult()
     * @uses JP_BookingRules::setRentacarResult()
     * @uses JP_BookingRules::setServiceResult()
     * @uses JP_BookingRules::setTransferResult()
     * @uses JP_BookingRules::setVisaResult()
     * @param \StructType\JP_AdjustmentResult $adjustmentResult
     * @param \StructType\JP_CruiseResultsBookingRules $cruiseResult
     * @param \StructType\JP_FlightBookingRules $flightResult
     * @param \StructType\JP_HotelResultsBookingRules $hotelResult
     * @param \StructType\JP_InsuranceBookingRules $insuranceResult
     * @param \StructType\JP_PackageBookingRules $packageResult
     * @param \StructType\JP_RentacarResultsBookingRules $rentacarResult
     * @param \StructType\JP_ServiceBookingRules $serviceResult
     * @param \StructType\JP_TransferBookingRules $transferResult
     * @param \StructType\JP_VisaBookingRules $visaResult
     */
    public function __construct(\StructType\JP_AdjustmentResult $adjustmentResult = null, \StructType\JP_CruiseResultsBookingRules $cruiseResult = null, \StructType\JP_FlightBookingRules $flightResult = null, \StructType\JP_HotelResultsBookingRules $hotelResult = null, \StructType\JP_InsuranceBookingRules $insuranceResult = null, \StructType\JP_PackageBookingRules $packageResult = null, \StructType\JP_RentacarResultsBookingRules $rentacarResult = null, \StructType\JP_ServiceBookingRules $serviceResult = null, \StructType\JP_TransferBookingRules $transferResult = null, \StructType\JP_VisaBookingRules $visaResult = null)
    {
        $this
            ->setAdjustmentResult($adjustmentResult)
            ->setCruiseResult($cruiseResult)
            ->setFlightResult($flightResult)
            ->setHotelResult($hotelResult)
            ->setInsuranceResult($insuranceResult)
            ->setPackageResult($packageResult)
            ->setRentacarResult($rentacarResult)
            ->setServiceResult($serviceResult)
            ->setTransferResult($transferResult)
            ->setVisaResult($visaResult);
    }
    /**
     * Get AdjustmentResult value
     * @return \StructType\JP_AdjustmentResult|null
     */
    public function getAdjustmentResult()
    {
        return isset($this->AdjustmentResult) ? $this->AdjustmentResult : null;
    }
    /**
     * This method is responsible for validating the value passed to the setAdjustmentResult method
     * This method is willingly generated in order to preserve the one-line inline validation within the setAdjustmentResult 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 validateAdjustmentResultForChoiceConstraintsFromSetAdjustmentResult($value)
    {
        $message = '';
        if (is_null($value)) {
            return $message;
        }
        $properties = [
            'CruiseResult',
            'FlightResult',
            'HotelResult',
            'InsuranceResult',
            'PackageResult',
            'RentacarResult',
            'ServiceResult',
            'TransferResult',
            'VisaResult',
        ];
        try {
            foreach ($properties as $property) {
                if (isset($this->{$property})) {
                    throw new \InvalidArgumentException(sprintf('The property AdjustmentResult can\'t be set as the property %s is already set. Only one property must be set among these properties: AdjustmentResult, %s.', $property, implode(', ', $properties)), __LINE__);
                }
            }
        } catch (\InvalidArgumentException $e) {
            $message = $e->getMessage();
        }
        return $message;
    }
    /**
     * Set AdjustmentResult 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_AdjustmentResult $adjustmentResult
     * @return \StructType\JP_BookingRules
     */
    public function setAdjustmentResult(\StructType\JP_AdjustmentResult $adjustmentResult = null)
    {
        // validation for constraint: choice(AdjustmentResult, CruiseResult, FlightResult, HotelResult, InsuranceResult, PackageResult, RentacarResult, ServiceResult, TransferResult, VisaResult)
        if ('' !== ($adjustmentResultChoiceErrorMessage = self::validateAdjustmentResultForChoiceConstraintsFromSetAdjustmentResult($adjustmentResult))) {
            throw new \InvalidArgumentException($adjustmentResultChoiceErrorMessage, __LINE__);
        }
        if (is_null($adjustmentResult) || (is_array($adjustmentResult) && empty($adjustmentResult))) {
            unset($this->AdjustmentResult);
        } else {
            $this->AdjustmentResult = $adjustmentResult;
        }
        return $this;
    }
    /**
     * Get CruiseResult value
     * @return \StructType\JP_CruiseResultsBookingRules|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 = [
            'AdjustmentResult',
            '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_CruiseResultsBookingRules $cruiseResult
     * @return \StructType\JP_BookingRules
     */
    public function setCruiseResult(\StructType\JP_CruiseResultsBookingRules $cruiseResult = null)
    {
        // validation for constraint: choice(AdjustmentResult, 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_FlightBookingRules|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 = [
            'AdjustmentResult',
            '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_FlightBookingRules $flightResult
     * @return \StructType\JP_BookingRules
     */
    public function setFlightResult(\StructType\JP_FlightBookingRules $flightResult = null)
    {
        // validation for constraint: choice(AdjustmentResult, 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_HotelResultsBookingRules|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 = [
            'AdjustmentResult',
            '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_HotelResultsBookingRules $hotelResult
     * @return \StructType\JP_BookingRules
     */
    public function setHotelResult(\StructType\JP_HotelResultsBookingRules $hotelResult = null)
    {
        // validation for constraint: choice(AdjustmentResult, 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_InsuranceBookingRules|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 = [
            'AdjustmentResult',
            '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_InsuranceBookingRules $insuranceResult
     * @return \StructType\JP_BookingRules
     */
    public function setInsuranceResult(\StructType\JP_InsuranceBookingRules $insuranceResult = null)
    {
        // validation for constraint: choice(AdjustmentResult, 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_PackageBookingRules|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 = [
            'AdjustmentResult',
            '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_PackageBookingRules $packageResult
     * @return \StructType\JP_BookingRules
     */
    public function setPackageResult(\StructType\JP_PackageBookingRules $packageResult = null)
    {
        // validation for constraint: choice(AdjustmentResult, 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_RentacarResultsBookingRules|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 = [
            'AdjustmentResult',
            '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_RentacarResultsBookingRules $rentacarResult
     * @return \StructType\JP_BookingRules
     */
    public function setRentacarResult(\StructType\JP_RentacarResultsBookingRules $rentacarResult = null)
    {
        // validation for constraint: choice(AdjustmentResult, 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_ServiceBookingRules|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 = [
            'AdjustmentResult',
            '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_ServiceBookingRules $serviceResult
     * @return \StructType\JP_BookingRules
     */
    public function setServiceResult(\StructType\JP_ServiceBookingRules $serviceResult = null)
    {
        // validation for constraint: choice(AdjustmentResult, 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_TransferBookingRules|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 = [
            'AdjustmentResult',
            '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_TransferBookingRules $transferResult
     * @return \StructType\JP_BookingRules
     */
    public function setTransferResult(\StructType\JP_TransferBookingRules $transferResult = null)
    {
        // validation for constraint: choice(AdjustmentResult, 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_VisaBookingRules|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 = [
            'AdjustmentResult',
            '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_VisaBookingRules $visaResult
     * @return \StructType\JP_BookingRules
     */
    public function setVisaResult(\StructType\JP_VisaBookingRules $visaResult = null)
    {
        // validation for constraint: choice(AdjustmentResult, 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;
    }
}
