<?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 ExecutableInput
 * The data collection executable * @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 $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 ExecutableInputInputType extends InputType
{
    protected function decorate($name, $value)
    {
        if ($value === null) {
            return null;
        }

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

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

        return $value;
    }
}