<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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