<?php

namespace SelectSiparis;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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