<?php

namespace CustomerManagement\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for WsPointAccessDeviceId StructType
 * @subpackage Structs
 */
class WsPointAccessDeviceId extends AbstractStructBase
{
    /**
     * The unitId
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var int
     */
    public $unitId;
    /**
     * The deviceId
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var int
     */
    public $deviceId;
    /**
     * Constructor method for WsPointAccessDeviceId
     * @uses WsPointAccessDeviceId::setUnitId()
     * @uses WsPointAccessDeviceId::setDeviceId()
     * @param int $unitId
     * @param int $deviceId
     */
    public function __construct($unitId = null, $deviceId = null)
    {
        $this
            ->setUnitId($unitId)
            ->setDeviceId($deviceId);
    }
    /**
     * Get unitId value
     * @return int
     */
    public function getUnitId()
    {
        return $this->unitId;
    }
    /**
     * Set unitId value
     * @param int $unitId
     * @return \CustomerManagement\StructType\WsPointAccessDeviceId
     */
    public function setUnitId($unitId = null)
    {
        // validation for constraint: int
        if (!is_null($unitId) && !(is_int($unitId) || ctype_digit($unitId))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($unitId, true), gettype($unitId)), __LINE__);
        }
        $this->unitId = $unitId;
        return $this;
    }
    /**
     * Get deviceId value
     * @return int
     */
    public function getDeviceId()
    {
        return $this->deviceId;
    }
    /**
     * Set deviceId value
     * @param int $deviceId
     * @return \CustomerManagement\StructType\WsPointAccessDeviceId
     */
    public function setDeviceId($deviceId = null)
    {
        // validation for constraint: int
        if (!is_null($deviceId) && !(is_int($deviceId) || ctype_digit($deviceId))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($deviceId, true), gettype($deviceId)), __LINE__);
        }
        $this->deviceId = $deviceId;
        return $this;
    }
}
