<?php

namespace SelectSiparis;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for SaveSiparis StructType
 * @subpackage Structs
 */
class SaveSiparis extends AbstractStructBase
{
    /**
     * The UyeKodu
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $UyeKodu;
    /**
     * The siparis
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \SelectSiparis\WebSiparisSaveRequest
     */
    public $siparis;
    /**
     * Constructor method for SaveSiparis
     * @uses SaveSiparis::setUyeKodu()
     * @uses SaveSiparis::setSiparis()
     * @param string $uyeKodu
     * @param \SelectSiparis\WebSiparisSaveRequest $siparis
     */
    public function __construct($uyeKodu = null, \SelectSiparis\WebSiparisSaveRequest $siparis = null)
    {
        $this
            ->setUyeKodu($uyeKodu)
            ->setSiparis($siparis);
    }
    /**
     * Get UyeKodu 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 string|null
     */
    public function getUyeKodu()
    {
        return isset($this->UyeKodu) ? $this->UyeKodu : null;
    }
    /**
     * Set UyeKodu 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 string $uyeKodu
     * @return \SelectSiparis\SaveSiparis
     */
    public function setUyeKodu($uyeKodu = null)
    {
        // validation for constraint: string
        if (!is_null($uyeKodu) && !is_string($uyeKodu)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($uyeKodu, true), gettype($uyeKodu)), __LINE__);
        }
        if (is_null($uyeKodu) || (is_array($uyeKodu) && empty($uyeKodu))) {
            unset($this->UyeKodu);
        } else {
            $this->UyeKodu = $uyeKodu;
        }
        return $this;
    }
    /**
     * Get siparis 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\WebSiparisSaveRequest|null
     */
    public function getSiparis()
    {
        return isset($this->siparis) ? $this->siparis : null;
    }
    /**
     * Set siparis 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\WebSiparisSaveRequest $siparis
     * @return \SelectSiparis\SaveSiparis
     */
    public function setSiparis(\SelectSiparis\WebSiparisSaveRequest $siparis = null)
    {
        if (is_null($siparis) || (is_array($siparis) && empty($siparis))) {
            unset($this->siparis);
        } else {
            $this->siparis = $siparis;
        }
        return $this;
    }
}
