<?php

namespace Easy\EasyStruct;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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