<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for BizAction.Foundation.RulesOverview.Criteria StructType
 * @subpackage Structs
 */
class BizAction_Foundation_RulesOverview_Criteria extends AnyEntity
{
    /**
     * The DisplayString
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $DisplayString;
    /**
     * The Name
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $Name;
    /**
     * Constructor method for BizAction.Foundation.RulesOverview.Criteria
     * @uses BizAction_Foundation_RulesOverview_Criteria::setDisplayString()
     * @uses BizAction_Foundation_RulesOverview_Criteria::setName()
     * @param string $displayString
     * @param string $name
     */
    public function __construct($displayString = null, $name = null)
    {
        $this
            ->setDisplayString($displayString)
            ->setName($name);
    }
    /**
     * Get DisplayString 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 getDisplayString()
    {
        return isset($this->DisplayString) ? $this->DisplayString : null;
    }
    /**
     * Set DisplayString 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 $displayString
     * @return \patest\StructType\BizAction_Foundation_RulesOverview_Criteria
     */
    public function setDisplayString($displayString = null)
    {
        // validation for constraint: string
        if (!is_null($displayString) && !is_string($displayString)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($displayString, true), gettype($displayString)), __LINE__);
        }
        if (is_null($displayString) || (is_array($displayString) && empty($displayString))) {
            unset($this->DisplayString);
        } else {
            $this->DisplayString = $displayString;
        }
        return $this;
    }
    /**
     * Get Name 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 getName()
    {
        return isset($this->Name) ? $this->Name : null;
    }
    /**
     * Set Name 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 $name
     * @return \patest\StructType\BizAction_Foundation_RulesOverview_Criteria
     */
    public function setName($name = null)
    {
        // validation for constraint: string
        if (!is_null($name) && !is_string($name)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($name, true), gettype($name)), __LINE__);
        }
        if (is_null($name) || (is_array($name) && empty($name))) {
            unset($this->Name);
        } else {
            $this->Name = $name;
        }
        return $this;
    }
}
