Source of file Recipient.php

Size: 36,594 Bytes - Last Modified: 2019-01-11T00:06:01+01:00

/Users/sylvainraye/Sites/git/swisspost/src/StructType/Recipient.php

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916
<?php

namespace Diglin\Swisspost\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Recipient StructType
 * @subpackage Structs
 * @date 2019/01/11
 * @codeVersion 1.0.0
 */
class Recipient extends AbstractStructBase
{
    /**
     * The ZIP
     * Meta informations extracted from the WSDL
     * - minOccurs: 1
     * - maxLength: 10
     * - totalDigits: 6
     * - documentation: Excludes unsupported characters.
     * - pattern: ([^\*|\\|\{|\}|\[|\]|=|>|<])*
     * @var string
     */
    public $ZIP;
    /**
     * The PostIdent
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - maxLength: 15
     * - documentation: Excludes unsupported characters.
     * - pattern: ([^\*|\\|\{|\}|\[|\]|=|>|<])*
     * @var string
     */
    public $PostIdent;
    /**
     * The Title
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - maxLength: 35
     * - documentation: Excludes unsupported characters.
     * - pattern: ([^\*|\\|\{|\}|\[|\]|=|>|<])*
     * @var string
     */
    public $Title;
    /**
     * The PersonallyAddressed
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $PersonallyAddressed;
    /**
     * The Name1
     * Meta informations extracted from the WSDL
     * - maxLength: 35
     * - documentation: Excludes unsupported characters.
     * - pattern: ([^\*|\\|\{|\}|\[|\]|=|>|<])*
     * @var string
     */
    public $Name1;
    /**
     * The FirstName
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - maxLength: 35
     * - documentation: Excludes unsupported characters.
     * - pattern: ([^\*|\\|\{|\}|\[|\]|=|>|<])*
     * @var string
     */
    public $FirstName;
    /**
     * The Name2
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - maxLength: 35
     * - documentation: Excludes unsupported characters.
     * - pattern: ([^\*|\\|\{|\}|\[|\]|=|>|<])*
     * @var string
     */
    public $Name2;
    /**
     * The Name3
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - maxLength: 35
     * - documentation: Excludes unsupported characters.
     * - pattern: ([^\*|\\|\{|\}|\[|\]|=|>|<])*
     * @var string
     */
    public $Name3;
    /**
     * The AddressSuffix
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - maxLength: 35
     * - documentation: Excludes unsupported characters.
     * - pattern: ([^\*|\\|\{|\}|\[|\]|=|>|<])*
     * @var string
     */
    public $AddressSuffix;
    /**
     * The Street
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - maxLength: 35
     * - documentation: Excludes unsupported characters.
     * - pattern: ([^\*|\\|\{|\}|\[|\]|=|>|<])*
     * @var string
     */
    public $Street;
    /**
     * The HouseNo
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - maxLength: 10
     * - documentation: Excludes unsupported characters.
     * - pattern: ([^\*|\\|\{|\}|\[|\]|=|>|<])*
     * @var string
     */
    public $HouseNo;
    /**
     * The POBox
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - maxLength: 35
     * - documentation: Excludes unsupported characters.
     * - pattern: ([^\*|\\|\{|\}|\[|\]|=|>|<])*
     * @var string
     */
    public $POBox;
    /**
     * The FloorNo
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - maxLength: 5
     * - documentation: Excludes unsupported characters.
     * - pattern: ([^\*|\\|\{|\}|\[|\]|=|>|<])*
     * @var string
     */
    public $FloorNo;
    /**
     * The MailboxNo
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - totalDigits: 10
     * @var int
     */
    public $MailboxNo;
    /**
     * The City
     * Meta informations extracted from the WSDL
     * - maxLength: 35
     * - documentation: Excludes unsupported characters.
     * - pattern: ([^\*|\\|\{|\}|\[|\]|=|>|<])*
     * @var string
     */
    public $City;
    /**
     * The Country
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - documentation: The ISO country code.
     * - pattern: [a-zA-Z]{2}
     * @var string
     */
    public $Country;
    /**
     * The Hauskey
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - totalDigits: 13
     * @var int
     */
    public $Hauskey;
    /**
     * The Phone
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - documentation: Defines a valid phone number. | Excludes unsupported characters.
     * - maxLength: 20
     * - minLength: 10
     * - pattern: ([^\*|\\|\{|\}|\[|\]|=|>|<])*
     * @var string
     */
    public $Phone;
    /**
     * The Mobile
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - documentation: Defines a valid phone number. | Excludes unsupported characters.
     * - maxLength: 20
     * - minLength: 10
     * - pattern: ([^\*|\\|\{|\}|\[|\]|=|>|<])*
     * @var string
     */
    public $Mobile;
    /**
     * The EMail
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - documentation: The email address. | Excludes unsupported characters.
     * - maxLength: 160
     * - pattern: ([^\*|\\|\{|\}|\[|\]|=|>|<])*
     * @var string
     */
    public $EMail;
    /**
     * The LabelAddress
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * @var \Diglin\Swisspost\StructType\LabelAddress
     */
    public $LabelAddress;
    /**
     * Constructor method for Recipient
     * @uses Recipient::setZIP()
     * @uses Recipient::setPostIdent()
     * @uses Recipient::setTitle()
     * @uses Recipient::setPersonallyAddressed()
     * @uses Recipient::setName1()
     * @uses Recipient::setFirstName()
     * @uses Recipient::setName2()
     * @uses Recipient::setName3()
     * @uses Recipient::setAddressSuffix()
     * @uses Recipient::setStreet()
     * @uses Recipient::setHouseNo()
     * @uses Recipient::setPOBox()
     * @uses Recipient::setFloorNo()
     * @uses Recipient::setMailboxNo()
     * @uses Recipient::setCity()
     * @uses Recipient::setCountry()
     * @uses Recipient::setHauskey()
     * @uses Recipient::setPhone()
     * @uses Recipient::setMobile()
     * @uses Recipient::setEMail()
     * @uses Recipient::setLabelAddress()
     * @param string $zIP
     * @param string $postIdent
     * @param string $title
     * @param bool $personallyAddressed
     * @param string $name1
     * @param string $firstName
     * @param string $name2
     * @param string $name3
     * @param string $addressSuffix
     * @param string $street
     * @param string $houseNo
     * @param string $pOBox
     * @param string $floorNo
     * @param int $mailboxNo
     * @param string $city
     * @param string $country
     * @param int $hauskey
     * @param string $phone
     * @param string $mobile
     * @param string $eMail
     * @param \Diglin\Swisspost\StructType\LabelAddress $labelAddress
     */
    public function __construct($zIP = null, $postIdent = null, $title = null, $personallyAddressed = null, $name1 = null, $firstName = null, $name2 = null, $name3 = null, $addressSuffix = null, $street = null, $houseNo = null, $pOBox = null, $floorNo = null, $mailboxNo = null, $city = null, $country = null, $hauskey = null, $phone = null, $mobile = null, $eMail = null, \Diglin\Swisspost\StructType\LabelAddress $labelAddress = null)
    {
        $this
            ->setZIP($zIP)
            ->setPostIdent($postIdent)
            ->setTitle($title)
            ->setPersonallyAddressed($personallyAddressed)
            ->setName1($name1)
            ->setFirstName($firstName)
            ->setName2($name2)
            ->setName3($name3)
            ->setAddressSuffix($addressSuffix)
            ->setStreet($street)
            ->setHouseNo($houseNo)
            ->setPOBox($pOBox)
            ->setFloorNo($floorNo)
            ->setMailboxNo($mailboxNo)
            ->setCity($city)
            ->setCountry($country)
            ->setHauskey($hauskey)
            ->setPhone($phone)
            ->setMobile($mobile)
            ->setEMail($eMail)
            ->setLabelAddress($labelAddress);
    }
    /**
     * Get ZIP value
     * @return string
     */
    public function getZIP()
    {
        return $this->ZIP;
    }
    /**
     * Set ZIP value
     * @param string $zIP
     * @return \Diglin\Swisspost\StructType\Recipient
     */
    public function setZIP($zIP = null)
    {
        // validation for constraint: maxLength
        if ((is_scalar($zIP) && strlen($zIP) > 10) || (is_array($zIP) && count($zIP) > 10)) {
            throw new \InvalidArgumentException(sprintf('Invalid length, please provide an array with 10 element(s) or a scalar of 10 character(s) at most, "%d" length given', is_scalar($zIP) ? strlen($zIP) : count($zIP)), __LINE__);
        }
        // validation for constraint: totalDigits
        if (is_float($zIP) && strlen(str_replace(array(' ', '.', ',', '-', '+'), '', $zIP)) !== 6) {
            throw new \InvalidArgumentException(sprintf('Invalid value, the value must at most contain 6 digits, "%d" given', strlen(substr($zIP, strpos($zIP, '.')))), __LINE__);
        }
        // validation for constraint: pattern
        if (is_scalar($zIP) && !preg_match('/([^\\*|\\\\|\\{|\\}|\\[|\\]|=|>|<])*/', $zIP)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a scalar value that matches "([^\*|\\|\{|\}|\[|\]|=|>|<])*", "%s" given', var_export($zIP, true)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($zIP) && !is_string($zIP)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($zIP)), __LINE__);
        }
        $this->ZIP = $zIP;
        return $this;
    }
    /**
     * Get PostIdent value
     * @return string|null
     */
    public function getPostIdent()
    {
        return $this->PostIdent;
    }
    /**
     * Set PostIdent value
     * @param string $postIdent
     * @return \Diglin\Swisspost\StructType\Recipient
     */
    public function setPostIdent($postIdent = null)
    {
        // validation for constraint: maxLength
        if ((is_scalar($postIdent) && strlen($postIdent) > 15) || (is_array($postIdent) && count($postIdent) > 15)) {
            throw new \InvalidArgumentException(sprintf('Invalid length, please provide an array with 15 element(s) or a scalar of 15 character(s) at most, "%d" length given', is_scalar($postIdent) ? strlen($postIdent) : count($postIdent)), __LINE__);
        }
        // validation for constraint: pattern
        if (is_scalar($postIdent) && !preg_match('/([^\\*|\\\\|\\{|\\}|\\[|\\]|=|>|<])*/', $postIdent)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a scalar value that matches "([^\*|\\|\{|\}|\[|\]|=|>|<])*", "%s" given', var_export($postIdent, true)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($postIdent) && !is_string($postIdent)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($postIdent)), __LINE__);
        }
        $this->PostIdent = $postIdent;
        return $this;
    }
    /**
     * Get Title value
     * @return string|null
     */
    public function getTitle()
    {
        return $this->Title;
    }
    /**
     * Set Title value
     * @param string $title
     * @return \Diglin\Swisspost\StructType\Recipient
     */
    public function setTitle($title = null)
    {
        // validation for constraint: maxLength
        if ((is_scalar($title) && strlen($title) > 35) || (is_array($title) && count($title) > 35)) {
            throw new \InvalidArgumentException(sprintf('Invalid length, please provide an array with 35 element(s) or a scalar of 35 character(s) at most, "%d" length given', is_scalar($title) ? strlen($title) : count($title)), __LINE__);
        }
        // validation for constraint: pattern
        if (is_scalar($title) && !preg_match('/([^\\*|\\\\|\\{|\\}|\\[|\\]|=|>|<])*/', $title)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a scalar value that matches "([^\*|\\|\{|\}|\[|\]|=|>|<])*", "%s" given', var_export($title, true)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($title) && !is_string($title)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($title)), __LINE__);
        }
        $this->Title = $title;
        return $this;
    }
    /**
     * Get PersonallyAddressed value
     * @return bool|null
     */
    public function getPersonallyAddressed()
    {
        return $this->PersonallyAddressed;
    }
    /**
     * Set PersonallyAddressed value
     * @param bool $personallyAddressed
     * @return \Diglin\Swisspost\StructType\Recipient
     */
    public function setPersonallyAddressed($personallyAddressed = null)
    {
        // validation for constraint: boolean
        if (!is_null($personallyAddressed) && !is_bool($personallyAddressed)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($personallyAddressed)), __LINE__);
        }
        $this->PersonallyAddressed = $personallyAddressed;
        return $this;
    }
    /**
     * Get Name1 value
     * @return string|null
     */
    public function getName1()
    {
        return $this->Name1;
    }
    /**
     * Set Name1 value
     * @param string $name1
     * @return \Diglin\Swisspost\StructType\Recipient
     */
    public function setName1($name1 = null)
    {
        // validation for constraint: maxLength
        if ((is_scalar($name1) && strlen($name1) > 35) || (is_array($name1) && count($name1) > 35)) {
            throw new \InvalidArgumentException(sprintf('Invalid length, please provide an array with 35 element(s) or a scalar of 35 character(s) at most, "%d" length given', is_scalar($name1) ? strlen($name1) : count($name1)), __LINE__);
        }
        // validation for constraint: pattern
        if (is_scalar($name1) && !preg_match('/([^\\*|\\\\|\\{|\\}|\\[|\\]|=|>|<])*/', $name1)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a scalar value that matches "([^\*|\\|\{|\}|\[|\]|=|>|<])*", "%s" given', var_export($name1, true)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($name1) && !is_string($name1)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($name1)), __LINE__);
        }
        $this->Name1 = $name1;
        return $this;
    }
    /**
     * Get FirstName value
     * @return string|null
     */
    public function getFirstName()
    {
        return $this->FirstName;
    }
    /**
     * Set FirstName value
     * @param string $firstName
     * @return \Diglin\Swisspost\StructType\Recipient
     */
    public function setFirstName($firstName = null)
    {
        // validation for constraint: maxLength
        if ((is_scalar($firstName) && strlen($firstName) > 35) || (is_array($firstName) && count($firstName) > 35)) {
            throw new \InvalidArgumentException(sprintf('Invalid length, please provide an array with 35 element(s) or a scalar of 35 character(s) at most, "%d" length given', is_scalar($firstName) ? strlen($firstName) : count($firstName)), __LINE__);
        }
        // validation for constraint: pattern
        if (is_scalar($firstName) && !preg_match('/([^\\*|\\\\|\\{|\\}|\\[|\\]|=|>|<])*/', $firstName)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a scalar value that matches "([^\*|\\|\{|\}|\[|\]|=|>|<])*", "%s" given', var_export($firstName, true)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($firstName) && !is_string($firstName)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($firstName)), __LINE__);
        }
        $this->FirstName = $firstName;
        return $this;
    }
    /**
     * Get Name2 value
     * @return string|null
     */
    public function getName2()
    {
        return $this->Name2;
    }
    /**
     * Set Name2 value
     * @param string $name2
     * @return \Diglin\Swisspost\StructType\Recipient
     */
    public function setName2($name2 = null)
    {
        // validation for constraint: maxLength
        if ((is_scalar($name2) && strlen($name2) > 35) || (is_array($name2) && count($name2) > 35)) {
            throw new \InvalidArgumentException(sprintf('Invalid length, please provide an array with 35 element(s) or a scalar of 35 character(s) at most, "%d" length given', is_scalar($name2) ? strlen($name2) : count($name2)), __LINE__);
        }
        // validation for constraint: pattern
        if (is_scalar($name2) && !preg_match('/([^\\*|\\\\|\\{|\\}|\\[|\\]|=|>|<])*/', $name2)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a scalar value that matches "([^\*|\\|\{|\}|\[|\]|=|>|<])*", "%s" given', var_export($name2, true)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($name2) && !is_string($name2)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($name2)), __LINE__);
        }
        $this->Name2 = $name2;
        return $this;
    }
    /**
     * Get Name3 value
     * @return string|null
     */
    public function getName3()
    {
        return $this->Name3;
    }
    /**
     * Set Name3 value
     * @param string $name3
     * @return \Diglin\Swisspost\StructType\Recipient
     */
    public function setName3($name3 = null)
    {
        // validation for constraint: maxLength
        if ((is_scalar($name3) && strlen($name3) > 35) || (is_array($name3) && count($name3) > 35)) {
            throw new \InvalidArgumentException(sprintf('Invalid length, please provide an array with 35 element(s) or a scalar of 35 character(s) at most, "%d" length given', is_scalar($name3) ? strlen($name3) : count($name3)), __LINE__);
        }
        // validation for constraint: pattern
        if (is_scalar($name3) && !preg_match('/([^\\*|\\\\|\\{|\\}|\\[|\\]|=|>|<])*/', $name3)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a scalar value that matches "([^\*|\\|\{|\}|\[|\]|=|>|<])*", "%s" given', var_export($name3, true)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($name3) && !is_string($name3)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($name3)), __LINE__);
        }
        $this->Name3 = $name3;
        return $this;
    }
    /**
     * Get AddressSuffix value
     * @return string|null
     */
    public function getAddressSuffix()
    {
        return $this->AddressSuffix;
    }
    /**
     * Set AddressSuffix value
     * @param string $addressSuffix
     * @return \Diglin\Swisspost\StructType\Recipient
     */
    public function setAddressSuffix($addressSuffix = null)
    {
        // validation for constraint: maxLength
        if ((is_scalar($addressSuffix) && strlen($addressSuffix) > 35) || (is_array($addressSuffix) && count($addressSuffix) > 35)) {
            throw new \InvalidArgumentException(sprintf('Invalid length, please provide an array with 35 element(s) or a scalar of 35 character(s) at most, "%d" length given', is_scalar($addressSuffix) ? strlen($addressSuffix) : count($addressSuffix)), __LINE__);
        }
        // validation for constraint: pattern
        if (is_scalar($addressSuffix) && !preg_match('/([^\\*|\\\\|\\{|\\}|\\[|\\]|=|>|<])*/', $addressSuffix)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a scalar value that matches "([^\*|\\|\{|\}|\[|\]|=|>|<])*", "%s" given', var_export($addressSuffix, true)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($addressSuffix) && !is_string($addressSuffix)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($addressSuffix)), __LINE__);
        }
        $this->AddressSuffix = $addressSuffix;
        return $this;
    }
    /**
     * Get Street value
     * @return string|null
     */
    public function getStreet()
    {
        return $this->Street;
    }
    /**
     * Set Street value
     * @param string $street
     * @return \Diglin\Swisspost\StructType\Recipient
     */
    public function setStreet($street = null)
    {
        // validation for constraint: maxLength
        if ((is_scalar($street) && strlen($street) > 35) || (is_array($street) && count($street) > 35)) {
            throw new \InvalidArgumentException(sprintf('Invalid length, please provide an array with 35 element(s) or a scalar of 35 character(s) at most, "%d" length given', is_scalar($street) ? strlen($street) : count($street)), __LINE__);
        }
        // validation for constraint: pattern
        if (is_scalar($street) && !preg_match('/([^\\*|\\\\|\\{|\\}|\\[|\\]|=|>|<])*/', $street)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a scalar value that matches "([^\*|\\|\{|\}|\[|\]|=|>|<])*", "%s" given', var_export($street, true)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($street) && !is_string($street)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($street)), __LINE__);
        }
        $this->Street = $street;
        return $this;
    }
    /**
     * Get HouseNo value
     * @return string|null
     */
    public function getHouseNo()
    {
        return $this->HouseNo;
    }
    /**
     * Set HouseNo value
     * @param string $houseNo
     * @return \Diglin\Swisspost\StructType\Recipient
     */
    public function setHouseNo($houseNo = null)
    {
        // validation for constraint: maxLength
        if ((is_scalar($houseNo) && strlen($houseNo) > 10) || (is_array($houseNo) && count($houseNo) > 10)) {
            throw new \InvalidArgumentException(sprintf('Invalid length, please provide an array with 10 element(s) or a scalar of 10 character(s) at most, "%d" length given', is_scalar($houseNo) ? strlen($houseNo) : count($houseNo)), __LINE__);
        }
        // validation for constraint: pattern
        if (is_scalar($houseNo) && !preg_match('/([^\\*|\\\\|\\{|\\}|\\[|\\]|=|>|<])*/', $houseNo)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a scalar value that matches "([^\*|\\|\{|\}|\[|\]|=|>|<])*", "%s" given', var_export($houseNo, true)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($houseNo) && !is_string($houseNo)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($houseNo)), __LINE__);
        }
        $this->HouseNo = $houseNo;
        return $this;
    }
    /**
     * Get POBox value
     * @return string|null
     */
    public function getPOBox()
    {
        return $this->POBox;
    }
    /**
     * Set POBox value
     * @param string $pOBox
     * @return \Diglin\Swisspost\StructType\Recipient
     */
    public function setPOBox($pOBox = null)
    {
        // validation for constraint: maxLength
        if ((is_scalar($pOBox) && strlen($pOBox) > 35) || (is_array($pOBox) && count($pOBox) > 35)) {
            throw new \InvalidArgumentException(sprintf('Invalid length, please provide an array with 35 element(s) or a scalar of 35 character(s) at most, "%d" length given', is_scalar($pOBox) ? strlen($pOBox) : count($pOBox)), __LINE__);
        }
        // validation for constraint: pattern
        if (is_scalar($pOBox) && !preg_match('/([^\\*|\\\\|\\{|\\}|\\[|\\]|=|>|<])*/', $pOBox)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a scalar value that matches "([^\*|\\|\{|\}|\[|\]|=|>|<])*", "%s" given', var_export($pOBox, true)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($pOBox) && !is_string($pOBox)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($pOBox)), __LINE__);
        }
        $this->POBox = $pOBox;
        return $this;
    }
    /**
     * Get FloorNo value
     * @return string|null
     */
    public function getFloorNo()
    {
        return $this->FloorNo;
    }
    /**
     * Set FloorNo value
     * @param string $floorNo
     * @return \Diglin\Swisspost\StructType\Recipient
     */
    public function setFloorNo($floorNo = null)
    {
        // validation for constraint: maxLength
        if ((is_scalar($floorNo) && strlen($floorNo) > 5) || (is_array($floorNo) && count($floorNo) > 5)) {
            throw new \InvalidArgumentException(sprintf('Invalid length, please provide an array with 5 element(s) or a scalar of 5 character(s) at most, "%d" length given', is_scalar($floorNo) ? strlen($floorNo) : count($floorNo)), __LINE__);
        }
        // validation for constraint: pattern
        if (is_scalar($floorNo) && !preg_match('/([^\\*|\\\\|\\{|\\}|\\[|\\]|=|>|<])*/', $floorNo)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a scalar value that matches "([^\*|\\|\{|\}|\[|\]|=|>|<])*", "%s" given', var_export($floorNo, true)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($floorNo) && !is_string($floorNo)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($floorNo)), __LINE__);
        }
        $this->FloorNo = $floorNo;
        return $this;
    }
    /**
     * Get MailboxNo value
     * @return int|null
     */
    public function getMailboxNo()
    {
        return $this->MailboxNo;
    }
    /**
     * Set MailboxNo value
     * @param int $mailboxNo
     * @return \Diglin\Swisspost\StructType\Recipient
     */
    public function setMailboxNo($mailboxNo = null)
    {
        // validation for constraint: totalDigits
        if (is_float($mailboxNo) && strlen(str_replace(array(' ', '.', ',', '-', '+'), '', $mailboxNo)) !== 10) {
            throw new \InvalidArgumentException(sprintf('Invalid value, the value must at most contain 10 digits, "%d" given', strlen(substr($mailboxNo, strpos($mailboxNo, '.')))), __LINE__);
        }
        // validation for constraint: int
        if (!is_null($mailboxNo) && !is_numeric($mailboxNo)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($mailboxNo)), __LINE__);
        }
        $this->MailboxNo = $mailboxNo;
        return $this;
    }
    /**
     * Get City value
     * @return string|null
     */
    public function getCity()
    {
        return $this->City;
    }
    /**
     * Set City value
     * @param string $city
     * @return \Diglin\Swisspost\StructType\Recipient
     */
    public function setCity($city = null)
    {
        // validation for constraint: maxLength
        if ((is_scalar($city) && strlen($city) > 35) || (is_array($city) && count($city) > 35)) {
            throw new \InvalidArgumentException(sprintf('Invalid length, please provide an array with 35 element(s) or a scalar of 35 character(s) at most, "%d" length given', is_scalar($city) ? strlen($city) : count($city)), __LINE__);
        }
        // validation for constraint: pattern
        if (is_scalar($city) && !preg_match('/([^\\*|\\\\|\\{|\\}|\\[|\\]|=|>|<])*/', $city)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a scalar value that matches "([^\*|\\|\{|\}|\[|\]|=|>|<])*", "%s" given', var_export($city, true)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($city) && !is_string($city)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($city)), __LINE__);
        }
        $this->City = $city;
        return $this;
    }
    /**
     * Get Country value
     * @return string|null
     */
    public function getCountry()
    {
        return $this->Country;
    }
    /**
     * Set Country value
     * @param string $country
     * @return \Diglin\Swisspost\StructType\Recipient
     */
    public function setCountry($country = null)
    {
        // validation for constraint: pattern
        if (is_scalar($country) && !preg_match('/[a-zA-Z]{2}/', $country)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a scalar value that matches "[a-zA-Z]{2}", "%s" given', var_export($country, true)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($country) && !is_string($country)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($country)), __LINE__);
        }
        $this->Country = $country;
        return $this;
    }
    /**
     * Get Hauskey value
     * @return int|null
     */
    public function getHauskey()
    {
        return $this->Hauskey;
    }
    /**
     * Set Hauskey value
     * @param int $hauskey
     * @return \Diglin\Swisspost\StructType\Recipient
     */
    public function setHauskey($hauskey = null)
    {
        // validation for constraint: totalDigits
        if (is_float($hauskey) && strlen(str_replace(array(' ', '.', ',', '-', '+'), '', $hauskey)) !== 13) {
            throw new \InvalidArgumentException(sprintf('Invalid value, the value must at most contain 13 digits, "%d" given', strlen(substr($hauskey, strpos($hauskey, '.')))), __LINE__);
        }
        // validation for constraint: int
        if (!is_null($hauskey) && !is_numeric($hauskey)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($hauskey)), __LINE__);
        }
        $this->Hauskey = $hauskey;
        return $this;
    }
    /**
     * Get Phone value
     * @return string|null
     */
    public function getPhone()
    {
        return $this->Phone;
    }
    /**
     * Set Phone value
     * @param string $phone
     * @return \Diglin\Swisspost\StructType\Recipient
     */
    public function setPhone($phone = null)
    {
        // validation for constraint: maxLength
        if ((is_scalar($phone) && strlen($phone) > 20) || (is_array($phone) && count($phone) > 20)) {
            throw new \InvalidArgumentException(sprintf('Invalid length, please provide an array with 20 element(s) or a scalar of 20 character(s) at most, "%d" length given', is_scalar($phone) ? strlen($phone) : count($phone)), __LINE__);
        }
        // validation for constraint: minLength
        if ((is_scalar($phone) && strlen($phone) < 10) || (is_array($phone) && count($phone) < 10)) {
            throw new \InvalidArgumentException('Invalid length, please provide an array with 10 element(s) or a scalar of 10 character(s) at least', __LINE__);
        }
        // validation for constraint: pattern
        if (is_scalar($phone) && !preg_match('/([^\\*|\\\\|\\{|\\}|\\[|\\]|=|>|<])*/', $phone)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a scalar value that matches "([^\*|\\|\{|\}|\[|\]|=|>|<])*", "%s" given', var_export($phone, true)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($phone) && !is_string($phone)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($phone)), __LINE__);
        }
        $this->Phone = $phone;
        return $this;
    }
    /**
     * Get Mobile value
     * @return string|null
     */
    public function getMobile()
    {
        return $this->Mobile;
    }
    /**
     * Set Mobile value
     * @param string $mobile
     * @return \Diglin\Swisspost\StructType\Recipient
     */
    public function setMobile($mobile = null)
    {
        // validation for constraint: maxLength
        if ((is_scalar($mobile) && strlen($mobile) > 20) || (is_array($mobile) && count($mobile) > 20)) {
            throw new \InvalidArgumentException(sprintf('Invalid length, please provide an array with 20 element(s) or a scalar of 20 character(s) at most, "%d" length given', is_scalar($mobile) ? strlen($mobile) : count($mobile)), __LINE__);
        }
        // validation for constraint: minLength
        if ((is_scalar($mobile) && strlen($mobile) < 10) || (is_array($mobile) && count($mobile) < 10)) {
            throw new \InvalidArgumentException('Invalid length, please provide an array with 10 element(s) or a scalar of 10 character(s) at least', __LINE__);
        }
        // validation for constraint: pattern
        if (is_scalar($mobile) && !preg_match('/([^\\*|\\\\|\\{|\\}|\\[|\\]|=|>|<])*/', $mobile)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a scalar value that matches "([^\*|\\|\{|\}|\[|\]|=|>|<])*", "%s" given', var_export($mobile, true)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($mobile) && !is_string($mobile)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($mobile)), __LINE__);
        }
        $this->Mobile = $mobile;
        return $this;
    }
    /**
     * Get EMail value
     * @return string|null
     */
    public function getEMail()
    {
        return $this->EMail;
    }
    /**
     * Set EMail value
     * @param string $eMail
     * @return \Diglin\Swisspost\StructType\Recipient
     */
    public function setEMail($eMail = null)
    {
        // validation for constraint: maxLength
        if ((is_scalar($eMail) && strlen($eMail) > 160) || (is_array($eMail) && count($eMail) > 160)) {
            throw new \InvalidArgumentException(sprintf('Invalid length, please provide an array with 160 element(s) or a scalar of 160 character(s) at most, "%d" length given', is_scalar($eMail) ? strlen($eMail) : count($eMail)), __LINE__);
        }
        // validation for constraint: pattern
        if (is_scalar($eMail) && !preg_match('/([^\\*|\\\\|\\{|\\}|\\[|\\]|=|>|<])*/', $eMail)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a scalar value that matches "([^\*|\\|\{|\}|\[|\]|=|>|<])*", "%s" given', var_export($eMail, true)), __LINE__);
        }
        // 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 LabelAddress value
     * @return \Diglin\Swisspost\StructType\LabelAddress|null
     */
    public function getLabelAddress()
    {
        return $this->LabelAddress;
    }
    /**
     * Set LabelAddress value
     * @param \Diglin\Swisspost\StructType\LabelAddress $labelAddress
     * @return \Diglin\Swisspost\StructType\Recipient
     */
    public function setLabelAddress(\Diglin\Swisspost\StructType\LabelAddress $labelAddress = null)
    {
        $this->LabelAddress = $labelAddress;
        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 \Diglin\Swisspost\StructType\Recipient
     */
    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__;
    }
}