<?php

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

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for XPickupGroupMember StructType
 * @subpackage Structs
 */
class XPickupGroupMember extends AbstractStructBase
{
    /**
     * The priority
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var string
     */
    public $priority;
    /**
     * The pickupGroupName
     * Meta information extracted from the WSDL
     * - choice: pickupGroupName | pickupDnAndPartition
     * - choiceMaxOccurs: 1
     * - choiceMinOccurs: 1
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var \\Losc\CucmBundle\Model\Webservice\StructType\XFkType
     */
    public $pickupGroupName;
    /**
     * The pickupDnAndPartition
     * Meta information extracted from the WSDL
     * - choice: pickupGroupName | pickupDnAndPartition
     * - choiceMaxOccurs: 1
     * - choiceMinOccurs: 1
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var \\Losc\CucmBundle\Model\Webservice\StructType\PickupDnAndPartition
     */
    public $pickupDnAndPartition;
    /**
     * Constructor method for XPickupGroupMember
     * @uses XPickupGroupMember::setPriority()
     * @uses XPickupGroupMember::setPickupGroupName()
     * @uses XPickupGroupMember::setPickupDnAndPartition()
     * @param string $priority
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\XFkType $pickupGroupName
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\PickupDnAndPartition $pickupDnAndPartition
     */
    public function __construct($priority = null, \\Losc\CucmBundle\Model\Webservice\StructType\XFkType $pickupGroupName = null, \\Losc\CucmBundle\Model\Webservice\StructType\PickupDnAndPartition $pickupDnAndPartition = null)
    {
        $this
            ->setPriority($priority)
            ->setPickupGroupName($pickupGroupName)
            ->setPickupDnAndPartition($pickupDnAndPartition);
    }
    /**
     * Get priority value
     * @return string
     */
    public function getPriority()
    {
        return $this->priority;
    }
    /**
     * Set priority value
     * @param string $priority
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XPickupGroupMember
     */
    public function setPriority($priority = null)
    {
        $this->priority = $priority;
        return $this;
    }
    /**
     * Get pickupGroupName value
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XFkType
     */
    public function getPickupGroupName()
    {
        return isset($this->pickupGroupName) ? $this->pickupGroupName : null;
    }
    /**
     * Set pickupGroupName value
     * This property belongs to a choice that allows only one property to exist. It is
     * therefore removable from the request, consequently if the value assigned to this
     * property is null, the property is removed from this object
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\XFkType $pickupGroupName
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XPickupGroupMember
     */
    public function setPickupGroupName(\\Losc\CucmBundle\Model\Webservice\StructType\XFkType $pickupGroupName = null)
    {
        if (is_null($pickupGroupName) || (is_array($pickupGroupName) && empty($pickupGroupName))) {
            unset($this->pickupGroupName);
        } else {
            $this->pickupGroupName = $pickupGroupName;
        }
        return $this;
    }
    /**
     * Get pickupDnAndPartition value
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\PickupDnAndPartition
     */
    public function getPickupDnAndPartition()
    {
        return isset($this->pickupDnAndPartition) ? $this->pickupDnAndPartition : null;
    }
    /**
     * Set pickupDnAndPartition value
     * This property belongs to a choice that allows only one property to exist. It is
     * therefore removable from the request, consequently if the value assigned to this
     * property is null, the property is removed from this object
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\PickupDnAndPartition $pickupDnAndPartition
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XPickupGroupMember
     */
    public function setPickupDnAndPartition(\\Losc\CucmBundle\Model\Webservice\StructType\PickupDnAndPartition $pickupDnAndPartition = null)
    {
        if (is_null($pickupDnAndPartition) || (is_array($pickupDnAndPartition) && empty($pickupDnAndPartition))) {
            unset($this->pickupDnAndPartition);
        } else {
            $this->pickupDnAndPartition = $pickupDnAndPartition;
        }
        return $this;
    }
}
