<?php

namespace Easy\EasyStruct;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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