<?php

declare (strict_types=1);
namespace idoit\Module\SyneticsJdisc\Graphql\Schema\Model;

use Axtiva\FlexibleGraphql\Type\InputType;

/**
 * This code is @generated by axtiva/flexible-graphql-php do not edit it
 * PHP representation of graphql type DocumentInfoInput
 * The document info type * @property null|iterable|DocumentInfoInputInputType[] $children = null The document children
 * @property null|string $description = null The document description
 * @property null|string $filename = null The document file name
 * @property mixed $filesize = null The document file size
 * @property mixed $id = null The document id
 * @property mixed $modificationTime = null The document modification time
 * @property null|string $name = null The document name
 * @property null|string $oldDescription = null The document old description
 * @property null|string $oldFilename = null The document old file name
 * @property mixed $oldFilesize = null The document old file size
 * @property mixed $oldModificationTime = null The document modification old time
 * @property null|string $oldName = null The document old name
 * @property null|DocumentTypeEnum $type = null The document type
 */
final class DocumentInfoInputInputType extends InputType
{
    protected function decorate($name, $value)
    {
        if ($value === null) {
            return null;
        }

        if ($name === 'children') {
            return (function($value) {foreach($value as $v) yield ($v === null ? null : new DocumentInfoInputInputType($v)); })($value);
        }

        if ($name === 'type') {
            return new DocumentTypeEnum($value);
        }

        return $value;
    }
}