<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Crm.ApprovedEntityFilter StructType
 * @subpackage Structs
 */
class Crm_ApprovedEntityFilter extends Security_OrgUnitBoundEntityFilter
{
    /**
     * The IsApproved
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $IsApproved;
    /**
     * The Name
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $Name;
    /**
     * The TheName
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $TheName;
    /**
     * Constructor method for Crm.ApprovedEntityFilter
     * @uses Crm_ApprovedEntityFilter::setIsApproved()
     * @uses Crm_ApprovedEntityFilter::setName()
     * @uses Crm_ApprovedEntityFilter::setTheName()
     * @param string $isApproved
     * @param string $name
     * @param string $theName
     */
    public function __construct($isApproved = null, $name = null, $theName = null)
    {
        $this
            ->setIsApproved($isApproved)
            ->setName($name)
            ->setTheName($theName);
    }
    /**
     * Get IsApproved 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 getIsApproved()
    {
        return isset($this->IsApproved) ? $this->IsApproved : null;
    }
    /**
     * Set IsApproved 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 $isApproved
     * @return \patest\StructType\Crm_ApprovedEntityFilter
     */
    public function setIsApproved($isApproved = null)
    {
        // validation for constraint: string
        if (!is_null($isApproved) && !is_string($isApproved)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($isApproved, true), gettype($isApproved)), __LINE__);
        }
        if (is_null($isApproved) || (is_array($isApproved) && empty($isApproved))) {
            unset($this->IsApproved);
        } else {
            $this->IsApproved = $isApproved;
        }
        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\Crm_ApprovedEntityFilter
     */
    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;
    }
    /**
     * Get TheName 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 getTheName()
    {
        return isset($this->TheName) ? $this->TheName : null;
    }
    /**
     * Set TheName 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 $theName
     * @return \patest\StructType\Crm_ApprovedEntityFilter
     */
    public function setTheName($theName = null)
    {
        // validation for constraint: string
        if (!is_null($theName) && !is_string($theName)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($theName, true), gettype($theName)), __LINE__);
        }
        if (is_null($theName) || (is_array($theName) && empty($theName))) {
            unset($this->TheName);
        } else {
            $this->TheName = $theName;
        }
        return $this;
    }
}
