<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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