<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for BizAction.BizResource.DisplayLegend.Request StructType
 * @subpackage Structs
 */
class BizAction_BizResource_DisplayLegend_Request extends AnyEntity
{
    /**
     * The BizResources
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem
     */
    public $BizResources;
    /**
     * The Exceptions
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem
     */
    public $Exceptions;
    /**
     * The General
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem
     */
    public $General;
    /**
     * The Halls
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem
     */
    public $Halls;
    /**
     * The LegendType
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string[]
     */
    public $LegendType;
    /**
     * The ShowTypes
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem
     */
    public $ShowTypes;
    /**
     * The VisitPlans
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem
     */
    public $VisitPlans;
    /**
     * The VisitTypes
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem
     */
    public $VisitTypes;
    /**
     * Constructor method for BizAction.BizResource.DisplayLegend.Request
     * @uses BizAction_BizResource_DisplayLegend_Request::setBizResources()
     * @uses BizAction_BizResource_DisplayLegend_Request::setExceptions()
     * @uses BizAction_BizResource_DisplayLegend_Request::setGeneral()
     * @uses BizAction_BizResource_DisplayLegend_Request::setHalls()
     * @uses BizAction_BizResource_DisplayLegend_Request::setLegendType()
     * @uses BizAction_BizResource_DisplayLegend_Request::setShowTypes()
     * @uses BizAction_BizResource_DisplayLegend_Request::setVisitPlans()
     * @uses BizAction_BizResource_DisplayLegend_Request::setVisitTypes()
     * @param \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem $bizResources
     * @param \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem $exceptions
     * @param \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem $general
     * @param \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem $halls
     * @param string[] $legendType
     * @param \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem $showTypes
     * @param \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem $visitPlans
     * @param \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem $visitTypes
     */
    public function __construct(\patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem $bizResources = null, \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem $exceptions = null, \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem $general = null, \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem $halls = null, array $legendType = array(), \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem $showTypes = null, \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem $visitPlans = null, \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem $visitTypes = null)
    {
        $this
            ->setBizResources($bizResources)
            ->setExceptions($exceptions)
            ->setGeneral($general)
            ->setHalls($halls)
            ->setLegendType($legendType)
            ->setShowTypes($showTypes)
            ->setVisitPlans($visitPlans)
            ->setVisitTypes($visitTypes);
    }
    /**
     * Get BizResources 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 \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem|null
     */
    public function getBizResources()
    {
        return isset($this->BizResources) ? $this->BizResources : null;
    }
    /**
     * Set BizResources 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 \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem $bizResources
     * @return \patest\StructType\BizAction_BizResource_DisplayLegend_Request
     */
    public function setBizResources(\patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem $bizResources = null)
    {
        if (is_null($bizResources) || (is_array($bizResources) && empty($bizResources))) {
            unset($this->BizResources);
        } else {
            $this->BizResources = $bizResources;
        }
        return $this;
    }
    /**
     * Get Exceptions 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 \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem|null
     */
    public function getExceptions()
    {
        return isset($this->Exceptions) ? $this->Exceptions : null;
    }
    /**
     * Set Exceptions 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 \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem $exceptions
     * @return \patest\StructType\BizAction_BizResource_DisplayLegend_Request
     */
    public function setExceptions(\patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem $exceptions = null)
    {
        if (is_null($exceptions) || (is_array($exceptions) && empty($exceptions))) {
            unset($this->Exceptions);
        } else {
            $this->Exceptions = $exceptions;
        }
        return $this;
    }
    /**
     * Get General 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 \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem|null
     */
    public function getGeneral()
    {
        return isset($this->General) ? $this->General : null;
    }
    /**
     * Set General 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 \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem $general
     * @return \patest\StructType\BizAction_BizResource_DisplayLegend_Request
     */
    public function setGeneral(\patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem $general = null)
    {
        if (is_null($general) || (is_array($general) && empty($general))) {
            unset($this->General);
        } else {
            $this->General = $general;
        }
        return $this;
    }
    /**
     * Get Halls 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 \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem|null
     */
    public function getHalls()
    {
        return isset($this->Halls) ? $this->Halls : null;
    }
    /**
     * Set Halls 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 \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem $halls
     * @return \patest\StructType\BizAction_BizResource_DisplayLegend_Request
     */
    public function setHalls(\patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem $halls = null)
    {
        if (is_null($halls) || (is_array($halls) && empty($halls))) {
            unset($this->Halls);
        } else {
            $this->Halls = $halls;
        }
        return $this;
    }
    /**
     * Get LegendType 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 getLegendType()
    {
        return isset($this->LegendType) ? $this->LegendType : null;
    }
    /**
     * This method is responsible for validating the values passed to the setLegendType method
     * This method is willingly generated in order to preserve the one-line inline validation within the setLegendType method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateLegendTypeForArrayConstraintsFromSetLegendType(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $bizAction_BizResource_DisplayLegend_RequestLegendTypeItem) {
            // validation for constraint: enumeration
            if (!\patest\EnumType\CalendarLegendType::valueIsValid($bizAction_BizResource_DisplayLegend_RequestLegendTypeItem)) {
                $invalidValues[] = is_object($bizAction_BizResource_DisplayLegend_RequestLegendTypeItem) ? get_class($bizAction_BizResource_DisplayLegend_RequestLegendTypeItem) : sprintf('%s(%s)', gettype($bizAction_BizResource_DisplayLegend_RequestLegendTypeItem), var_export($bizAction_BizResource_DisplayLegend_RequestLegendTypeItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \patest\EnumType\CalendarLegendType', is_array($invalidValues) ? implode(', ', $invalidValues) : var_export($invalidValues, true), implode(', ', \patest\EnumType\CalendarLegendType::getValidValues()));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set LegendType 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
     * @uses \patest\EnumType\CalendarLegendType::valueIsValid()
     * @uses \patest\EnumType\CalendarLegendType::getValidValues()
     * @throws \InvalidArgumentException
     * @param string[] $legendType
     * @return \patest\StructType\BizAction_BizResource_DisplayLegend_Request
     */
    public function setLegendType(array $legendType = array())
    {
        // validation for constraint: list
        if ('' !== ($legendTypeArrayErrorMessage = self::validateLegendTypeForArrayConstraintsFromSetLegendType($legendType))) {
            throw new \InvalidArgumentException($legendTypeArrayErrorMessage, __LINE__);
        }
        if (is_null($legendType) || (is_array($legendType) && empty($legendType))) {
            unset($this->LegendType);
        } else {
            $this->LegendType = is_array($legendType) ? implode(' ', $legendType) : null;
        }
        return $this;
    }
    /**
     * Get ShowTypes 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 \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem|null
     */
    public function getShowTypes()
    {
        return isset($this->ShowTypes) ? $this->ShowTypes : null;
    }
    /**
     * Set ShowTypes 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 \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem $showTypes
     * @return \patest\StructType\BizAction_BizResource_DisplayLegend_Request
     */
    public function setShowTypes(\patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem $showTypes = null)
    {
        if (is_null($showTypes) || (is_array($showTypes) && empty($showTypes))) {
            unset($this->ShowTypes);
        } else {
            $this->ShowTypes = $showTypes;
        }
        return $this;
    }
    /**
     * Get VisitPlans 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 \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem|null
     */
    public function getVisitPlans()
    {
        return isset($this->VisitPlans) ? $this->VisitPlans : null;
    }
    /**
     * Set VisitPlans 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 \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem $visitPlans
     * @return \patest\StructType\BizAction_BizResource_DisplayLegend_Request
     */
    public function setVisitPlans(\patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem $visitPlans = null)
    {
        if (is_null($visitPlans) || (is_array($visitPlans) && empty($visitPlans))) {
            unset($this->VisitPlans);
        } else {
            $this->VisitPlans = $visitPlans;
        }
        return $this;
    }
    /**
     * Get VisitTypes 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 \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem|null
     */
    public function getVisitTypes()
    {
        return isset($this->VisitTypes) ? $this->VisitTypes : null;
    }
    /**
     * Set VisitTypes 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 \patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem $visitTypes
     * @return \patest\StructType\BizAction_BizResource_DisplayLegend_Request
     */
    public function setVisitTypes(\patest\StructType\RecordSetOfBizAction_BizResource_DisplayLegend_LegendItem $visitTypes = null)
    {
        if (is_null($visitTypes) || (is_array($visitTypes) && empty($visitTypes))) {
            unset($this->VisitTypes);
        } else {
            $this->VisitTypes = $visitTypes;
        }
        return $this;
    }
}
