<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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