<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GenerateBarcodesAsync-Response StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:GenerateBarcodesAsync-Response
 * @subpackage Structs
 */
class GenerateBarcodesAsync_Response extends ExtensibleDataContract
{
    /**
     * The Errors
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\ArrayType\ArrayOfGenerateBarcodeError
     */
    public $Errors;
    /**
     * Constructor method for GenerateBarcodesAsync-Response
     * @uses GenerateBarcodesAsync_Response::setErrors()
     * @param \patest\ArrayType\ArrayOfGenerateBarcodeError $errors
     */
    public function __construct(\patest\ArrayType\ArrayOfGenerateBarcodeError $errors = null)
    {
        $this
            ->setErrors($errors);
    }
    /**
     * Get Errors value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return \patest\ArrayType\ArrayOfGenerateBarcodeError|null
     */
    public function getErrors()
    {
        return isset($this->Errors) ? $this->Errors : null;
    }
    /**
     * Set Errors value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param \patest\ArrayType\ArrayOfGenerateBarcodeError $errors
     * @return \patest\StructType\GenerateBarcodesAsync_Response
     */
    public function setErrors(\patest\ArrayType\ArrayOfGenerateBarcodeError $errors = null)
    {
        if (is_null($errors) || (is_array($errors) && empty($errors))) {
            unset($this->Errors);
        } else {
            $this->Errors = $errors;
        }
        return $this;
    }
}
