<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_CruiseSearch StructType
 * @subpackage Structs
 */
class JP_CruiseSearch extends AbstractStructBase
{
    /**
     * The Married
     * @var bool
     */
    public $Married;
    /**
     * The SelectionCode
     * @var string
     */
    public $SelectionCode;
    /**
     * Constructor method for JP_CruiseSearch
     * @uses JP_CruiseSearch::setMarried()
     * @uses JP_CruiseSearch::setSelectionCode()
     * @param bool $married
     * @param string $selectionCode
     */
    public function __construct($married = null, $selectionCode = null)
    {
        $this
            ->setMarried($married)
            ->setSelectionCode($selectionCode);
    }
    /**
     * Get Married value
     * @return bool|null
     */
    public function getMarried()
    {
        return $this->Married;
    }
    /**
     * Set Married value
     * @param bool $married
     * @return \StructType\JP_CruiseSearch
     */
    public function setMarried($married = null)
    {
        // validation for constraint: boolean
        if (!is_null($married) && !is_bool($married)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($married)), __LINE__);
        }
        $this->Married = $married;
        return $this;
    }
    /**
     * Get SelectionCode value
     * @return string|null
     */
    public function getSelectionCode()
    {
        return $this->SelectionCode;
    }
    /**
     * Set SelectionCode value
     * @param string $selectionCode
     * @return \StructType\JP_CruiseSearch
     */
    public function setSelectionCode($selectionCode = null)
    {
        // validation for constraint: string
        if (!is_null($selectionCode) && !is_string($selectionCode)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($selectionCode)), __LINE__);
        }
        $this->SelectionCode = $selectionCode;
        return $this;
    }
    /**
     * Method called when an object has been exported with var_export() functions
     * It allows to return an object instantiated with the values
     * @see AbstractStructBase::__set_state()
     * @uses AbstractStructBase::__set_state()
     * @param array $array the exported values
     * @return \StructType\JP_CruiseSearch
     */
    public static function __set_state(array $array)
    {
        return parent::__set_state($array);
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
