<?php

namespace Easy\EasyStruct;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Upload_XL_FileResponse EasyStruct
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:Upload_XL_FileResponse
 * @package Easy
 * @subpackage Structs
 */
class EasyUpload_XL_FileResponse extends AbstractStructBase
{
    /**
     * The Upload_XL_FileResult
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \Easy\EasyStruct\EasyUpload_XL_FileResponse
     */
    public $Upload_XL_FileResult;
    /**
     * The Message
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $Message;
    /**
     * The Result
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $Result;
    /**
     * The ValidationErrors
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \Easy\EasyArray\EasyArrayOfstring
     */
    public $ValidationErrors;
    /**
     * Constructor method for Upload_XL_FileResponse
     * @uses EasyUpload_XL_FileResponse::setUpload_XL_FileResult()
     * @uses EasyUpload_XL_FileResponse::setMessage()
     * @uses EasyUpload_XL_FileResponse::setResult()
     * @uses EasyUpload_XL_FileResponse::setValidationErrors()
     * @param \Easy\EasyStruct\EasyUpload_XL_FileResponse $upload_XL_FileResult
     * @param string $message
     * @param bool $result
     * @param \Easy\EasyArray\EasyArrayOfstring $validationErrors
     */
    public function __construct(\Easy\EasyStruct\EasyUpload_XL_FileResponse $upload_XL_FileResult = null, $message = null, $result = null, \Easy\EasyArray\EasyArrayOfstring $validationErrors = null)
    {
        $this
            ->setUpload_XL_FileResult($upload_XL_FileResult)
            ->setMessage($message)
            ->setResult($result)
            ->setValidationErrors($validationErrors);
    }
    /**
     * Get Upload_XL_FileResult 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 \Easy\EasyStruct\EasyUpload_XL_FileResponse|null
     */
    public function getUpload_XL_FileResult()
    {
        return isset($this->Upload_XL_FileResult) ? $this->Upload_XL_FileResult : null;
    }
    /**
     * Set Upload_XL_FileResult 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 \Easy\EasyStruct\EasyUpload_XL_FileResponse $upload_XL_FileResult
     * @return \Easy\EasyStruct\EasyUpload_XL_FileResponse
     */
    public function setUpload_XL_FileResult(\Easy\EasyStruct\EasyUpload_XL_FileResponse $upload_XL_FileResult = null)
    {
        if (is_null($upload_XL_FileResult) || (is_array($upload_XL_FileResult) && empty($upload_XL_FileResult))) {
            unset($this->Upload_XL_FileResult);
        } else {
            $this->Upload_XL_FileResult = $upload_XL_FileResult;
        }
        return $this;
    }
    /**
     * Get Message 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 string|null
     */
    public function getMessage()
    {
        return isset($this->Message) ? $this->Message : null;
    }
    /**
     * Set Message 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 string $message
     * @return \Easy\EasyStruct\EasyUpload_XL_FileResponse
     */
    public function setMessage($message = null)
    {
        // validation for constraint: string
        if (!is_null($message) && !is_string($message)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($message, true), gettype($message)), __LINE__);
        }
        if (is_null($message) || (is_array($message) && empty($message))) {
            unset($this->Message);
        } else {
            $this->Message = $message;
        }
        return $this;
    }
    /**
     * Get Result value
     * @return bool|null
     */
    public function getResult()
    {
        return $this->Result;
    }
    /**
     * Set Result value
     * @param bool $result
     * @return \Easy\EasyStruct\EasyUpload_XL_FileResponse
     */
    public function setResult($result = null)
    {
        // validation for constraint: boolean
        if (!is_null($result) && !is_bool($result)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($result, true), gettype($result)), __LINE__);
        }
        $this->Result = $result;
        return $this;
    }
    /**
     * Get ValidationErrors 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 \Easy\EasyArray\EasyArrayOfstring|null
     */
    public function getValidationErrors()
    {
        return isset($this->ValidationErrors) ? $this->ValidationErrors : null;
    }
    /**
     * Set ValidationErrors 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 \Easy\EasyArray\EasyArrayOfstring $validationErrors
     * @return \Easy\EasyStruct\EasyUpload_XL_FileResponse
     */
    public function setValidationErrors(\Easy\EasyArray\EasyArrayOfstring $validationErrors = null)
    {
        if (is_null($validationErrors) || (is_array($validationErrors) && empty($validationErrors))) {
            unset($this->ValidationErrors);
        } else {
            $this->ValidationErrors = $validationErrors;
        }
        return $this;
    }
}
