<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

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