<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for CurrentActivityResult StructType
 * @subpackage Structs
 */
class CurrentActivityResult extends AbstractStructBase
{
    /**
     * The ID
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * - nillable: true
     * @var int
     */
    public $ID;
    /**
     * The LastDateTime
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * - nillable: true
     * @var string
     */
    public $LastDateTime;
    /**
     * The Name
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $Name;
    /**
     * Constructor method for CurrentActivityResult
     * @uses CurrentActivityResult::setID()
     * @uses CurrentActivityResult::setLastDateTime()
     * @uses CurrentActivityResult::setName()
     * @param int $iD
     * @param string $lastDateTime
     * @param string $name
     */
    public function __construct($iD = null, $lastDateTime = null, $name = null)
    {
        $this
            ->setID($iD)
            ->setLastDateTime($lastDateTime)
            ->setName($name);
    }
    /**
     * Get ID value
     * @return int
     */
    public function getID()
    {
        return $this->ID;
    }
    /**
     * Set ID value
     * @param int $iD
     * @return \StructType\CurrentActivityResult
     */
    public function setID($iD = null)
    {
        // validation for constraint: int
        if (!is_null($iD) && !(is_int($iD) || ctype_digit($iD))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($iD, true), gettype($iD)), __LINE__);
        }
        $this->ID = $iD;
        return $this;
    }
    /**
     * Get LastDateTime value
     * @return string
     */
    public function getLastDateTime()
    {
        return $this->LastDateTime;
    }
    /**
     * Set LastDateTime value
     * @param string $lastDateTime
     * @return \StructType\CurrentActivityResult
     */
    public function setLastDateTime($lastDateTime = null)
    {
        // validation for constraint: string
        if (!is_null($lastDateTime) && !is_string($lastDateTime)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($lastDateTime, true), gettype($lastDateTime)), __LINE__);
        }
        $this->LastDateTime = $lastDateTime;
        return $this;
    }
    /**
     * Get Name value
     * @return string|null
     */
    public function getName()
    {
        return $this->Name;
    }
    /**
     * Set Name value
     * @param string $name
     * @return \StructType\CurrentActivityResult
     */
    public function setName($name = null)
    {
        // validation for constraint: string
        if (!is_null($name) && !is_string($name)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($name, true), gettype($name)), __LINE__);
        }
        $this->Name = $name;
        return $this;
    }
}
