<?php

namespace \Losc\CucmBundle\Model\Webservice\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for XDdi StructType
 * @subpackage Structs
 */
class XDdi extends AbstractStructBase
{
    /**
     * The name
     * Meta information extracted from the WSDL
     * - base: xsd:string
     * - maxLength: 50
     * - maxOccurs: 1
     * - minOccurs: 1
     * - nillable: false
     * @var string
     */
    public $name;
    /**
     * The dialPlanName
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * - nillable: false
     * @var \\Losc\CucmBundle\Model\Webservice\StructType\XFkType
     */
    public $dialPlanName;
    /**
     * The clause
     * Meta information extracted from the WSDL
     * - base: xsd:string
     * - maxLength: 1024
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $clause;
    /**
     * The members
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \\Losc\CucmBundle\Model\Webservice\StructType\Members
     */
    public $members;
    /**
     * Constructor method for XDdi
     * @uses XDdi::setName()
     * @uses XDdi::setDialPlanName()
     * @uses XDdi::setClause()
     * @uses XDdi::setMembers()
     * @param string $name
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\XFkType $dialPlanName
     * @param string $clause
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\Members $members
     */
    public function __construct($name = null, \\Losc\CucmBundle\Model\Webservice\StructType\XFkType $dialPlanName = null, $clause = null, \\Losc\CucmBundle\Model\Webservice\StructType\Members $members = null)
    {
        $this
            ->setName($name)
            ->setDialPlanName($dialPlanName)
            ->setClause($clause)
            ->setMembers($members);
    }
    /**
     * Get name value
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }
    /**
     * Set name value
     * @param string $name
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XDdi
     */
    public function setName($name = null)
    {
        $this->name = $name;
        return $this;
    }
    /**
     * Get dialPlanName value
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XFkType
     */
    public function getDialPlanName()
    {
        return $this->dialPlanName;
    }
    /**
     * Set dialPlanName value
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\XFkType $dialPlanName
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XDdi
     */
    public function setDialPlanName(\\Losc\CucmBundle\Model\Webservice\StructType\XFkType $dialPlanName = null)
    {
        $this->dialPlanName = $dialPlanName;
        return $this;
    }
    /**
     * Get clause 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 string|null
     */
    public function getClause()
    {
        return isset($this->clause) ? $this->clause : null;
    }
    /**
     * Set clause 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 string $clause
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XDdi
     */
    public function setClause($clause = null)
    {
        if (is_null($clause) || (is_array($clause) && empty($clause))) {
            unset($this->clause);
        } else {
            $this->clause = $clause;
        }
        return $this;
    }
    /**
     * Get members value
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\Members|null
     */
    public function getMembers()
    {
        return $this->members;
    }
    /**
     * Set members value
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\Members $members
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XDdi
     */
    public function setMembers(\\Losc\CucmBundle\Model\Webservice\StructType\Members $members = null)
    {
        $this->members = $members;
        return $this;
    }
}
