<?php

namespace SelectSiparis;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for UrunIadeNeden StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:UrunIadeNeden
 * @subpackage Structs
 */
class UrunIadeNeden extends AbstractStructBase
{
    /**
     * The Aktif
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $Aktif;
    /**
     * The ID
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var int
     */
    public $ID;
    /**
     * The Islem
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var int
     */
    public $Islem;
    /**
     * The Tanim
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $Tanim;
    /**
     * Constructor method for UrunIadeNeden
     * @uses UrunIadeNeden::setAktif()
     * @uses UrunIadeNeden::setID()
     * @uses UrunIadeNeden::setIslem()
     * @uses UrunIadeNeden::setTanim()
     * @param bool $aktif
     * @param int $iD
     * @param int $islem
     * @param string $tanim
     */
    public function __construct($aktif = null, $iD = null, $islem = null, $tanim = null)
    {
        $this
            ->setAktif($aktif)
            ->setID($iD)
            ->setIslem($islem)
            ->setTanim($tanim);
    }
    /**
     * Get Aktif value
     * @return bool|null
     */
    public function getAktif()
    {
        return $this->Aktif;
    }
    /**
     * Set Aktif value
     * @param bool $aktif
     * @return \SelectSiparis\UrunIadeNeden
     */
    public function setAktif($aktif = null)
    {
        // validation for constraint: boolean
        if (!is_null($aktif) && !is_bool($aktif)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($aktif, true), gettype($aktif)), __LINE__);
        }
        $this->Aktif = $aktif;
        return $this;
    }
    /**
     * Get ID value
     * @return int|null
     */
    public function getID()
    {
        return $this->ID;
    }
    /**
     * Set ID value
     * @param int $iD
     * @return \SelectSiparis\UrunIadeNeden
     */
    public function setID($iD = null)
    {
        // validation for constraint: int
        if (!is_null($iD) && !(is_int($iD) || ctype_digit($iD))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($iD, true), gettype($iD)), __LINE__);
        }
        $this->ID = $iD;
        return $this;
    }
    /**
     * Get Islem value
     * @return int|null
     */
    public function getIslem()
    {
        return $this->Islem;
    }
    /**
     * Set Islem value
     * @param int $islem
     * @return \SelectSiparis\UrunIadeNeden
     */
    public function setIslem($islem = null)
    {
        // validation for constraint: int
        if (!is_null($islem) && !(is_int($islem) || ctype_digit($islem))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($islem, true), gettype($islem)), __LINE__);
        }
        $this->Islem = $islem;
        return $this;
    }
    /**
     * Get Tanim 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 getTanim()
    {
        return isset($this->Tanim) ? $this->Tanim : null;
    }
    /**
     * Set Tanim 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 $tanim
     * @return \SelectSiparis\UrunIadeNeden
     */
    public function setTanim($tanim = null)
    {
        // validation for constraint: string
        if (!is_null($tanim) && !is_string($tanim)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($tanim, true), gettype($tanim)), __LINE__);
        }
        if (is_null($tanim) || (is_array($tanim) && empty($tanim))) {
            unset($this->Tanim);
        } else {
            $this->Tanim = $tanim;
        }
        return $this;
    }
}
