<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for XBusyLampField StructType
 * @subpackage Structs
 */
class XBusyLampField extends AbstractStructBase
{
    /**
     * The blfDest
     * Meta informations extracted from the WSDL
     * - documentation: Either blfDest or the combination of blfDirn and routePartition is to be mentioned in the add/update request, if both are mentioned AXL will read only the blfDest tag and ignore blfDirn and routePartition.
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var string
     */
    public $blfDest;
    /**
     * The blfDirn
     * Meta informations extracted from the WSDL
     * - documentation: Either blfDest or the combination of blfDirn and routePartition is to be mentioned in the add/update request, if both are mentioned AXL will read only the blfDest tag and ignore blfDirn and routePartition.
     * - maxOccurs: 1
     * - minOccurs: 1
     * - nillable: false
     * - maxLength: 255
     * @var string
     */
    public $blfDirn;
    /**
     * The index
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var string
     */
    public $index;
    /**
     * The routePartition
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $routePartition;
    /**
     * The label
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $label;
    /**
     * The asciiLabel
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $asciiLabel;
    /**
     * The associatedBlfSdFeatures
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var AssociatedBlfSdFeatures
     */
    public $associatedBlfSdFeatures;
    /**
     * Constructor method for XBusyLampField
     * @uses XBusyLampField::setBlfDest()
     * @uses XBusyLampField::setBlfDirn()
     * @uses XBusyLampField::setIndex()
     * @uses XBusyLampField::setRoutePartition()
     * @uses XBusyLampField::setLabel()
     * @uses XBusyLampField::setAsciiLabel()
     * @uses XBusyLampField::setAssociatedBlfSdFeatures()
     * @param string $blfDest
     * @param string $blfDirn
     * @param string $index
     * @param string $routePartition
     * @param string $label
     * @param string $asciiLabel
     * @param AssociatedBlfSdFeatures $associatedBlfSdFeatures
     */
    public function __construct($blfDest = null, $blfDirn = null, $index = null, $routePartition = null, $label = null, $asciiLabel = null, AssociatedBlfSdFeatures $associatedBlfSdFeatures = null)
    {
        $this
            ->setBlfDest($blfDest)
            ->setBlfDirn($blfDirn)
            ->setIndex($index)
            ->setRoutePartition($routePartition)
            ->setLabel($label)
            ->setAsciiLabel($asciiLabel)
            ->setAssociatedBlfSdFeatures($associatedBlfSdFeatures);
    }
    /**
     * Get blfDest value
     * @return string
     */
    public function getBlfDest()
    {
        return $this->blfDest;
    }
    /**
     * Set blfDest value
     * @param string $blfDest
     * @return XBusyLampField
     */
    public function setBlfDest($blfDest = null)
    {
        // validation for constraint: string
        if (!is_null($blfDest) && !is_string($blfDest)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($blfDest)), __LINE__);
        }
        $this->blfDest = $blfDest;
        return $this;
    }
    /**
     * Get blfDirn value
     * @return string
     */
    public function getBlfDirn()
    {
        return $this->blfDirn;
    }
    /**
     * Set blfDirn value
     * @param string $blfDirn
     * @return XBusyLampField
     */
    public function setBlfDirn($blfDirn = null)
    {
        // validation for constraint: maxLength
        if ((is_scalar($blfDirn) && strlen($blfDirn) > 255) || (is_array($blfDirn) && count($blfDirn) > 255)) {
            throw new \InvalidArgumentException(sprintf('Invalid length, please provide an array with 255 element(s) or a scalar of 255 character(s) at most, "%d" length given', is_scalar($blfDirn) ? strlen($blfDirn) : count($blfDirn)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($blfDirn) && !is_string($blfDirn)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($blfDirn)), __LINE__);
        }
        $this->blfDirn = $blfDirn;
        return $this;
    }
    /**
     * Get index value
     * @return string
     */
    public function getIndex()
    {
        return $this->index;
    }
    /**
     * Set index value
     * @uses XInteger::valueIsValid()
     * @uses XInteger::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $index
     * @return XBusyLampField
     */
    public function setIndex($index = null)
    {
        // validation for constraint: enumeration
        if (!XInteger::valueIsValid($index)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $index, implode(', ', XInteger::getValidValues())), __LINE__);
        }
        $this->index = $index;
        return $this;
    }
    /**
     * Get routePartition value
     * @return string|null
     */
    public function getRoutePartition()
    {
        return $this->routePartition;
    }
    /**
     * Set routePartition value
     * @param string $routePartition
     * @return XBusyLampField
     */
    public function setRoutePartition($routePartition = null)
    {
        // validation for constraint: string
        if (!is_null($routePartition) && !is_string($routePartition)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($routePartition)), __LINE__);
        }
        $this->routePartition = $routePartition;
        return $this;
    }
    /**
     * Get label value
     * @return string|null
     */
    public function getLabel()
    {
        return $this->label;
    }
    /**
     * Set label value
     * @param string $label
     * @return XBusyLampField
     */
    public function setLabel($label = null)
    {
        // validation for constraint: string
        if (!is_null($label) && !is_string($label)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($label)), __LINE__);
        }
        $this->label = $label;
        return $this;
    }
    /**
     * Get asciiLabel value
     * @return string|null
     */
    public function getAsciiLabel()
    {
        return $this->asciiLabel;
    }
    /**
     * Set asciiLabel value
     * @param string $asciiLabel
     * @return XBusyLampField
     */
    public function setAsciiLabel($asciiLabel = null)
    {
        // validation for constraint: string
        if (!is_null($asciiLabel) && !is_string($asciiLabel)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($asciiLabel)), __LINE__);
        }
        $this->asciiLabel = $asciiLabel;
        return $this;
    }
    /**
     * Get associatedBlfSdFeatures value
     * @return AssociatedBlfSdFeatures|null
     */
    public function getAssociatedBlfSdFeatures()
    {
        return $this->associatedBlfSdFeatures;
    }
    /**
     * Set associatedBlfSdFeatures value
     * @param AssociatedBlfSdFeatures $associatedBlfSdFeatures
     * @return XBusyLampField
     */
    public function setAssociatedBlfSdFeatures(AssociatedBlfSdFeatures $associatedBlfSdFeatures = null)
    {
        $this->associatedBlfSdFeatures = $associatedBlfSdFeatures;
        return $this;
    }
    /**
     * Method called when an object has been exported with var_export() functions
     * It allows to return an object instantiated with the values
     * @see AbstractStructBase::__set_state()
     * @uses AbstractStructBase::__set_state()
     * @param array $array the exported values
     * @return XBusyLampField
     */
    public static function __set_state(array $array)
    {
        return parent::__set_state($array);
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
