<?php

namespace \NineDotMedia\viapost-php;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for SendLetterWithStructuredAddressResponse StructType
 * @subpackage Structs
 */
class SendLetterWithStructuredAddressResponse extends AbstractStructBase
{
    /**
     * The SendLetterWithStructuredAddressResult
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var bool
     */
    public $SendLetterWithStructuredAddressResult;
    /**
     * The PafCode
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var int
     */
    public $PafCode;
    /**
     * The myCustomerAPILetter
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \\NineDotMedia\viapost-php\CustomerAPILetter
     */
    public $myCustomerAPILetter;
    /**
     * The ReturnMessage
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $ReturnMessage;
    /**
     * Constructor method for SendLetterWithStructuredAddressResponse
     * @uses SendLetterWithStructuredAddressResponse::setSendLetterWithStructuredAddressResult()
     * @uses SendLetterWithStructuredAddressResponse::setPafCode()
     * @uses SendLetterWithStructuredAddressResponse::setMyCustomerAPILetter()
     * @uses SendLetterWithStructuredAddressResponse::setReturnMessage()
     * @param bool $sendLetterWithStructuredAddressResult
     * @param int $pafCode
     * @param \\NineDotMedia\viapost-php\CustomerAPILetter $myCustomerAPILetter
     * @param string $returnMessage
     */
    public function __construct($sendLetterWithStructuredAddressResult = null, $pafCode = null, \\NineDotMedia\viapost-php\CustomerAPILetter $myCustomerAPILetter = null, $returnMessage = null)
    {
        $this
            ->setSendLetterWithStructuredAddressResult($sendLetterWithStructuredAddressResult)
            ->setPafCode($pafCode)
            ->setMyCustomerAPILetter($myCustomerAPILetter)
            ->setReturnMessage($returnMessage);
    }
    /**
     * Get SendLetterWithStructuredAddressResult value
     * @return bool
     */
    public function getSendLetterWithStructuredAddressResult()
    {
        return $this->SendLetterWithStructuredAddressResult;
    }
    /**
     * Set SendLetterWithStructuredAddressResult value
     * @param bool $sendLetterWithStructuredAddressResult
     * @return \\NineDotMedia\viapost-php\SendLetterWithStructuredAddressResponse
     */
    public function setSendLetterWithStructuredAddressResult($sendLetterWithStructuredAddressResult = null)
    {
        // validation for constraint: boolean
        if (!is_null($sendLetterWithStructuredAddressResult) && !is_bool($sendLetterWithStructuredAddressResult)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($sendLetterWithStructuredAddressResult, true), gettype($sendLetterWithStructuredAddressResult)), __LINE__);
        }
        $this->SendLetterWithStructuredAddressResult = $sendLetterWithStructuredAddressResult;
        return $this;
    }
    /**
     * Get PafCode value
     * @return int
     */
    public function getPafCode()
    {
        return $this->PafCode;
    }
    /**
     * Set PafCode value
     * @param int $pafCode
     * @return \\NineDotMedia\viapost-php\SendLetterWithStructuredAddressResponse
     */
    public function setPafCode($pafCode = null)
    {
        // validation for constraint: int
        if (!is_null($pafCode) && !(is_int($pafCode) || ctype_digit($pafCode))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($pafCode, true), gettype($pafCode)), __LINE__);
        }
        $this->PafCode = $pafCode;
        return $this;
    }
    /**
     * Get myCustomerAPILetter value
     * @return \\NineDotMedia\viapost-php\CustomerAPILetter|null
     */
    public function getMyCustomerAPILetter()
    {
        return $this->myCustomerAPILetter;
    }
    /**
     * Set myCustomerAPILetter value
     * @param \\NineDotMedia\viapost-php\CustomerAPILetter $myCustomerAPILetter
     * @return \\NineDotMedia\viapost-php\SendLetterWithStructuredAddressResponse
     */
    public function setMyCustomerAPILetter(\\NineDotMedia\viapost-php\CustomerAPILetter $myCustomerAPILetter = null)
    {
        $this->myCustomerAPILetter = $myCustomerAPILetter;
        return $this;
    }
    /**
     * Get ReturnMessage value
     * @return string|null
     */
    public function getReturnMessage()
    {
        return $this->ReturnMessage;
    }
    /**
     * Set ReturnMessage value
     * @param string $returnMessage
     * @return \\NineDotMedia\viapost-php\SendLetterWithStructuredAddressResponse
     */
    public function setReturnMessage($returnMessage = null)
    {
        // validation for constraint: string
        if (!is_null($returnMessage) && !is_string($returnMessage)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($returnMessage, true), gettype($returnMessage)), __LINE__);
        }
        $this->ReturnMessage = $returnMessage;
        return $this;
    }
}
