<?php

namespace SelectSiparis;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for SaveEFaturaRequest StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:SaveEFaturaRequest
 * @subpackage Structs
 */
class SaveEFaturaRequest extends AbstractStructBase
{
    /**
     * The EFatura
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \SelectSiparis\SaveEFatura
     */
    public $EFatura;
    /**
     * The SiparisFaturaNoGuncelle
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $SiparisFaturaNoGuncelle;
    /**
     * Constructor method for SaveEFaturaRequest
     * @uses SaveEFaturaRequest::setEFatura()
     * @uses SaveEFaturaRequest::setSiparisFaturaNoGuncelle()
     * @param \SelectSiparis\SaveEFatura $eFatura
     * @param bool $siparisFaturaNoGuncelle
     */
    public function __construct(\SelectSiparis\SaveEFatura $eFatura = null, $siparisFaturaNoGuncelle = null)
    {
        $this
            ->setEFatura($eFatura)
            ->setSiparisFaturaNoGuncelle($siparisFaturaNoGuncelle);
    }
    /**
     * Get EFatura 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 \SelectSiparis\SaveEFatura|null
     */
    public function getEFatura()
    {
        return isset($this->EFatura) ? $this->EFatura : null;
    }
    /**
     * Set EFatura 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 \SelectSiparis\SaveEFatura $eFatura
     * @return \SelectSiparis\SaveEFaturaRequest
     */
    public function setEFatura(\SelectSiparis\SaveEFatura $eFatura = null)
    {
        if (is_null($eFatura) || (is_array($eFatura) && empty($eFatura))) {
            unset($this->EFatura);
        } else {
            $this->EFatura = $eFatura;
        }
        return $this;
    }
    /**
     * Get SiparisFaturaNoGuncelle value
     * @return bool|null
     */
    public function getSiparisFaturaNoGuncelle()
    {
        return $this->SiparisFaturaNoGuncelle;
    }
    /**
     * Set SiparisFaturaNoGuncelle value
     * @param bool $siparisFaturaNoGuncelle
     * @return \SelectSiparis\SaveEFaturaRequest
     */
    public function setSiparisFaturaNoGuncelle($siparisFaturaNoGuncelle = null)
    {
        // validation for constraint: boolean
        if (!is_null($siparisFaturaNoGuncelle) && !is_bool($siparisFaturaNoGuncelle)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($siparisFaturaNoGuncelle, true), gettype($siparisFaturaNoGuncelle)), __LINE__);
        }
        $this->SiparisFaturaNoGuncelle = $siparisFaturaNoGuncelle;
        return $this;
    }
}
