<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Crm.CustomerPropertiesData StructType
 * @subpackage Structs
 */
class Crm_CustomerPropertiesData extends AnyEntity
{
    /**
     * The ForImport
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var bool
     */
    public $ForImport;
    /**
     * The PropertyName
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $PropertyName;
    /**
     * The PropertyTitle
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $PropertyTitle;
    /**
     * Constructor method for Crm.CustomerPropertiesData
     * @uses Crm_CustomerPropertiesData::setForImport()
     * @uses Crm_CustomerPropertiesData::setPropertyName()
     * @uses Crm_CustomerPropertiesData::setPropertyTitle()
     * @param bool $forImport
     * @param string $propertyName
     * @param string $propertyTitle
     */
    public function __construct($forImport = null, $propertyName = null, $propertyTitle = null)
    {
        $this
            ->setForImport($forImport)
            ->setPropertyName($propertyName)
            ->setPropertyTitle($propertyTitle);
    }
    /**
     * Get ForImport 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 getForImport()
    {
        return isset($this->ForImport) ? $this->ForImport : null;
    }
    /**
     * Set ForImport 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 $forImport
     * @return \patest\StructType\Crm_CustomerPropertiesData
     */
    public function setForImport($forImport = null)
    {
        // validation for constraint: boolean
        if (!is_null($forImport) && !is_bool($forImport)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($forImport, true), gettype($forImport)), __LINE__);
        }
        if (is_null($forImport) || (is_array($forImport) && empty($forImport))) {
            unset($this->ForImport);
        } else {
            $this->ForImport = $forImport;
        }
        return $this;
    }
    /**
     * Get PropertyName 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 getPropertyName()
    {
        return isset($this->PropertyName) ? $this->PropertyName : null;
    }
    /**
     * Set PropertyName 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 $propertyName
     * @return \patest\StructType\Crm_CustomerPropertiesData
     */
    public function setPropertyName($propertyName = null)
    {
        // validation for constraint: string
        if (!is_null($propertyName) && !is_string($propertyName)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($propertyName, true), gettype($propertyName)), __LINE__);
        }
        if (is_null($propertyName) || (is_array($propertyName) && empty($propertyName))) {
            unset($this->PropertyName);
        } else {
            $this->PropertyName = $propertyName;
        }
        return $this;
    }
    /**
     * Get PropertyTitle 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 getPropertyTitle()
    {
        return isset($this->PropertyTitle) ? $this->PropertyTitle : null;
    }
    /**
     * Set PropertyTitle 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 $propertyTitle
     * @return \patest\StructType\Crm_CustomerPropertiesData
     */
    public function setPropertyTitle($propertyTitle = null)
    {
        // validation for constraint: string
        if (!is_null($propertyTitle) && !is_string($propertyTitle)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($propertyTitle, true), gettype($propertyTitle)), __LINE__);
        }
        if (is_null($propertyTitle) || (is_array($propertyTitle) && empty($propertyTitle))) {
            unset($this->PropertyTitle);
        } else {
            $this->PropertyTitle = $propertyTitle;
        }
        return $this;
    }
}
