<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for BizAction.Ticketing.BulkAddLockAndAllocation.Request
 * StructType
 * @subpackage Structs
 */
class BizAction_Ticketing_BulkAddLockAndAllocation_Request extends BizAction_Foundation_BulkOperation_Request
{
    /**
     * The ShouldRemoveCurrent
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var bool
     */
    public $ShouldRemoveCurrent;
    /**
     * Constructor method for BizAction.Ticketing.BulkAddLockAndAllocation.Request
     * @uses BizAction_Ticketing_BulkAddLockAndAllocation_Request::setShouldRemoveCurrent()
     * @param bool $shouldRemoveCurrent
     */
    public function __construct($shouldRemoveCurrent = null)
    {
        $this
            ->setShouldRemoveCurrent($shouldRemoveCurrent);
    }
    /**
     * Get ShouldRemoveCurrent value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return bool|null
     */
    public function getShouldRemoveCurrent()
    {
        return isset($this->ShouldRemoveCurrent) ? $this->ShouldRemoveCurrent : null;
    }
    /**
     * Set ShouldRemoveCurrent value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param bool $shouldRemoveCurrent
     * @return \patest\StructType\BizAction_Ticketing_BulkAddLockAndAllocation_Request
     */
    public function setShouldRemoveCurrent($shouldRemoveCurrent = null)
    {
        // validation for constraint: boolean
        if (!is_null($shouldRemoveCurrent) && !is_bool($shouldRemoveCurrent)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($shouldRemoveCurrent, true), gettype($shouldRemoveCurrent)), __LINE__);
        }
        if (is_null($shouldRemoveCurrent) || (is_array($shouldRemoveCurrent) && empty($shouldRemoveCurrent))) {
            unset($this->ShouldRemoveCurrent);
        } else {
            $this->ShouldRemoveCurrent = $shouldRemoveCurrent;
        }
        return $this;
    }
}
