<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for PublicEventVisibilityInfo StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:PublicEventVisibilityInfo
 * @subpackage Structs
 */
class PublicEventVisibilityInfo extends AbstractStructBase
{
    /**
     * The PublicVisibilityEndTime
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $PublicVisibilityEndTime;
    /**
     * The PublicVisibilityIsEnabled
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var bool
     */
    public $PublicVisibilityIsEnabled;
    /**
     * The PublicVisibilityStartTime
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $PublicVisibilityStartTime;
    /**
     * Constructor method for PublicEventVisibilityInfo
     * @uses PublicEventVisibilityInfo::setPublicVisibilityEndTime()
     * @uses PublicEventVisibilityInfo::setPublicVisibilityIsEnabled()
     * @uses PublicEventVisibilityInfo::setPublicVisibilityStartTime()
     * @param string $publicVisibilityEndTime
     * @param bool $publicVisibilityIsEnabled
     * @param string $publicVisibilityStartTime
     */
    public function __construct($publicVisibilityEndTime = null, $publicVisibilityIsEnabled = null, $publicVisibilityStartTime = null)
    {
        $this
            ->setPublicVisibilityEndTime($publicVisibilityEndTime)
            ->setPublicVisibilityIsEnabled($publicVisibilityIsEnabled)
            ->setPublicVisibilityStartTime($publicVisibilityStartTime);
    }
    /**
     * Get PublicVisibilityEndTime 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 string|null
     */
    public function getPublicVisibilityEndTime()
    {
        return isset($this->PublicVisibilityEndTime) ? $this->PublicVisibilityEndTime : null;
    }
    /**
     * Set PublicVisibilityEndTime 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 string $publicVisibilityEndTime
     * @return \patest\StructType\PublicEventVisibilityInfo
     */
    public function setPublicVisibilityEndTime($publicVisibilityEndTime = null)
    {
        // validation for constraint: string
        if (!is_null($publicVisibilityEndTime) && !is_string($publicVisibilityEndTime)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($publicVisibilityEndTime, true), gettype($publicVisibilityEndTime)), __LINE__);
        }
        if (is_null($publicVisibilityEndTime) || (is_array($publicVisibilityEndTime) && empty($publicVisibilityEndTime))) {
            unset($this->PublicVisibilityEndTime);
        } else {
            $this->PublicVisibilityEndTime = $publicVisibilityEndTime;
        }
        return $this;
    }
    /**
     * Get PublicVisibilityIsEnabled 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 getPublicVisibilityIsEnabled()
    {
        return isset($this->PublicVisibilityIsEnabled) ? $this->PublicVisibilityIsEnabled : null;
    }
    /**
     * Set PublicVisibilityIsEnabled 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 $publicVisibilityIsEnabled
     * @return \patest\StructType\PublicEventVisibilityInfo
     */
    public function setPublicVisibilityIsEnabled($publicVisibilityIsEnabled = null)
    {
        // validation for constraint: boolean
        if (!is_null($publicVisibilityIsEnabled) && !is_bool($publicVisibilityIsEnabled)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($publicVisibilityIsEnabled, true), gettype($publicVisibilityIsEnabled)), __LINE__);
        }
        if (is_null($publicVisibilityIsEnabled) || (is_array($publicVisibilityIsEnabled) && empty($publicVisibilityIsEnabled))) {
            unset($this->PublicVisibilityIsEnabled);
        } else {
            $this->PublicVisibilityIsEnabled = $publicVisibilityIsEnabled;
        }
        return $this;
    }
    /**
     * Get PublicVisibilityStartTime 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 string|null
     */
    public function getPublicVisibilityStartTime()
    {
        return isset($this->PublicVisibilityStartTime) ? $this->PublicVisibilityStartTime : null;
    }
    /**
     * Set PublicVisibilityStartTime 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 string $publicVisibilityStartTime
     * @return \patest\StructType\PublicEventVisibilityInfo
     */
    public function setPublicVisibilityStartTime($publicVisibilityStartTime = null)
    {
        // validation for constraint: string
        if (!is_null($publicVisibilityStartTime) && !is_string($publicVisibilityStartTime)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($publicVisibilityStartTime, true), gettype($publicVisibilityStartTime)), __LINE__);
        }
        if (is_null($publicVisibilityStartTime) || (is_array($publicVisibilityStartTime) && empty($publicVisibilityStartTime))) {
            unset($this->PublicVisibilityStartTime);
        } else {
            $this->PublicVisibilityStartTime = $publicVisibilityStartTime;
        }
        return $this;
    }
}
