<?php

namespace \NineDotMedia\viapost-php;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for PreviewLibraryPostcardResponse StructType
 * @subpackage Structs
 */
class PreviewLibraryPostcardResponse extends AbstractStructBase
{
    /**
     * The PreviewLibraryPostcardResult
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var bool
     */
    public $PreviewLibraryPostcardResult;
    /**
     * The postcardData
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $postcardData;
    /**
     * The returnMessage
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $returnMessage;
    /**
     * Constructor method for PreviewLibraryPostcardResponse
     * @uses PreviewLibraryPostcardResponse::setPreviewLibraryPostcardResult()
     * @uses PreviewLibraryPostcardResponse::setPostcardData()
     * @uses PreviewLibraryPostcardResponse::setReturnMessage()
     * @param bool $previewLibraryPostcardResult
     * @param string $postcardData
     * @param string $returnMessage
     */
    public function __construct($previewLibraryPostcardResult = null, $postcardData = null, $returnMessage = null)
    {
        $this
            ->setPreviewLibraryPostcardResult($previewLibraryPostcardResult)
            ->setPostcardData($postcardData)
            ->setReturnMessage($returnMessage);
    }
    /**
     * Get PreviewLibraryPostcardResult value
     * @return bool
     */
    public function getPreviewLibraryPostcardResult()
    {
        return $this->PreviewLibraryPostcardResult;
    }
    /**
     * Set PreviewLibraryPostcardResult value
     * @param bool $previewLibraryPostcardResult
     * @return \\NineDotMedia\viapost-php\PreviewLibraryPostcardResponse
     */
    public function setPreviewLibraryPostcardResult($previewLibraryPostcardResult = null)
    {
        // validation for constraint: boolean
        if (!is_null($previewLibraryPostcardResult) && !is_bool($previewLibraryPostcardResult)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($previewLibraryPostcardResult, true), gettype($previewLibraryPostcardResult)), __LINE__);
        }
        $this->PreviewLibraryPostcardResult = $previewLibraryPostcardResult;
        return $this;
    }
    /**
     * Get postcardData value
     * @return string|null
     */
    public function getPostcardData()
    {
        return $this->postcardData;
    }
    /**
     * Set postcardData value
     * @param string $postcardData
     * @return \\NineDotMedia\viapost-php\PreviewLibraryPostcardResponse
     */
    public function setPostcardData($postcardData = null)
    {
        // validation for constraint: string
        if (!is_null($postcardData) && !is_string($postcardData)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($postcardData, true), gettype($postcardData)), __LINE__);
        }
        $this->postcardData = $postcardData;
        return $this;
    }
    /**
     * Get returnMessage value
     * @return string|null
     */
    public function getReturnMessage()
    {
        return $this->returnMessage;
    }
    /**
     * Set returnMessage value
     * @param string $returnMessage
     * @return \\NineDotMedia\viapost-php\PreviewLibraryPostcardResponse
     */
    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;
    }
}
