<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GetCaptionsByKeysResponse StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:GetCaptionsByKeysResponse
 * @subpackage Structs
 */
class GetCaptionsByKeysResponse extends ExtensibleDataContract
{
    /**
     * The Captions
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\ArrayType\ArrayOfResourceEntry
     */
    public $Captions;
    /**
     * Constructor method for GetCaptionsByKeysResponse
     * @uses GetCaptionsByKeysResponse::setCaptions()
     * @param \patest\ArrayType\ArrayOfResourceEntry $captions
     */
    public function __construct(\patest\ArrayType\ArrayOfResourceEntry $captions = null)
    {
        $this
            ->setCaptions($captions);
    }
    /**
     * Get Captions value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return \patest\ArrayType\ArrayOfResourceEntry|null
     */
    public function getCaptions()
    {
        return isset($this->Captions) ? $this->Captions : null;
    }
    /**
     * Set Captions value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param \patest\ArrayType\ArrayOfResourceEntry $captions
     * @return \patest\StructType\GetCaptionsByKeysResponse
     */
    public function setCaptions(\patest\ArrayType\ArrayOfResourceEntry $captions = null)
    {
        if (is_null($captions) || (is_array($captions) && empty($captions))) {
            unset($this->Captions);
        } else {
            $this->Captions = $captions;
        }
        return $this;
    }
}
