<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for DispatcherSelection StructType
 * @subpackage Structs
 */
class DispatcherSelection extends AbstractStructBase
{
    /**
     * The ExcludeInactiveDispatchers
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * - nillable: true
     * @var bool
     */
    public $ExcludeInactiveDispatchers;
    /**
     * The Persons
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \ArrayType\ArrayOfIdentifier
     */
    public $Persons;
    /**
     * Constructor method for DispatcherSelection
     * @uses DispatcherSelection::setExcludeInactiveDispatchers()
     * @uses DispatcherSelection::setPersons()
     * @param bool $excludeInactiveDispatchers
     * @param \ArrayType\ArrayOfIdentifier $persons
     */
    public function __construct($excludeInactiveDispatchers = null, \ArrayType\ArrayOfIdentifier $persons = null)
    {
        $this
            ->setExcludeInactiveDispatchers($excludeInactiveDispatchers)
            ->setPersons($persons);
    }
    /**
     * Get ExcludeInactiveDispatchers value
     * @return bool
     */
    public function getExcludeInactiveDispatchers()
    {
        return $this->ExcludeInactiveDispatchers;
    }
    /**
     * Set ExcludeInactiveDispatchers value
     * @param bool $excludeInactiveDispatchers
     * @return \StructType\DispatcherSelection
     */
    public function setExcludeInactiveDispatchers($excludeInactiveDispatchers = null)
    {
        // validation for constraint: boolean
        if (!is_null($excludeInactiveDispatchers) && !is_bool($excludeInactiveDispatchers)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($excludeInactiveDispatchers, true), gettype($excludeInactiveDispatchers)), __LINE__);
        }
        $this->ExcludeInactiveDispatchers = $excludeInactiveDispatchers;
        return $this;
    }
    /**
     * Get Persons value
     * @return \ArrayType\ArrayOfIdentifier|null
     */
    public function getPersons()
    {
        return $this->Persons;
    }
    /**
     * Set Persons value
     * @param \ArrayType\ArrayOfIdentifier $persons
     * @return \StructType\DispatcherSelection
     */
    public function setPersons(\ArrayType\ArrayOfIdentifier $persons = null)
    {
        $this->Persons = $persons;
        return $this;
    }
}
