<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for InsertDispatcherResult StructType
 * @subpackage Structs
 */
class InsertDispatcherResult extends ExecutionResult
{
    /**
     * The ID
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $ID;
    /**
     * The PersonalCommunication
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \ArrayType\ArrayOfPersonalCommunication
     */
    public $PersonalCommunication;
    /**
     * Constructor method for InsertDispatcherResult
     * @uses InsertDispatcherResult::setID()
     * @uses InsertDispatcherResult::setPersonalCommunication()
     * @param string $iD
     * @param \ArrayType\ArrayOfPersonalCommunication $personalCommunication
     */
    public function __construct($iD = null, \ArrayType\ArrayOfPersonalCommunication $personalCommunication = null)
    {
        $this
            ->setID($iD)
            ->setPersonalCommunication($personalCommunication);
    }
    /**
     * Get ID value
     * @return string|null
     */
    public function getID()
    {
        return $this->ID;
    }
    /**
     * Set ID value
     * @param string $iD
     * @return \StructType\InsertDispatcherResult
     */
    public function setID($iD = null)
    {
        // validation for constraint: string
        if (!is_null($iD) && !is_string($iD)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($iD, true), gettype($iD)), __LINE__);
        }
        $this->ID = $iD;
        return $this;
    }
    /**
     * Get PersonalCommunication value
     * @return \ArrayType\ArrayOfPersonalCommunication|null
     */
    public function getPersonalCommunication()
    {
        return $this->PersonalCommunication;
    }
    /**
     * Set PersonalCommunication value
     * @param \ArrayType\ArrayOfPersonalCommunication $personalCommunication
     * @return \StructType\InsertDispatcherResult
     */
    public function setPersonalCommunication(\ArrayType\ArrayOfPersonalCommunication $personalCommunication = null)
    {
        $this->PersonalCommunication = $personalCommunication;
        return $this;
    }
}
