<?php

namespace NineDotMedia\viapost-php\Struct;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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