<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Sales.CustomerFilter StructType
 * @subpackage Structs
 */
class Sales_CustomerFilter extends Sales_ClientFilter
{
    /**
     * The CardId
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $CardId;
    /**
     * The Name_First
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $Name_First;
    /**
     * The Name_Last
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $Name_Last;
    /**
     * The ZipCode
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $ZipCode;
    /**
     * Constructor method for Sales.CustomerFilter
     * @uses Sales_CustomerFilter::setCardId()
     * @uses Sales_CustomerFilter::setName_First()
     * @uses Sales_CustomerFilter::setName_Last()
     * @uses Sales_CustomerFilter::setZipCode()
     * @param string $cardId
     * @param string $name_First
     * @param string $name_Last
     * @param string $zipCode
     */
    public function __construct($cardId = null, $name_First = null, $name_Last = null, $zipCode = null)
    {
        $this
            ->setCardId($cardId)
            ->setName_First($name_First)
            ->setName_Last($name_Last)
            ->setZipCode($zipCode);
    }
    /**
     * Get CardId 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 getCardId()
    {
        return isset($this->CardId) ? $this->CardId : null;
    }
    /**
     * Set CardId 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 $cardId
     * @return \patest\StructType\Sales_CustomerFilter
     */
    public function setCardId($cardId = null)
    {
        // validation for constraint: string
        if (!is_null($cardId) && !is_string($cardId)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($cardId, true), gettype($cardId)), __LINE__);
        }
        if (is_null($cardId) || (is_array($cardId) && empty($cardId))) {
            unset($this->CardId);
        } else {
            $this->CardId = $cardId;
        }
        return $this;
    }
    /**
     * Get Name_First 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_First()
    {
        return isset($this->Name_First) ? $this->Name_First : null;
    }
    /**
     * Set Name_First 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_First
     * @return \patest\StructType\Sales_CustomerFilter
     */
    public function setName_First($name_First = null)
    {
        // validation for constraint: string
        if (!is_null($name_First) && !is_string($name_First)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($name_First, true), gettype($name_First)), __LINE__);
        }
        if (is_null($name_First) || (is_array($name_First) && empty($name_First))) {
            unset($this->Name_First);
        } else {
            $this->Name_First = $name_First;
        }
        return $this;
    }
    /**
     * Get Name_Last 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_Last()
    {
        return isset($this->Name_Last) ? $this->Name_Last : null;
    }
    /**
     * Set Name_Last 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_Last
     * @return \patest\StructType\Sales_CustomerFilter
     */
    public function setName_Last($name_Last = null)
    {
        // validation for constraint: string
        if (!is_null($name_Last) && !is_string($name_Last)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($name_Last, true), gettype($name_Last)), __LINE__);
        }
        if (is_null($name_Last) || (is_array($name_Last) && empty($name_Last))) {
            unset($this->Name_Last);
        } else {
            $this->Name_Last = $name_Last;
        }
        return $this;
    }
    /**
     * Get ZipCode 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 getZipCode()
    {
        return isset($this->ZipCode) ? $this->ZipCode : null;
    }
    /**
     * Set ZipCode 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 $zipCode
     * @return \patest\StructType\Sales_CustomerFilter
     */
    public function setZipCode($zipCode = null)
    {
        // validation for constraint: string
        if (!is_null($zipCode) && !is_string($zipCode)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($zipCode, true), gettype($zipCode)), __LINE__);
        }
        if (is_null($zipCode) || (is_array($zipCode) && empty($zipCode))) {
            unset($this->ZipCode);
        } else {
            $this->ZipCode = $zipCode;
        }
        return $this;
    }
}
