<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for UpdateDriverPoiItem StructType
 * @subpackage Structs
 */
class UpdateDriverPoiItem extends AbstractStructBase
{
    /**
     * The UpdatePoiToDriverId
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var int
     */
    public $UpdatePoiToDriverId;
    /**
     * The Poi
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\PoiItem
     */
    public $Poi;
    /**
     * Constructor method for UpdateDriverPoiItem
     * @uses UpdateDriverPoiItem::setUpdatePoiToDriverId()
     * @uses UpdateDriverPoiItem::setPoi()
     * @param int $updatePoiToDriverId
     * @param \StructType\PoiItem $poi
     */
    public function __construct($updatePoiToDriverId = null, \StructType\PoiItem $poi = null)
    {
        $this
            ->setUpdatePoiToDriverId($updatePoiToDriverId)
            ->setPoi($poi);
    }
    /**
     * Get UpdatePoiToDriverId value
     * @return int
     */
    public function getUpdatePoiToDriverId()
    {
        return $this->UpdatePoiToDriverId;
    }
    /**
     * Set UpdatePoiToDriverId value
     * @param int $updatePoiToDriverId
     * @return \StructType\UpdateDriverPoiItem
     */
    public function setUpdatePoiToDriverId($updatePoiToDriverId = null)
    {
        // validation for constraint: int
        if (!is_null($updatePoiToDriverId) && !(is_int($updatePoiToDriverId) || ctype_digit($updatePoiToDriverId))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($updatePoiToDriverId, true), gettype($updatePoiToDriverId)), __LINE__);
        }
        $this->UpdatePoiToDriverId = $updatePoiToDriverId;
        return $this;
    }
    /**
     * Get Poi value
     * @return \StructType\PoiItem|null
     */
    public function getPoi()
    {
        return $this->Poi;
    }
    /**
     * Set Poi value
     * @param \StructType\PoiItem $poi
     * @return \StructType\UpdateDriverPoiItem
     */
    public function setPoi(\StructType\PoiItem $poi = null)
    {
        $this->Poi = $poi;
        return $this;
    }
}
