<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Merchandise.MerchandiseBase StructType
 * @subpackage Structs
 */
class Merchandise_MerchandiseBase extends Merchandise_Base
{
    /**
     * The Comments
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $Comments;
    /**
     * The CreatedByAuditId
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $CreatedByAuditId;
    /**
     * The CreatedOn
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $CreatedOn;
    /**
     * The LastUpdatedByAuditId
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $LastUpdatedByAuditId;
    /**
     * The LastUpdatedOn
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $LastUpdatedOn;
    /**
     * The SystemName
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $SystemName;
    /**
     * Constructor method for Merchandise.MerchandiseBase
     * @uses Merchandise_MerchandiseBase::setComments()
     * @uses Merchandise_MerchandiseBase::setCreatedByAuditId()
     * @uses Merchandise_MerchandiseBase::setCreatedOn()
     * @uses Merchandise_MerchandiseBase::setLastUpdatedByAuditId()
     * @uses Merchandise_MerchandiseBase::setLastUpdatedOn()
     * @uses Merchandise_MerchandiseBase::setSystemName()
     * @param string $comments
     * @param int $createdByAuditId
     * @param string $createdOn
     * @param int $lastUpdatedByAuditId
     * @param string $lastUpdatedOn
     * @param string $systemName
     */
    public function __construct($comments = null, $createdByAuditId = null, $createdOn = null, $lastUpdatedByAuditId = null, $lastUpdatedOn = null, $systemName = null)
    {
        $this
            ->setComments($comments)
            ->setCreatedByAuditId($createdByAuditId)
            ->setCreatedOn($createdOn)
            ->setLastUpdatedByAuditId($lastUpdatedByAuditId)
            ->setLastUpdatedOn($lastUpdatedOn)
            ->setSystemName($systemName);
    }
    /**
     * Get Comments 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 getComments()
    {
        return isset($this->Comments) ? $this->Comments : null;
    }
    /**
     * Set Comments 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 $comments
     * @return \patest\StructType\Merchandise_MerchandiseBase
     */
    public function setComments($comments = null)
    {
        // validation for constraint: string
        if (!is_null($comments) && !is_string($comments)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($comments, true), gettype($comments)), __LINE__);
        }
        if (is_null($comments) || (is_array($comments) && empty($comments))) {
            unset($this->Comments);
        } else {
            $this->Comments = $comments;
        }
        return $this;
    }
    /**
     * Get CreatedByAuditId 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 int|null
     */
    public function getCreatedByAuditId()
    {
        return isset($this->CreatedByAuditId) ? $this->CreatedByAuditId : null;
    }
    /**
     * Set CreatedByAuditId 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 int $createdByAuditId
     * @return \patest\StructType\Merchandise_MerchandiseBase
     */
    public function setCreatedByAuditId($createdByAuditId = null)
    {
        // validation for constraint: int
        if (!is_null($createdByAuditId) && !(is_int($createdByAuditId) || ctype_digit($createdByAuditId))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($createdByAuditId, true), gettype($createdByAuditId)), __LINE__);
        }
        if (is_null($createdByAuditId) || (is_array($createdByAuditId) && empty($createdByAuditId))) {
            unset($this->CreatedByAuditId);
        } else {
            $this->CreatedByAuditId = $createdByAuditId;
        }
        return $this;
    }
    /**
     * Get CreatedOn 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 getCreatedOn()
    {
        return isset($this->CreatedOn) ? $this->CreatedOn : null;
    }
    /**
     * Set CreatedOn 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 $createdOn
     * @return \patest\StructType\Merchandise_MerchandiseBase
     */
    public function setCreatedOn($createdOn = null)
    {
        // validation for constraint: string
        if (!is_null($createdOn) && !is_string($createdOn)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($createdOn, true), gettype($createdOn)), __LINE__);
        }
        if (is_null($createdOn) || (is_array($createdOn) && empty($createdOn))) {
            unset($this->CreatedOn);
        } else {
            $this->CreatedOn = $createdOn;
        }
        return $this;
    }
    /**
     * Get LastUpdatedByAuditId 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 int|null
     */
    public function getLastUpdatedByAuditId()
    {
        return isset($this->LastUpdatedByAuditId) ? $this->LastUpdatedByAuditId : null;
    }
    /**
     * Set LastUpdatedByAuditId 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 int $lastUpdatedByAuditId
     * @return \patest\StructType\Merchandise_MerchandiseBase
     */
    public function setLastUpdatedByAuditId($lastUpdatedByAuditId = null)
    {
        // validation for constraint: int
        if (!is_null($lastUpdatedByAuditId) && !(is_int($lastUpdatedByAuditId) || ctype_digit($lastUpdatedByAuditId))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($lastUpdatedByAuditId, true), gettype($lastUpdatedByAuditId)), __LINE__);
        }
        if (is_null($lastUpdatedByAuditId) || (is_array($lastUpdatedByAuditId) && empty($lastUpdatedByAuditId))) {
            unset($this->LastUpdatedByAuditId);
        } else {
            $this->LastUpdatedByAuditId = $lastUpdatedByAuditId;
        }
        return $this;
    }
    /**
     * Get LastUpdatedOn 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 getLastUpdatedOn()
    {
        return isset($this->LastUpdatedOn) ? $this->LastUpdatedOn : null;
    }
    /**
     * Set LastUpdatedOn 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 $lastUpdatedOn
     * @return \patest\StructType\Merchandise_MerchandiseBase
     */
    public function setLastUpdatedOn($lastUpdatedOn = null)
    {
        // validation for constraint: string
        if (!is_null($lastUpdatedOn) && !is_string($lastUpdatedOn)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($lastUpdatedOn, true), gettype($lastUpdatedOn)), __LINE__);
        }
        if (is_null($lastUpdatedOn) || (is_array($lastUpdatedOn) && empty($lastUpdatedOn))) {
            unset($this->LastUpdatedOn);
        } else {
            $this->LastUpdatedOn = $lastUpdatedOn;
        }
        return $this;
    }
    /**
     * Get SystemName 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 getSystemName()
    {
        return isset($this->SystemName) ? $this->SystemName : null;
    }
    /**
     * Set SystemName 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 $systemName
     * @return \patest\StructType\Merchandise_MerchandiseBase
     */
    public function setSystemName($systemName = null)
    {
        // validation for constraint: string
        if (!is_null($systemName) && !is_string($systemName)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($systemName, true), gettype($systemName)), __LINE__);
        }
        if (is_null($systemName) || (is_array($systemName) && empty($systemName))) {
            unset($this->SystemName);
        } else {
            $this->SystemName = $systemName;
        }
        return $this;
    }
}
