<?php

namespace \NineDotMedia\Viapost\Struct;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GetLibraryPostcardsResponse Struct
 * @subpackage Structs
 */
class GetLibraryPostcardsResponse extends AbstractStructBase
{
    /**
     * The GetLibraryPostcardsResult
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var bool
     */
    public $GetLibraryPostcardsResult;
    /**
     * The postcards
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \\NineDotMedia\Viapost\Array\ArrayOfAnyType
     */
    public $postcards;
    /**
     * The returnMessage
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $returnMessage;
    /**
     * Constructor method for GetLibraryPostcardsResponse
     * @uses GetLibraryPostcardsResponse::setGetLibraryPostcardsResult()
     * @uses GetLibraryPostcardsResponse::setPostcards()
     * @uses GetLibraryPostcardsResponse::setReturnMessage()
     * @param bool $getLibraryPostcardsResult
     * @param \\NineDotMedia\Viapost\Array\ArrayOfAnyType $postcards
     * @param string $returnMessage
     */
    public function __construct($getLibraryPostcardsResult = null, \\NineDotMedia\Viapost\Array\ArrayOfAnyType $postcards = null, $returnMessage = null)
    {
        $this
            ->setGetLibraryPostcardsResult($getLibraryPostcardsResult)
            ->setPostcards($postcards)
            ->setReturnMessage($returnMessage);
    }
    /**
     * Get GetLibraryPostcardsResult value
     * @return bool
     */
    public function getGetLibraryPostcardsResult()
    {
        return $this->GetLibraryPostcardsResult;
    }
    /**
     * Set GetLibraryPostcardsResult value
     * @param bool $getLibraryPostcardsResult
     * @return \\NineDotMedia\Viapost\Struct\GetLibraryPostcardsResponse
     */
    public function setGetLibraryPostcardsResult($getLibraryPostcardsResult = null)
    {
        // validation for constraint: boolean
        if (!is_null($getLibraryPostcardsResult) && !is_bool($getLibraryPostcardsResult)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($getLibraryPostcardsResult, true), gettype($getLibraryPostcardsResult)), __LINE__);
        }
        $this->GetLibraryPostcardsResult = $getLibraryPostcardsResult;
        return $this;
    }
    /**
     * Get postcards value
     * @return \\NineDotMedia\Viapost\Array\ArrayOfAnyType|null
     */
    public function getPostcards()
    {
        return $this->postcards;
    }
    /**
     * Set postcards value
     * @param \\NineDotMedia\Viapost\Array\ArrayOfAnyType $postcards
     * @return \\NineDotMedia\Viapost\Struct\GetLibraryPostcardsResponse
     */
    public function setPostcards(\\NineDotMedia\Viapost\Array\ArrayOfAnyType $postcards = null)
    {
        $this->postcards = $postcards;
        return $this;
    }
    /**
     * Get returnMessage value
     * @return string|null
     */
    public function getReturnMessage()
    {
        return $this->returnMessage;
    }
    /**
     * Set returnMessage value
     * @param string $returnMessage
     * @return \\NineDotMedia\Viapost\Struct\GetLibraryPostcardsResponse
     */
    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;
    }
}
