<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for UnregisterFCMToken_Request StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:UnregisterFCMToken_Request
 * @subpackage Structs
 */
class UnregisterFCMToken_Request extends AbstractStructBase
{
    /**
     * The Device
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var DeviceModel
     */
    public $Device;
    /**
     * Constructor method for UnregisterFCMToken_Request
     * @uses UnregisterFCMToken_Request::setDevice()
     * @param DeviceModel $device
     */
    public function __construct(DeviceModel $device = null)
    {
        $this
            ->setDevice($device);
    }
    /**
     * Get Device 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 DeviceModel|null
     */
    public function getDevice()
    {
        return isset($this->Device) ? $this->Device : null;
    }
    /**
     * Set Device 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 DeviceModel $device
     * @return UnregisterFCMToken_Request
     */
    public function setDevice(DeviceModel $device = null)
    {
        if (is_null($device) || (is_array($device) && empty($device))) {
            unset($this->Device);
        } else {
            $this->Device = $device;
        }
        return $this;
    }
}
