<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Crm.CustomerExternaManipulationDelimitersData StructType
 * @subpackage Structs
 */
class Crm_CustomerExternaManipulationDelimitersData extends AnyEntity
{
    /**
     * The DelimiterName
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $DelimiterName;
    /**
     * The DelimiterValue
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $DelimiterValue;
    /**
     * Constructor method for Crm.CustomerExternaManipulationDelimitersData
     * @uses Crm_CustomerExternaManipulationDelimitersData::setDelimiterName()
     * @uses Crm_CustomerExternaManipulationDelimitersData::setDelimiterValue()
     * @param string $delimiterName
     * @param string $delimiterValue
     */
    public function __construct($delimiterName = null, $delimiterValue = null)
    {
        $this
            ->setDelimiterName($delimiterName)
            ->setDelimiterValue($delimiterValue);
    }
    /**
     * Get DelimiterName 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 getDelimiterName()
    {
        return isset($this->DelimiterName) ? $this->DelimiterName : null;
    }
    /**
     * Set DelimiterName 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 $delimiterName
     * @return \patest\StructType\Crm_CustomerExternaManipulationDelimitersData
     */
    public function setDelimiterName($delimiterName = null)
    {
        // validation for constraint: string
        if (!is_null($delimiterName) && !is_string($delimiterName)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($delimiterName, true), gettype($delimiterName)), __LINE__);
        }
        if (is_null($delimiterName) || (is_array($delimiterName) && empty($delimiterName))) {
            unset($this->DelimiterName);
        } else {
            $this->DelimiterName = $delimiterName;
        }
        return $this;
    }
    /**
     * Get DelimiterValue 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 getDelimiterValue()
    {
        return isset($this->DelimiterValue) ? $this->DelimiterValue : null;
    }
    /**
     * Set DelimiterValue 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 $delimiterValue
     * @return \patest\StructType\Crm_CustomerExternaManipulationDelimitersData
     */
    public function setDelimiterValue($delimiterValue = null)
    {
        // validation for constraint: string
        if (!is_null($delimiterValue) && !is_string($delimiterValue)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($delimiterValue, true), gettype($delimiterValue)), __LINE__);
        }
        if (is_null($delimiterValue) || (is_array($delimiterValue) && empty($delimiterValue))) {
            unset($this->DelimiterValue);
        } else {
            $this->DelimiterValue = $delimiterValue;
        }
        return $this;
    }
}
