<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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