<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_PaxBag StructType
 * @subpackage Structs
 */
class JP_PaxBag extends AbstractStructBase
{
    /**
     * The BagSelectionCode
     * @var string
     */
    public $BagSelectionCode;
    /**
     * Constructor method for JP_PaxBag
     * @uses JP_PaxBag::setBagSelectionCode()
     * @param string $bagSelectionCode
     */
    public function __construct($bagSelectionCode = null)
    {
        $this
            ->setBagSelectionCode($bagSelectionCode);
    }
    /**
     * Get BagSelectionCode value
     * @return string|null
     */
    public function getBagSelectionCode()
    {
        return $this->BagSelectionCode;
    }
    /**
     * Set BagSelectionCode value
     * @param string $bagSelectionCode
     * @return \StructType\JP_PaxBag
     */
    public function setBagSelectionCode($bagSelectionCode = null)
    {
        // validation for constraint: string
        if (!is_null($bagSelectionCode) && !is_string($bagSelectionCode)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($bagSelectionCode, true), gettype($bagSelectionCode)), __LINE__);
        }
        $this->BagSelectionCode = $bagSelectionCode;
        return $this;
    }
}
