<?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 RegistryCollectionElementInput
 * The Windows registry collection element defines Windows registry keys to collect * @property null|bool $enabled = null The enabled flag
 * @property null|RegistryKeyEnum $key = null The registry key
 * @property null|bool $oldEnabled = null The old enabled flag
 * @property null|RegistryKeyEnum $oldKey = null The old registry key
 * @property null|string $oldPathName = null The old registry path name
 * @property null|iterable $oldRules = null The old collection rules
 * @property null|string $oldValueName = null The old registry value name
 * @property null|string $pathName = null The registry path name
 * @property null|iterable $rules = null The collection rules
 * @property null|string $valueName = null The registry value name
 * @property null|CustomAttributeCollectionMethodEnum $collectionMethod = null The collection method
 */
final class RegistryCollectionElementInputInputType extends InputType
{
    protected function decorate($name, $value)
    {
        if ($value === null) {
            return null;
        }

        if ($name === 'key') {
            return new RegistryKeyEnum($value);
        }

        if ($name === 'oldKey') {
            return new RegistryKeyEnum($value);
        }

        if ($name === 'collectionMethod') {
            return new CustomAttributeCollectionMethodEnum($value);
        }

        return $value;
    }
}