<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GetGenresByShowId-Response StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:GetGenresByShowId-Response
 * @subpackage Structs
 */
class GetGenresByShowId_Response extends ExtensibleDataContract
{
    /**
     * The GenreItems
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\ArrayType\ArrayOfShowGenreItem
     */
    public $GenreItems;
    /**
     * Constructor method for GetGenresByShowId-Response
     * @uses GetGenresByShowId_Response::setGenreItems()
     * @param \patest\ArrayType\ArrayOfShowGenreItem $genreItems
     */
    public function __construct(\patest\ArrayType\ArrayOfShowGenreItem $genreItems = null)
    {
        $this
            ->setGenreItems($genreItems);
    }
    /**
     * Get GenreItems 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\ArrayOfShowGenreItem|null
     */
    public function getGenreItems()
    {
        return isset($this->GenreItems) ? $this->GenreItems : null;
    }
    /**
     * Set GenreItems 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\ArrayOfShowGenreItem $genreItems
     * @return \patest\StructType\GetGenresByShowId_Response
     */
    public function setGenreItems(\patest\ArrayType\ArrayOfShowGenreItem $genreItems = null)
    {
        if (is_null($genreItems) || (is_array($genreItems) && empty($genreItems))) {
            unset($this->GenreItems);
        } else {
            $this->GenreItems = $genreItems;
        }
        return $this;
    }
}
