<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for addDn StructType
 * @subpackage Structs
 */
class AddDn extends AbstractStructBase
{
    /**
     * The startDn
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: false
     * @var string
     */
    public $startDn;
    /**
     * The endDn
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: false
     * @var string
     */
    public $endDn;
    /**
     * The dnPrefix
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: false
     * @var string
     */
    public $dnPrefix;
    /**
     * Constructor method for addDn
     * @uses AddDn::setStartDn()
     * @uses AddDn::setEndDn()
     * @uses AddDn::setDnPrefix()
     * @param string $startDn
     * @param string $endDn
     * @param string $dnPrefix
     */
    public function __construct($startDn = null, $endDn = null, $dnPrefix = null)
    {
        $this
            ->setStartDn($startDn)
            ->setEndDn($endDn)
            ->setDnPrefix($dnPrefix);
    }
    /**
     * Get startDn value
     * @return string|null
     */
    public function getStartDn()
    {
        return $this->startDn;
    }
    /**
     * Set startDn value
     * @param string $startDn
     * @return AddDn
     */
    public function setStartDn($startDn = null)
    {
        // validation for constraint: string
        if (!is_null($startDn) && !is_string($startDn)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($startDn)), __LINE__);
        }
        $this->startDn = $startDn;
        return $this;
    }
    /**
     * Get endDn value
     * @return string|null
     */
    public function getEndDn()
    {
        return $this->endDn;
    }
    /**
     * Set endDn value
     * @param string $endDn
     * @return AddDn
     */
    public function setEndDn($endDn = null)
    {
        // validation for constraint: string
        if (!is_null($endDn) && !is_string($endDn)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($endDn)), __LINE__);
        }
        $this->endDn = $endDn;
        return $this;
    }
    /**
     * Get dnPrefix value
     * @return string|null
     */
    public function getDnPrefix()
    {
        return $this->dnPrefix;
    }
    /**
     * Set dnPrefix value
     * @param string $dnPrefix
     * @return AddDn
     */
    public function setDnPrefix($dnPrefix = null)
    {
        // validation for constraint: string
        if (!is_null($dnPrefix) && !is_string($dnPrefix)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($dnPrefix)), __LINE__);
        }
        $this->dnPrefix = $dnPrefix;
        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 AddDn
     */
    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__;
    }
}
