<?php

declare (strict_types=1);
namespace idoit\Module\JDisc\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 DataCollectionInfoInput
 * The data collection info * @property bool $builtIn The builtIn flag
 * @property null|ScriptCollectionTypeEnum $collectionType = null The data collection type
 * @property null|string $commandLine = null The command line
 * @property null|string $description = null The description
 * @property null|string $filename = null The filename
 * @property mixed $id = null The id
 * @property null|string $name = null The name
 * @property null|string $oldCommandLine = null The old command line
 * @property null|string $oldDescription = null The old description
 * @property null|string $oldFilename = null The old filename
 * @property null|string $oldName = null The old name
 * @property null|string $oldPowershellVersion = null The old powershell version
 * @property bool $oldRunAsAdmin The old runAsAdmin flag
 * @property null|string $oldScriptContent = null The old script content
 * @property null|DataCollectionTypeEnum $oldType = null The old type
 * @property null|string $powershellVersion = null The powershell version
 * @property bool $runAsAdmin The runAsAdmin flag
 * @property null|string $scriptContent = null The script content
 * @property null|DataCollectionTypeEnum $type = null The type
 */
final class DataCollectionInfoInputInputType extends InputType
{
    protected function decorate($name, $value)
    {
        if ($value === null) {
            return null;
        }

        if ($name === 'collectionType') {
            return new ScriptCollectionTypeEnum($value);
        }

        if ($name === 'oldType') {
            return new DataCollectionTypeEnum($value);
        }

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

        return $value;
    }
}