<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Authentication.IdentityPlatform.ConfiguredConnector
 * StructType
 * @subpackage Structs
 */
class Authentication_IdentityPlatform_ConfiguredConnector extends AnyEntity
{
    /**
     * The DataEntityName
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $DataEntityName;
    /**
     * The Id
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $Id;
    /**
     * The IsExternal
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var bool
     */
    public $IsExternal;
    /**
     * The Name
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\GlobalString
     */
    public $Name;
    /**
     * Constructor method for Authentication.IdentityPlatform.ConfiguredConnector
     * @uses Authentication_IdentityPlatform_ConfiguredConnector::setDataEntityName()
     * @uses Authentication_IdentityPlatform_ConfiguredConnector::setId()
     * @uses Authentication_IdentityPlatform_ConfiguredConnector::setIsExternal()
     * @uses Authentication_IdentityPlatform_ConfiguredConnector::setName()
     * @param string $dataEntityName
     * @param string $id
     * @param bool $isExternal
     * @param \patest\StructType\GlobalString $name
     */
    public function __construct($dataEntityName = null, $id = null, $isExternal = null, \patest\StructType\GlobalString $name = null)
    {
        $this
            ->setDataEntityName($dataEntityName)
            ->setId($id)
            ->setIsExternal($isExternal)
            ->setName($name);
    }
    /**
     * Get DataEntityName 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 getDataEntityName()
    {
        return isset($this->DataEntityName) ? $this->DataEntityName : null;
    }
    /**
     * Set DataEntityName 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 $dataEntityName
     * @return \patest\StructType\Authentication_IdentityPlatform_ConfiguredConnector
     */
    public function setDataEntityName($dataEntityName = null)
    {
        // validation for constraint: string
        if (!is_null($dataEntityName) && !is_string($dataEntityName)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($dataEntityName, true), gettype($dataEntityName)), __LINE__);
        }
        if (is_null($dataEntityName) || (is_array($dataEntityName) && empty($dataEntityName))) {
            unset($this->DataEntityName);
        } else {
            $this->DataEntityName = $dataEntityName;
        }
        return $this;
    }
    /**
     * Get Id 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 getId()
    {
        return isset($this->Id) ? $this->Id : null;
    }
    /**
     * Set Id 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 $id
     * @return \patest\StructType\Authentication_IdentityPlatform_ConfiguredConnector
     */
    public function setId($id = null)
    {
        // validation for constraint: string
        if (!is_null($id) && !is_string($id)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($id, true), gettype($id)), __LINE__);
        }
        if (is_null($id) || (is_array($id) && empty($id))) {
            unset($this->Id);
        } else {
            $this->Id = $id;
        }
        return $this;
    }
    /**
     * Get IsExternal 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 bool|null
     */
    public function getIsExternal()
    {
        return isset($this->IsExternal) ? $this->IsExternal : null;
    }
    /**
     * Set IsExternal 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 bool $isExternal
     * @return \patest\StructType\Authentication_IdentityPlatform_ConfiguredConnector
     */
    public function setIsExternal($isExternal = null)
    {
        // validation for constraint: boolean
        if (!is_null($isExternal) && !is_bool($isExternal)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($isExternal, true), gettype($isExternal)), __LINE__);
        }
        if (is_null($isExternal) || (is_array($isExternal) && empty($isExternal))) {
            unset($this->IsExternal);
        } else {
            $this->IsExternal = $isExternal;
        }
        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 \patest\StructType\GlobalString|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 \patest\StructType\GlobalString $name
     * @return \patest\StructType\Authentication_IdentityPlatform_ConfiguredConnector
     */
    public function setName(\patest\StructType\GlobalString $name = null)
    {
        if (is_null($name) || (is_array($name) && empty($name))) {
            unset($this->Name);
        } else {
            $this->Name = $name;
        }
        return $this;
    }
}
