<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_FinalCustomerContactStaticData StructType
 * @subpackage Structs
 */
class JP_FinalCustomerContactStaticData extends AbstractStructBase
{
    /**
     * The Email
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $Email;
    /**
     * The PhoneNumbers
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \ArrayType\ArrayOfJP_PhoneNumber
     */
    public $PhoneNumbers;
    /**
     * Constructor method for JP_FinalCustomerContactStaticData
     * @uses JP_FinalCustomerContactStaticData::setEmail()
     * @uses JP_FinalCustomerContactStaticData::setPhoneNumbers()
     * @param string $email
     * @param \ArrayType\ArrayOfJP_PhoneNumber $phoneNumbers
     */
    public function __construct($email = null, \ArrayType\ArrayOfJP_PhoneNumber $phoneNumbers = null)
    {
        $this
            ->setEmail($email)
            ->setPhoneNumbers($phoneNumbers);
    }
    /**
     * Get Email value
     * @return string|null
     */
    public function getEmail()
    {
        return $this->Email;
    }
    /**
     * Set Email value
     * @param string $email
     * @return \StructType\JP_FinalCustomerContactStaticData
     */
    public function setEmail($email = null)
    {
        // validation for constraint: string
        if (!is_null($email) && !is_string($email)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($email)), __LINE__);
        }
        $this->Email = $email;
        return $this;
    }
    /**
     * Get PhoneNumbers value
     * @return \ArrayType\ArrayOfJP_PhoneNumber|null
     */
    public function getPhoneNumbers()
    {
        return $this->PhoneNumbers;
    }
    /**
     * Set PhoneNumbers value
     * @param \ArrayType\ArrayOfJP_PhoneNumber $phoneNumbers
     * @return \StructType\JP_FinalCustomerContactStaticData
     */
    public function setPhoneNumbers(\ArrayType\ArrayOfJP_PhoneNumber $phoneNumbers = null)
    {
        $this->PhoneNumbers = $phoneNumbers;
        return $this;
    }
    /**
     * Method called when an object has been exported with var_export() functions
     * It allows to return an object instantiated with the values
     * @see AbstractStructBase::__set_state()
     * @uses AbstractStructBase::__set_state()
     * @param array $array the exported values
     * @return \StructType\JP_FinalCustomerContactStaticData
     */
    public static function __set_state(array $array)
    {
        return parent::__set_state($array);
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
