<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for PushedMessages StructType
 * @subpackage Structs
 */
class PushedMessages extends ExecutionResult
{
    /**
     * The NextStartDate
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * - nillable: true
     * @var string
     */
    public $NextStartDate;
    /**
     * The Messages
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \ArrayType\ArrayOfMessage
     */
    public $Messages;
    /**
     * Constructor method for PushedMessages
     * @uses PushedMessages::setNextStartDate()
     * @uses PushedMessages::setMessages()
     * @param string $nextStartDate
     * @param \ArrayType\ArrayOfMessage $messages
     */
    public function __construct($nextStartDate = null, \ArrayType\ArrayOfMessage $messages = null)
    {
        $this
            ->setNextStartDate($nextStartDate)
            ->setMessages($messages);
    }
    /**
     * Get NextStartDate value
     * @return string
     */
    public function getNextStartDate()
    {
        return $this->NextStartDate;
    }
    /**
     * Set NextStartDate value
     * @param string $nextStartDate
     * @return \StructType\PushedMessages
     */
    public function setNextStartDate($nextStartDate = null)
    {
        // validation for constraint: string
        if (!is_null($nextStartDate) && !is_string($nextStartDate)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($nextStartDate, true), gettype($nextStartDate)), __LINE__);
        }
        $this->NextStartDate = $nextStartDate;
        return $this;
    }
    /**
     * Get Messages value
     * @return \ArrayType\ArrayOfMessage|null
     */
    public function getMessages()
    {
        return $this->Messages;
    }
    /**
     * Set Messages value
     * @param \ArrayType\ArrayOfMessage $messages
     * @return \StructType\PushedMessages
     */
    public function setMessages(\ArrayType\ArrayOfMessage $messages = null)
    {
        $this->Messages = $messages;
        return $this;
    }
}
