<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for XImeE164Transformation StructType
 * @subpackage Structs
 */
class XImeE164Transformation extends AbstractStructBase
{
    /**
     * The name
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * - nillable: false
     * - maxLength: 50
     * @var string
     */
    public $name;
    /**
     * The description
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: false
     * @var string
     */
    public $description;
    /**
     * The cgpnTransformationCssName
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: true
     * @var XFkType
     */
    public $cgpnTransformationCssName;
    /**
     * The isCgpnPreTransformation
     * Meta informations extracted from the WSDL
     * - default: false
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: false
     * - pattern: (t)|(f)|(true)|(false)|(0)|(1)
     * @var string
     */
    public $isCgpnPreTransformation;
    /**
     * The cdpnTransformationCssName
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: true
     * @var XFkType
     */
    public $cdpnTransformationCssName;
    /**
     * The isCdpnPreTransformation
     * Meta informations extracted from the WSDL
     * - default: false
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: false
     * - pattern: (t)|(f)|(true)|(false)|(0)|(1)
     * @var string
     */
    public $isCdpnPreTransformation;
    /**
     * The incomingCgpnTransformationProfileName
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: true
     * @var XFkType
     */
    public $incomingCgpnTransformationProfileName;
    /**
     * The incomingCdpnTransformationProfileName
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: true
     * @var XFkType
     */
    public $incomingCdpnTransformationProfileName;
    /**
     * Constructor method for XImeE164Transformation
     * @uses XImeE164Transformation::setName()
     * @uses XImeE164Transformation::setDescription()
     * @uses XImeE164Transformation::setCgpnTransformationCssName()
     * @uses XImeE164Transformation::setIsCgpnPreTransformation()
     * @uses XImeE164Transformation::setCdpnTransformationCssName()
     * @uses XImeE164Transformation::setIsCdpnPreTransformation()
     * @uses XImeE164Transformation::setIncomingCgpnTransformationProfileName()
     * @uses XImeE164Transformation::setIncomingCdpnTransformationProfileName()
     * @param string $name
     * @param string $description
     * @param XFkType $cgpnTransformationCssName
     * @param string $isCgpnPreTransformation
     * @param XFkType $cdpnTransformationCssName
     * @param string $isCdpnPreTransformation
     * @param XFkType $incomingCgpnTransformationProfileName
     * @param XFkType $incomingCdpnTransformationProfileName
     */
    public function __construct($name = null, $description = null, XFkType $cgpnTransformationCssName = null, $isCgpnPreTransformation = false, XFkType $cdpnTransformationCssName = null, $isCdpnPreTransformation = false, XFkType $incomingCgpnTransformationProfileName = null, XFkType $incomingCdpnTransformationProfileName = null)
    {
        $this
            ->setName($name)
            ->setDescription($description)
            ->setCgpnTransformationCssName($cgpnTransformationCssName)
            ->setIsCgpnPreTransformation($isCgpnPreTransformation)
            ->setCdpnTransformationCssName($cdpnTransformationCssName)
            ->setIsCdpnPreTransformation($isCdpnPreTransformation)
            ->setIncomingCgpnTransformationProfileName($incomingCgpnTransformationProfileName)
            ->setIncomingCdpnTransformationProfileName($incomingCdpnTransformationProfileName);
    }
    /**
     * Get name value
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }
    /**
     * Set name value
     * @param string $name
     * @return XImeE164Transformation
     */
    public function setName($name = null)
    {
        // validation for constraint: maxLength
        if ((is_scalar($name) && strlen($name) > 50) || (is_array($name) && count($name) > 50)) {
            throw new \InvalidArgumentException(sprintf('Invalid length, please provide an array with 50 element(s) or a scalar of 50 character(s) at most, "%d" length given', is_scalar($name) ? strlen($name) : count($name)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($name) && !is_string($name)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($name)), __LINE__);
        }
        $this->name = $name;
        return $this;
    }
    /**
     * Get description value
     * @return string|null
     */
    public function getDescription()
    {
        return $this->description;
    }
    /**
     * Set description value
     * @param string $description
     * @return XImeE164Transformation
     */
    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;
    }
    /**
     * Get cgpnTransformationCssName 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 XFkType|null
     */
    public function getCgpnTransformationCssName()
    {
        return isset($this->cgpnTransformationCssName) ? $this->cgpnTransformationCssName : null;
    }
    /**
     * Set cgpnTransformationCssName 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 XFkType $cgpnTransformationCssName
     * @return XImeE164Transformation
     */
    public function setCgpnTransformationCssName(XFkType $cgpnTransformationCssName = null)
    {
        if (is_null($cgpnTransformationCssName) || (is_array($cgpnTransformationCssName) && empty($cgpnTransformationCssName))) {
            unset($this->cgpnTransformationCssName);
        } else {
            $this->cgpnTransformationCssName = $cgpnTransformationCssName;
        }
        return $this;
    }
    /**
     * Get isCgpnPreTransformation value
     * @return string|null
     */
    public function getIsCgpnPreTransformation()
    {
        return $this->isCgpnPreTransformation;
    }
    /**
     * Set isCgpnPreTransformation value
     * @param string $isCgpnPreTransformation
     * @return XImeE164Transformation
     */
    public function setIsCgpnPreTransformation($isCgpnPreTransformation = false)
    {
        // validation for constraint: pattern
        if (is_scalar($isCgpnPreTransformation) && !preg_match('/(t)|(f)|(true)|(false)|(0)|(1)/', $isCgpnPreTransformation)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a scalar value that matches "(t)|(f)|(true)|(false)|(0)|(1)", "%s" given', var_export($isCgpnPreTransformation, true)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($isCgpnPreTransformation) && !is_string($isCgpnPreTransformation)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($isCgpnPreTransformation)), __LINE__);
        }
        $this->isCgpnPreTransformation = $isCgpnPreTransformation;
        return $this;
    }
    /**
     * Get cdpnTransformationCssName 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 XFkType|null
     */
    public function getCdpnTransformationCssName()
    {
        return isset($this->cdpnTransformationCssName) ? $this->cdpnTransformationCssName : null;
    }
    /**
     * Set cdpnTransformationCssName 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 XFkType $cdpnTransformationCssName
     * @return XImeE164Transformation
     */
    public function setCdpnTransformationCssName(XFkType $cdpnTransformationCssName = null)
    {
        if (is_null($cdpnTransformationCssName) || (is_array($cdpnTransformationCssName) && empty($cdpnTransformationCssName))) {
            unset($this->cdpnTransformationCssName);
        } else {
            $this->cdpnTransformationCssName = $cdpnTransformationCssName;
        }
        return $this;
    }
    /**
     * Get isCdpnPreTransformation value
     * @return string|null
     */
    public function getIsCdpnPreTransformation()
    {
        return $this->isCdpnPreTransformation;
    }
    /**
     * Set isCdpnPreTransformation value
     * @param string $isCdpnPreTransformation
     * @return XImeE164Transformation
     */
    public function setIsCdpnPreTransformation($isCdpnPreTransformation = false)
    {
        // validation for constraint: pattern
        if (is_scalar($isCdpnPreTransformation) && !preg_match('/(t)|(f)|(true)|(false)|(0)|(1)/', $isCdpnPreTransformation)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a scalar value that matches "(t)|(f)|(true)|(false)|(0)|(1)", "%s" given', var_export($isCdpnPreTransformation, true)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($isCdpnPreTransformation) && !is_string($isCdpnPreTransformation)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($isCdpnPreTransformation)), __LINE__);
        }
        $this->isCdpnPreTransformation = $isCdpnPreTransformation;
        return $this;
    }
    /**
     * Get incomingCgpnTransformationProfileName 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 XFkType|null
     */
    public function getIncomingCgpnTransformationProfileName()
    {
        return isset($this->incomingCgpnTransformationProfileName) ? $this->incomingCgpnTransformationProfileName : null;
    }
    /**
     * Set incomingCgpnTransformationProfileName 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 XFkType $incomingCgpnTransformationProfileName
     * @return XImeE164Transformation
     */
    public function setIncomingCgpnTransformationProfileName(XFkType $incomingCgpnTransformationProfileName = null)
    {
        if (is_null($incomingCgpnTransformationProfileName) || (is_array($incomingCgpnTransformationProfileName) && empty($incomingCgpnTransformationProfileName))) {
            unset($this->incomingCgpnTransformationProfileName);
        } else {
            $this->incomingCgpnTransformationProfileName = $incomingCgpnTransformationProfileName;
        }
        return $this;
    }
    /**
     * Get incomingCdpnTransformationProfileName 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 XFkType|null
     */
    public function getIncomingCdpnTransformationProfileName()
    {
        return isset($this->incomingCdpnTransformationProfileName) ? $this->incomingCdpnTransformationProfileName : null;
    }
    /**
     * Set incomingCdpnTransformationProfileName 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 XFkType $incomingCdpnTransformationProfileName
     * @return XImeE164Transformation
     */
    public function setIncomingCdpnTransformationProfileName(XFkType $incomingCdpnTransformationProfileName = null)
    {
        if (is_null($incomingCdpnTransformationProfileName) || (is_array($incomingCdpnTransformationProfileName) && empty($incomingCdpnTransformationProfileName))) {
            unset($this->incomingCdpnTransformationProfileName);
        } else {
            $this->incomingCdpnTransformationProfileName = $incomingCdpnTransformationProfileName;
        }
        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 XImeE164Transformation
     */
    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__;
    }
}
