<?php

namespace Easy\EasyStruct;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for InsertVoucherResponse EasyStruct
 * @package Easy
 * @subpackage Structs
 */
class EasyInsertVoucherResponse extends AbstractStructBase
{
    /**
     * The InsertVoucherResult
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \Easy\EasyStruct\EasyClsInsertVoucherResp
     */
    public $InsertVoucherResult;
    /**
     * Constructor method for InsertVoucherResponse
     * @uses EasyInsertVoucherResponse::setInsertVoucherResult()
     * @param \Easy\EasyStruct\EasyClsInsertVoucherResp $insertVoucherResult
     */
    public function __construct(\Easy\EasyStruct\EasyClsInsertVoucherResp $insertVoucherResult = null)
    {
        $this
            ->setInsertVoucherResult($insertVoucherResult);
    }
    /**
     * Get InsertVoucherResult 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\EasyClsInsertVoucherResp|null
     */
    public function getInsertVoucherResult()
    {
        return isset($this->InsertVoucherResult) ? $this->InsertVoucherResult : null;
    }
    /**
     * Set InsertVoucherResult 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\EasyClsInsertVoucherResp $insertVoucherResult
     * @return \Easy\EasyStruct\EasyInsertVoucherResponse
     */
    public function setInsertVoucherResult(\Easy\EasyStruct\EasyClsInsertVoucherResp $insertVoucherResult = null)
    {
        if (is_null($insertVoucherResult) || (is_array($insertVoucherResult) && empty($insertVoucherResult))) {
            unset($this->InsertVoucherResult);
        } else {
            $this->InsertVoucherResult = $insertVoucherResult;
        }
        return $this;
    }
}
