<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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