<?php

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

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for XPresenceRedundancyGroup StructType
 * @subpackage Structs
 */
class XPresenceRedundancyGroup extends AbstractStructBase
{
    /**
     * The name
     * Meta information extracted from the WSDL
     * - base: xsd:string
     * - maxLength: 255
     * - maxOccurs: 1
     * - minOccurs: 1
     * - nillable: false
     * @var string
     */
    public $name;
    /**
     * The server1
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * - nillable: true
     * @var \\Losc\CucmBundle\Model\Webservice\StructType\XFkType
     */
    public $server1;
    /**
     * The description
     * Meta information extracted from the WSDL
     * - base: xsd:string
     * - maxLength: 255
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: false
     * @var string
     */
    public $description;
    /**
     * The server2
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: true
     * @var \\Losc\CucmBundle\Model\Webservice\StructType\XFkType
     */
    public $server2;
    /**
     * The haEnabled
     * Meta information extracted from the WSDL
     * - base: xsd:string
     * - default: false
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: false
     * - pattern: (t)|(f)|(true)|(false)|(0)|(1)
     * @var string
     */
    public $haEnabled;
    /**
     * Constructor method for XPresenceRedundancyGroup
     * @uses XPresenceRedundancyGroup::setName()
     * @uses XPresenceRedundancyGroup::setServer1()
     * @uses XPresenceRedundancyGroup::setDescription()
     * @uses XPresenceRedundancyGroup::setServer2()
     * @uses XPresenceRedundancyGroup::setHaEnabled()
     * @param string $name
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\XFkType $server1
     * @param string $description
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\XFkType $server2
     * @param string $haEnabled
     */
    public function __construct($name = null, \\Losc\CucmBundle\Model\Webservice\StructType\XFkType $server1 = null, $description = null, \\Losc\CucmBundle\Model\Webservice\StructType\XFkType $server2 = null, $haEnabled = 'false')
    {
        $this
            ->setName($name)
            ->setServer1($server1)
            ->setDescription($description)
            ->setServer2($server2)
            ->setHaEnabled($haEnabled);
    }
    /**
     * Get name value
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }
    /**
     * Set name value
     * @param string $name
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XPresenceRedundancyGroup
     */
    public function setName($name = null)
    {
        $this->name = $name;
        return $this;
    }
    /**
     * Get server1 value
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XFkType
     */
    public function getServer1()
    {
        return $this->server1;
    }
    /**
     * Set server1 value
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\XFkType $server1
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XPresenceRedundancyGroup
     */
    public function setServer1(\\Losc\CucmBundle\Model\Webservice\StructType\XFkType $server1 = null)
    {
        $this->server1 = $server1;
        return $this;
    }
    /**
     * Get description value
     * @return string|null
     */
    public function getDescription()
    {
        return $this->description;
    }
    /**
     * Set description value
     * @param string $description
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XPresenceRedundancyGroup
     */
    public function setDescription($description = null)
    {
        $this->description = $description;
        return $this;
    }
    /**
     * Get server2 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 \\Losc\CucmBundle\Model\Webservice\StructType\XFkType|null
     */
    public function getServer2()
    {
        return isset($this->server2) ? $this->server2 : null;
    }
    /**
     * Set server2 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 \\Losc\CucmBundle\Model\Webservice\StructType\XFkType $server2
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XPresenceRedundancyGroup
     */
    public function setServer2(\\Losc\CucmBundle\Model\Webservice\StructType\XFkType $server2 = null)
    {
        if (is_null($server2) || (is_array($server2) && empty($server2))) {
            unset($this->server2);
        } else {
            $this->server2 = $server2;
        }
        return $this;
    }
    /**
     * Get haEnabled value
     * @return string|null
     */
    public function getHaEnabled()
    {
        return $this->haEnabled;
    }
    /**
     * Set haEnabled value
     * @param string $haEnabled
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XPresenceRedundancyGroup
     */
    public function setHaEnabled($haEnabled = 'false')
    {
        $this->haEnabled = $haEnabled;
        return $this;
    }
}
