<?php

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

use \WsdlToPhp\PackageBase\AbstractStructBase;

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