<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Web_Conference_Interview_Data_Response_DataType StructType
 * Meta information extracted from the WSDL
 * - documentation: Contains interview data for the web conference.
 * @subpackage Structs
 */
class Web_Conference_Interview_Data_Response_DataType extends AbstractStructBase
{
    /**
     * The Web_Conference_Interview
     * Meta information extracted from the WSDL
     * - documentation: Contains interview data.
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\Web_Conference_InterviewType[]
     */
    public $Web_Conference_Interview;
    /**
     * Constructor method for Web_Conference_Interview_Data_Response_DataType
     * @uses Web_Conference_Interview_Data_Response_DataType::setWeb_Conference_Interview()
     * @param \StructType\Web_Conference_InterviewType[] $web_Conference_Interview
     */
    public function __construct(array $web_Conference_Interview = array())
    {
        $this
            ->setWeb_Conference_Interview($web_Conference_Interview);
    }
    /**
     * Get Web_Conference_Interview value
     * @return \StructType\Web_Conference_InterviewType[]|null
     */
    public function getWeb_Conference_Interview()
    {
        return $this->Web_Conference_Interview;
    }
    /**
     * This method is responsible for validating the values passed to the setWeb_Conference_Interview method
     * This method is willingly generated in order to preserve the one-line inline validation within the setWeb_Conference_Interview method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateWeb_Conference_InterviewForArrayConstraintsFromSetWeb_Conference_Interview(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $web_Conference_Interview_Data_Response_DataTypeWeb_Conference_InterviewItem) {
            // validation for constraint: itemType
            if (!$web_Conference_Interview_Data_Response_DataTypeWeb_Conference_InterviewItem instanceof \StructType\Web_Conference_InterviewType) {
                $invalidValues[] = is_object($web_Conference_Interview_Data_Response_DataTypeWeb_Conference_InterviewItem) ? get_class($web_Conference_Interview_Data_Response_DataTypeWeb_Conference_InterviewItem) : sprintf('%s(%s)', gettype($web_Conference_Interview_Data_Response_DataTypeWeb_Conference_InterviewItem), var_export($web_Conference_Interview_Data_Response_DataTypeWeb_Conference_InterviewItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The Web_Conference_Interview property can only contain items of type \StructType\Web_Conference_InterviewType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set Web_Conference_Interview value
     * @throws \InvalidArgumentException
     * @param \StructType\Web_Conference_InterviewType[] $web_Conference_Interview
     * @return \StructType\Web_Conference_Interview_Data_Response_DataType
     */
    public function setWeb_Conference_Interview(array $web_Conference_Interview = array())
    {
        // validation for constraint: array
        if ('' !== ($web_Conference_InterviewArrayErrorMessage = self::validateWeb_Conference_InterviewForArrayConstraintsFromSetWeb_Conference_Interview($web_Conference_Interview))) {
            throw new \InvalidArgumentException($web_Conference_InterviewArrayErrorMessage, __LINE__);
        }
        $this->Web_Conference_Interview = $web_Conference_Interview;
        return $this;
    }
    /**
     * Add item to Web_Conference_Interview value
     * @throws \InvalidArgumentException
     * @param \StructType\Web_Conference_InterviewType $item
     * @return \StructType\Web_Conference_Interview_Data_Response_DataType
     */
    public function addToWeb_Conference_Interview(\StructType\Web_Conference_InterviewType $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\Web_Conference_InterviewType) {
            throw new \InvalidArgumentException(sprintf('The Web_Conference_Interview property can only contain items of type \StructType\Web_Conference_InterviewType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->Web_Conference_Interview[] = $item;
        return $this;
    }
}
