<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_Supplier StructType
 * @subpackage Structs
 */
class JP_Supplier extends AbstractStructBase
{
    /**
     * The Name
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $Name;
    /**
     * The Code
     * @var string
     */
    public $Code;
    /**
     * The IntCode
     * @var string
     */
    public $IntCode;
    /**
     * The PhoneNumber1
     * @var string
     */
    public $PhoneNumber1;
    /**
     * The PhoneNumber2
     * @var string
     */
    public $PhoneNumber2;
    /**
     * Constructor method for JP_Supplier
     * @uses JP_Supplier::setName()
     * @uses JP_Supplier::setCode()
     * @uses JP_Supplier::setIntCode()
     * @uses JP_Supplier::setPhoneNumber1()
     * @uses JP_Supplier::setPhoneNumber2()
     * @param string $name
     * @param string $code
     * @param string $intCode
     * @param string $phoneNumber1
     * @param string $phoneNumber2
     */
    public function __construct($name = null, $code = null, $intCode = null, $phoneNumber1 = null, $phoneNumber2 = null)
    {
        $this
            ->setName($name)
            ->setCode($code)
            ->setIntCode($intCode)
            ->setPhoneNumber1($phoneNumber1)
            ->setPhoneNumber2($phoneNumber2);
    }
    /**
     * Get Name value
     * @return string|null
     */
    public function getName()
    {
        return $this->Name;
    }
    /**
     * Set Name value
     * @param string $name
     * @return \StructType\JP_Supplier
     */
    public function setName($name = null)
    {
        // validation for constraint: string
        if (!is_null($name) && !is_string($name)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($name, true), gettype($name)), __LINE__);
        }
        $this->Name = $name;
        return $this;
    }
    /**
     * Get Code value
     * @return string|null
     */
    public function getCode()
    {
        return $this->Code;
    }
    /**
     * Set Code value
     * @param string $code
     * @return \StructType\JP_Supplier
     */
    public function setCode($code = null)
    {
        // validation for constraint: string
        if (!is_null($code) && !is_string($code)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($code, true), gettype($code)), __LINE__);
        }
        $this->Code = $code;
        return $this;
    }
    /**
     * Get IntCode value
     * @return string|null
     */
    public function getIntCode()
    {
        return $this->IntCode;
    }
    /**
     * Set IntCode value
     * @param string $intCode
     * @return \StructType\JP_Supplier
     */
    public function setIntCode($intCode = null)
    {
        // validation for constraint: string
        if (!is_null($intCode) && !is_string($intCode)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($intCode, true), gettype($intCode)), __LINE__);
        }
        $this->IntCode = $intCode;
        return $this;
    }
    /**
     * Get PhoneNumber1 value
     * @return string|null
     */
    public function getPhoneNumber1()
    {
        return $this->PhoneNumber1;
    }
    /**
     * Set PhoneNumber1 value
     * @param string $phoneNumber1
     * @return \StructType\JP_Supplier
     */
    public function setPhoneNumber1($phoneNumber1 = null)
    {
        // validation for constraint: string
        if (!is_null($phoneNumber1) && !is_string($phoneNumber1)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($phoneNumber1, true), gettype($phoneNumber1)), __LINE__);
        }
        $this->PhoneNumber1 = $phoneNumber1;
        return $this;
    }
    /**
     * Get PhoneNumber2 value
     * @return string|null
     */
    public function getPhoneNumber2()
    {
        return $this->PhoneNumber2;
    }
    /**
     * Set PhoneNumber2 value
     * @param string $phoneNumber2
     * @return \StructType\JP_Supplier
     */
    public function setPhoneNumber2($phoneNumber2 = null)
    {
        // validation for constraint: string
        if (!is_null($phoneNumber2) && !is_string($phoneNumber2)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($phoneNumber2, true), gettype($phoneNumber2)), __LINE__);
        }
        $this->PhoneNumber2 = $phoneNumber2;
        return $this;
    }
}
