<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Put_OCR_Supplier_Invoice_RequestType StructType
 * Meta information extracted from the WSDL
 * - documentation: Element containing all OCR Supplier Invoice data required to create a complete OCR Supplier Invoice
 * @subpackage Structs
 */
class Put_OCR_Supplier_Invoice_RequestType extends AbstractStructBase
{
    /**
     * The OCR_Supplier_Invoice_Data
     * Meta information extracted from the WSDL
     * - documentation: OCR Supplier Invoice Data
     * - minOccurs: 0
     * @var \StructType\OCR_Supplier_Invoice_DataType
     */
    public $OCR_Supplier_Invoice_Data;
    /**
     * The version
     * Meta information extracted from the WSDL
     * - ref: wd:version
     * @var string
     */
    public $version;
    /**
     * Constructor method for Put_OCR_Supplier_Invoice_RequestType
     * @uses Put_OCR_Supplier_Invoice_RequestType::setOCR_Supplier_Invoice_Data()
     * @uses Put_OCR_Supplier_Invoice_RequestType::setVersion()
     * @param \StructType\OCR_Supplier_Invoice_DataType $oCR_Supplier_Invoice_Data
     * @param string $version
     */
    public function __construct(\StructType\OCR_Supplier_Invoice_DataType $oCR_Supplier_Invoice_Data = null, $version = null)
    {
        $this
            ->setOCR_Supplier_Invoice_Data($oCR_Supplier_Invoice_Data)
            ->setVersion($version);
    }
    /**
     * Get OCR_Supplier_Invoice_Data value
     * @return \StructType\OCR_Supplier_Invoice_DataType|null
     */
    public function getOCR_Supplier_Invoice_Data()
    {
        return $this->OCR_Supplier_Invoice_Data;
    }
    /**
     * Set OCR_Supplier_Invoice_Data value
     * @param \StructType\OCR_Supplier_Invoice_DataType $oCR_Supplier_Invoice_Data
     * @return \StructType\Put_OCR_Supplier_Invoice_RequestType
     */
    public function setOCR_Supplier_Invoice_Data(\StructType\OCR_Supplier_Invoice_DataType $oCR_Supplier_Invoice_Data = null)
    {
        $this->OCR_Supplier_Invoice_Data = $oCR_Supplier_Invoice_Data;
        return $this;
    }
    /**
     * Get version value
     * @return string|null
     */
    public function getVersion()
    {
        return $this->version;
    }
    /**
     * Set version value
     * @param string $version
     * @return \StructType\Put_OCR_Supplier_Invoice_RequestType
     */
    public function setVersion($version = null)
    {
        // validation for constraint: string
        if (!is_null($version) && !is_string($version)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($version, true), gettype($version)), __LINE__);
        }
        $this->version = $version;
        return $this;
    }
}
