<?php

namespace Easy\EasyStruct;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for ClsInsertVoucherResp EasyStruct
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:ClsInsertVoucherResp
 * @package Easy
 * @subpackage Structs
 */
class EasyClsInsertVoucherResp extends AbstractStructBase
{
    /**
     * The Document
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $Document;
    /**
     * The Messages
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \Easy\EasyArray\EasyArrayOfstring
     */
    public $Messages;
    /**
     * The Result
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $Result;
    /**
     * The ReturnShipmentNumber
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var float
     */
    public $ReturnShipmentNumber;
    /**
     * The ShipmentNumber
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var float
     */
    public $ShipmentNumber;
    /**
     * The Vouchers
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \Easy\EasyArray\EasyArrayOfClsInsertVoucherResp
     */
    public $Vouchers;
    /**
     * Constructor method for ClsInsertVoucherResp
     * @uses EasyClsInsertVoucherResp::setDocument()
     * @uses EasyClsInsertVoucherResp::setMessages()
     * @uses EasyClsInsertVoucherResp::setResult()
     * @uses EasyClsInsertVoucherResp::setReturnShipmentNumber()
     * @uses EasyClsInsertVoucherResp::setShipmentNumber()
     * @uses EasyClsInsertVoucherResp::setVouchers()
     * @param string $document
     * @param \Easy\EasyArray\EasyArrayOfstring $messages
     * @param bool $result
     * @param float $returnShipmentNumber
     * @param float $shipmentNumber
     * @param \Easy\EasyArray\EasyArrayOfClsInsertVoucherResp $vouchers
     */
    public function __construct($document = null, \Easy\EasyArray\EasyArrayOfstring $messages = null, $result = null, $returnShipmentNumber = null, $shipmentNumber = null, \Easy\EasyArray\EasyArrayOfClsInsertVoucherResp $vouchers = null)
    {
        $this
            ->setDocument($document)
            ->setMessages($messages)
            ->setResult($result)
            ->setReturnShipmentNumber($returnShipmentNumber)
            ->setShipmentNumber($shipmentNumber)
            ->setVouchers($vouchers);
    }
    /**
     * Get Document 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 getDocument()
    {
        return isset($this->Document) ? $this->Document : null;
    }
    /**
     * Set Document 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 $document
     * @return \Easy\EasyStruct\EasyClsInsertVoucherResp
     */
    public function setDocument($document = null)
    {
        // validation for constraint: string
        if (!is_null($document) && !is_string($document)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($document, true), gettype($document)), __LINE__);
        }
        if (is_null($document) || (is_array($document) && empty($document))) {
            unset($this->Document);
        } else {
            $this->Document = $document;
        }
        return $this;
    }
    /**
     * Get Messages 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 getMessages()
    {
        return isset($this->Messages) ? $this->Messages : null;
    }
    /**
     * Set Messages 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 $messages
     * @return \Easy\EasyStruct\EasyClsInsertVoucherResp
     */
    public function setMessages(\Easy\EasyArray\EasyArrayOfstring $messages = null)
    {
        if (is_null($messages) || (is_array($messages) && empty($messages))) {
            unset($this->Messages);
        } else {
            $this->Messages = $messages;
        }
        return $this;
    }
    /**
     * Get Result value
     * @return bool|null
     */
    public function getResult()
    {
        return $this->Result;
    }
    /**
     * Set Result value
     * @param bool $result
     * @return \Easy\EasyStruct\EasyClsInsertVoucherResp
     */
    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 ReturnShipmentNumber value
     * @return float|null
     */
    public function getReturnShipmentNumber()
    {
        return $this->ReturnShipmentNumber;
    }
    /**
     * Set ReturnShipmentNumber value
     * @param float $returnShipmentNumber
     * @return \Easy\EasyStruct\EasyClsInsertVoucherResp
     */
    public function setReturnShipmentNumber($returnShipmentNumber = null)
    {
        // validation for constraint: float
        if (!is_null($returnShipmentNumber) && !(is_float($returnShipmentNumber) || is_numeric($returnShipmentNumber))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a float value, %s given', var_export($returnShipmentNumber, true), gettype($returnShipmentNumber)), __LINE__);
        }
        $this->ReturnShipmentNumber = $returnShipmentNumber;
        return $this;
    }
    /**
     * Get ShipmentNumber value
     * @return float|null
     */
    public function getShipmentNumber()
    {
        return $this->ShipmentNumber;
    }
    /**
     * Set ShipmentNumber value
     * @param float $shipmentNumber
     * @return \Easy\EasyStruct\EasyClsInsertVoucherResp
     */
    public function setShipmentNumber($shipmentNumber = null)
    {
        // validation for constraint: float
        if (!is_null($shipmentNumber) && !(is_float($shipmentNumber) || is_numeric($shipmentNumber))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a float value, %s given', var_export($shipmentNumber, true), gettype($shipmentNumber)), __LINE__);
        }
        $this->ShipmentNumber = $shipmentNumber;
        return $this;
    }
    /**
     * Get Vouchers 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\EasyArrayOfClsInsertVoucherResp|null
     */
    public function getVouchers()
    {
        return isset($this->Vouchers) ? $this->Vouchers : null;
    }
    /**
     * Set Vouchers 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\EasyArrayOfClsInsertVoucherResp $vouchers
     * @return \Easy\EasyStruct\EasyClsInsertVoucherResp
     */
    public function setVouchers(\Easy\EasyArray\EasyArrayOfClsInsertVoucherResp $vouchers = null)
    {
        if (is_null($vouchers) || (is_array($vouchers) && empty($vouchers))) {
            unset($this->Vouchers);
        } else {
            $this->Vouchers = $vouchers;
        }
        return $this;
    }
}
