<?php

namespace Easy\EasyStruct;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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