<?php

namespace NineDotMedia\viapost-php\Struct;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for PostalAddress Struct
 * @subpackage Structs
 */
class PostalAddress extends AbstractStructBase
{
    /**
     * The IsValidated
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var bool
     */
    public $IsValidated;
    /**
     * The Name
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $Name;
    /**
     * The Organisation
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $Organisation;
    /**
     * The Street1
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $Street1;
    /**
     * The Street2
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $Street2;
    /**
     * The Street3
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $Street3;
    /**
     * The PostTown
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $PostTown;
    /**
     * The Postcode
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $Postcode;
    /**
     * The CbcBarcodeString
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $CbcBarcodeString;
    /**
     * The OutCode
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $OutCode;
    /**
     * The InCode
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $InCode;
    /**
     * Constructor method for PostalAddress
     * @uses PostalAddress::setIsValidated()
     * @uses PostalAddress::setName()
     * @uses PostalAddress::setOrganisation()
     * @uses PostalAddress::setStreet1()
     * @uses PostalAddress::setStreet2()
     * @uses PostalAddress::setStreet3()
     * @uses PostalAddress::setPostTown()
     * @uses PostalAddress::setPostcode()
     * @uses PostalAddress::setCbcBarcodeString()
     * @uses PostalAddress::setOutCode()
     * @uses PostalAddress::setInCode()
     * @param bool $isValidated
     * @param string $name
     * @param string $organisation
     * @param string $street1
     * @param string $street2
     * @param string $street3
     * @param string $postTown
     * @param string $postcode
     * @param string $cbcBarcodeString
     * @param string $outCode
     * @param string $inCode
     */
    public function __construct($isValidated = null, $name = null, $organisation = null, $street1 = null, $street2 = null, $street3 = null, $postTown = null, $postcode = null, $cbcBarcodeString = null, $outCode = null, $inCode = null)
    {
        $this
            ->setIsValidated($isValidated)
            ->setName($name)
            ->setOrganisation($organisation)
            ->setStreet1($street1)
            ->setStreet2($street2)
            ->setStreet3($street3)
            ->setPostTown($postTown)
            ->setPostcode($postcode)
            ->setCbcBarcodeString($cbcBarcodeString)
            ->setOutCode($outCode)
            ->setInCode($inCode);
    }
    /**
     * Get IsValidated value
     * @return bool
     */
    public function getIsValidated()
    {
        return $this->IsValidated;
    }
    /**
     * Set IsValidated value
     * @param bool $isValidated
     * @return \NineDotMedia\viapost-php\Struct\PostalAddress
     */
    public function setIsValidated($isValidated = null)
    {
        // validation for constraint: boolean
        if (!is_null($isValidated) && !is_bool($isValidated)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($isValidated, true), gettype($isValidated)), __LINE__);
        }
        $this->IsValidated = $isValidated;
        return $this;
    }
    /**
     * Get Name value
     * @return string|null
     */
    public function getName()
    {
        return $this->Name;
    }
    /**
     * Set Name value
     * @param string $name
     * @return \NineDotMedia\viapost-php\Struct\PostalAddress
     */
    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 Organisation value
     * @return string|null
     */
    public function getOrganisation()
    {
        return $this->Organisation;
    }
    /**
     * Set Organisation value
     * @param string $organisation
     * @return \NineDotMedia\viapost-php\Struct\PostalAddress
     */
    public function setOrganisation($organisation = null)
    {
        // validation for constraint: string
        if (!is_null($organisation) && !is_string($organisation)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($organisation, true), gettype($organisation)), __LINE__);
        }
        $this->Organisation = $organisation;
        return $this;
    }
    /**
     * Get Street1 value
     * @return string|null
     */
    public function getStreet1()
    {
        return $this->Street1;
    }
    /**
     * Set Street1 value
     * @param string $street1
     * @return \NineDotMedia\viapost-php\Struct\PostalAddress
     */
    public function setStreet1($street1 = null)
    {
        // validation for constraint: string
        if (!is_null($street1) && !is_string($street1)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($street1, true), gettype($street1)), __LINE__);
        }
        $this->Street1 = $street1;
        return $this;
    }
    /**
     * Get Street2 value
     * @return string|null
     */
    public function getStreet2()
    {
        return $this->Street2;
    }
    /**
     * Set Street2 value
     * @param string $street2
     * @return \NineDotMedia\viapost-php\Struct\PostalAddress
     */
    public function setStreet2($street2 = null)
    {
        // validation for constraint: string
        if (!is_null($street2) && !is_string($street2)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($street2, true), gettype($street2)), __LINE__);
        }
        $this->Street2 = $street2;
        return $this;
    }
    /**
     * Get Street3 value
     * @return string|null
     */
    public function getStreet3()
    {
        return $this->Street3;
    }
    /**
     * Set Street3 value
     * @param string $street3
     * @return \NineDotMedia\viapost-php\Struct\PostalAddress
     */
    public function setStreet3($street3 = null)
    {
        // validation for constraint: string
        if (!is_null($street3) && !is_string($street3)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($street3, true), gettype($street3)), __LINE__);
        }
        $this->Street3 = $street3;
        return $this;
    }
    /**
     * Get PostTown value
     * @return string|null
     */
    public function getPostTown()
    {
        return $this->PostTown;
    }
    /**
     * Set PostTown value
     * @param string $postTown
     * @return \NineDotMedia\viapost-php\Struct\PostalAddress
     */
    public function setPostTown($postTown = null)
    {
        // validation for constraint: string
        if (!is_null($postTown) && !is_string($postTown)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($postTown, true), gettype($postTown)), __LINE__);
        }
        $this->PostTown = $postTown;
        return $this;
    }
    /**
     * Get Postcode value
     * @return string|null
     */
    public function getPostcode()
    {
        return $this->Postcode;
    }
    /**
     * Set Postcode value
     * @param string $postcode
     * @return \NineDotMedia\viapost-php\Struct\PostalAddress
     */
    public function setPostcode($postcode = null)
    {
        // validation for constraint: string
        if (!is_null($postcode) && !is_string($postcode)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($postcode, true), gettype($postcode)), __LINE__);
        }
        $this->Postcode = $postcode;
        return $this;
    }
    /**
     * Get CbcBarcodeString value
     * @return string|null
     */
    public function getCbcBarcodeString()
    {
        return $this->CbcBarcodeString;
    }
    /**
     * Set CbcBarcodeString value
     * @param string $cbcBarcodeString
     * @return \NineDotMedia\viapost-php\Struct\PostalAddress
     */
    public function setCbcBarcodeString($cbcBarcodeString = null)
    {
        // validation for constraint: string
        if (!is_null($cbcBarcodeString) && !is_string($cbcBarcodeString)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($cbcBarcodeString, true), gettype($cbcBarcodeString)), __LINE__);
        }
        $this->CbcBarcodeString = $cbcBarcodeString;
        return $this;
    }
    /**
     * Get OutCode value
     * @return string|null
     */
    public function getOutCode()
    {
        return $this->OutCode;
    }
    /**
     * Set OutCode value
     * @param string $outCode
     * @return \NineDotMedia\viapost-php\Struct\PostalAddress
     */
    public function setOutCode($outCode = null)
    {
        // validation for constraint: string
        if (!is_null($outCode) && !is_string($outCode)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($outCode, true), gettype($outCode)), __LINE__);
        }
        $this->OutCode = $outCode;
        return $this;
    }
    /**
     * Get InCode value
     * @return string|null
     */
    public function getInCode()
    {
        return $this->InCode;
    }
    /**
     * Set InCode value
     * @param string $inCode
     * @return \NineDotMedia\viapost-php\Struct\PostalAddress
     */
    public function setInCode($inCode = null)
    {
        // validation for constraint: string
        if (!is_null($inCode) && !is_string($inCode)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($inCode, true), gettype($inCode)), __LINE__);
        }
        $this->InCode = $inCode;
        return $this;
    }
}
