<?php

namespace \NineDotMedia\viapost-php;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for SendLetterWithStructuredAddressAndExceptionsResponse
 * StructType
 * @subpackage Structs
 */
class SendLetterWithStructuredAddressAndExceptionsResponse extends AbstractStructBase
{
    /**
     * The SendLetterWithStructuredAddressAndExceptionsResult
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var bool
     */
    public $SendLetterWithStructuredAddressAndExceptionsResult;
    /**
     * 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 SendLetterWithStructuredAddressAndExceptionsResponse
     * @uses SendLetterWithStructuredAddressAndExceptionsResponse::setSendLetterWithStructuredAddressAndExceptionsResult()
     * @uses SendLetterWithStructuredAddressAndExceptionsResponse::setPafCode()
     * @uses SendLetterWithStructuredAddressAndExceptionsResponse::setMyCustomerAPILetter()
     * @uses SendLetterWithStructuredAddressAndExceptionsResponse::setReturnMessage()
     * @param bool $sendLetterWithStructuredAddressAndExceptionsResult
     * @param int $pafCode
     * @param \\NineDotMedia\viapost-php\CustomerAPILetter $myCustomerAPILetter
     * @param string $returnMessage
     */
    public function __construct($sendLetterWithStructuredAddressAndExceptionsResult = null, $pafCode = null, \\NineDotMedia\viapost-php\CustomerAPILetter $myCustomerAPILetter = null, $returnMessage = null)
    {
        $this
            ->setSendLetterWithStructuredAddressAndExceptionsResult($sendLetterWithStructuredAddressAndExceptionsResult)
            ->setPafCode($pafCode)
            ->setMyCustomerAPILetter($myCustomerAPILetter)
            ->setReturnMessage($returnMessage);
    }
    /**
     * Get SendLetterWithStructuredAddressAndExceptionsResult value
     * @return bool
     */
    public function getSendLetterWithStructuredAddressAndExceptionsResult()
    {
        return $this->SendLetterWithStructuredAddressAndExceptionsResult;
    }
    /**
     * Set SendLetterWithStructuredAddressAndExceptionsResult value
     * @param bool $sendLetterWithStructuredAddressAndExceptionsResult
     * @return \\NineDotMedia\viapost-php\SendLetterWithStructuredAddressAndExceptionsResponse
     */
    public function setSendLetterWithStructuredAddressAndExceptionsResult($sendLetterWithStructuredAddressAndExceptionsResult = null)
    {
        // validation for constraint: boolean
        if (!is_null($sendLetterWithStructuredAddressAndExceptionsResult) && !is_bool($sendLetterWithStructuredAddressAndExceptionsResult)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($sendLetterWithStructuredAddressAndExceptionsResult, true), gettype($sendLetterWithStructuredAddressAndExceptionsResult)), __LINE__);
        }
        $this->SendLetterWithStructuredAddressAndExceptionsResult = $sendLetterWithStructuredAddressAndExceptionsResult;
        return $this;
    }
    /**
     * Get PafCode value
     * @return int
     */
    public function getPafCode()
    {
        return $this->PafCode;
    }
    /**
     * Set PafCode value
     * @param int $pafCode
     * @return \\NineDotMedia\viapost-php\SendLetterWithStructuredAddressAndExceptionsResponse
     */
    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\SendLetterWithStructuredAddressAndExceptionsResponse
     */
    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\SendLetterWithStructuredAddressAndExceptionsResponse
     */
    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;
    }
}
