<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for EventOnlineManagementInfo StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:EventOnlineManagementInfo
 * @subpackage Structs
 */
class EventOnlineManagementInfo extends ExtensibleDataContract
{
    /**
     * The IsSellable
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var bool
     */
    public $IsSellable;
    /**
     * The IsTransferable
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var bool
     */
    public $IsTransferable;
    /**
     * Constructor method for EventOnlineManagementInfo
     * @uses EventOnlineManagementInfo::setIsSellable()
     * @uses EventOnlineManagementInfo::setIsTransferable()
     * @param bool $isSellable
     * @param bool $isTransferable
     */
    public function __construct($isSellable = null, $isTransferable = null)
    {
        $this
            ->setIsSellable($isSellable)
            ->setIsTransferable($isTransferable);
    }
    /**
     * Get IsSellable 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 getIsSellable()
    {
        return isset($this->IsSellable) ? $this->IsSellable : null;
    }
    /**
     * Set IsSellable 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 $isSellable
     * @return \patest\StructType\EventOnlineManagementInfo
     */
    public function setIsSellable($isSellable = null)
    {
        // validation for constraint: boolean
        if (!is_null($isSellable) && !is_bool($isSellable)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($isSellable, true), gettype($isSellable)), __LINE__);
        }
        if (is_null($isSellable) || (is_array($isSellable) && empty($isSellable))) {
            unset($this->IsSellable);
        } else {
            $this->IsSellable = $isSellable;
        }
        return $this;
    }
    /**
     * Get IsTransferable 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 getIsTransferable()
    {
        return isset($this->IsTransferable) ? $this->IsTransferable : null;
    }
    /**
     * Set IsTransferable 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 $isTransferable
     * @return \patest\StructType\EventOnlineManagementInfo
     */
    public function setIsTransferable($isTransferable = null)
    {
        // validation for constraint: boolean
        if (!is_null($isTransferable) && !is_bool($isTransferable)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($isTransferable, true), gettype($isTransferable)), __LINE__);
        }
        if (is_null($isTransferable) || (is_array($isTransferable) && empty($isTransferable))) {
            unset($this->IsTransferable);
        } else {
            $this->IsTransferable = $isTransferable;
        }
        return $this;
    }
}
