<?php

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

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for XAssignedPresenceUsers StructType
 * @subpackage Structs
 */
class XAssignedPresenceUsers extends AbstractStructBase
{
    /**
     * The userid
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: false
     * @var string
     */
    public $userid;
    /**
     * The server
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: true
     * @var \\Losc\CucmBundle\Model\Webservice\StructType\XFkType
     */
    public $server;
    /**
     * The presenceRedundancyGroup
     * Meta information extracted from the WSDL
     * - base: xsd:string
     * - maxLength: 255
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: false
     * @var string
     */
    public $presenceRedundancyGroup;
    /**
     * Constructor method for XAssignedPresenceUsers
     * @uses XAssignedPresenceUsers::setUserid()
     * @uses XAssignedPresenceUsers::setServer()
     * @uses XAssignedPresenceUsers::setPresenceRedundancyGroup()
     * @param string $userid
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\XFkType $server
     * @param string $presenceRedundancyGroup
     */
    public function __construct($userid = null, \\Losc\CucmBundle\Model\Webservice\StructType\XFkType $server = null, $presenceRedundancyGroup = null)
    {
        $this
            ->setUserid($userid)
            ->setServer($server)
            ->setPresenceRedundancyGroup($presenceRedundancyGroup);
    }
    /**
     * Get userid value
     * @return string|null
     */
    public function getUserid()
    {
        return $this->userid;
    }
    /**
     * Set userid value
     * @param string $userid
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XAssignedPresenceUsers
     */
    public function setUserid($userid = null)
    {
        $this->userid = $userid;
        return $this;
    }
    /**
     * Get server 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 getServer()
    {
        return isset($this->server) ? $this->server : null;
    }
    /**
     * Set server 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 $server
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XAssignedPresenceUsers
     */
    public function setServer(\\Losc\CucmBundle\Model\Webservice\StructType\XFkType $server = null)
    {
        if (is_null($server) || (is_array($server) && empty($server))) {
            unset($this->server);
        } else {
            $this->server = $server;
        }
        return $this;
    }
    /**
     * Get presenceRedundancyGroup value
     * @return string|null
     */
    public function getPresenceRedundancyGroup()
    {
        return $this->presenceRedundancyGroup;
    }
    /**
     * Set presenceRedundancyGroup value
     * @param string $presenceRedundancyGroup
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XAssignedPresenceUsers
     */
    public function setPresenceRedundancyGroup($presenceRedundancyGroup = null)
    {
        $this->presenceRedundancyGroup = $presenceRedundancyGroup;
        return $this;
    }
}
