<?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 %s, please provide a bool, %s given', var_export($married, true), 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 %s, please provide a string, %s given', var_export($selectionCode, true), gettype($selectionCode)), __LINE__);
        }
        $this->SelectionCode = $selectionCode;
        return $this;
    }
}
