<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for PlanningItemSelection_V2 StructType
 * @subpackage Structs
 */
class PlanningItemSelection_V2 extends PlanningItemSelection
{
    /**
     * The ForceCancel
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * - nillable: true
     * @var bool
     */
    public $ForceCancel;
    /**
     * Constructor method for PlanningItemSelection_V2
     * @uses PlanningItemSelection_V2::setForceCancel()
     * @param bool $forceCancel
     */
    public function __construct($forceCancel = null)
    {
        $this
            ->setForceCancel($forceCancel);
    }
    /**
     * Get ForceCancel value
     * @return bool
     */
    public function getForceCancel()
    {
        return $this->ForceCancel;
    }
    /**
     * Set ForceCancel value
     * @param bool $forceCancel
     * @return \StructType\PlanningItemSelection_V2
     */
    public function setForceCancel($forceCancel = null)
    {
        // validation for constraint: boolean
        if (!is_null($forceCancel) && !is_bool($forceCancel)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($forceCancel, true), gettype($forceCancel)), __LINE__);
        }
        $this->ForceCancel = $forceCancel;
        return $this;
    }
}
