<?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 ExecutableCollectionElementInput
 * The executable collection element * @property null|bool $enabled = null The enabled flag
 * @property null|bool $oldEnabled = null The old enabled flag
 * @property null|iterable $oldRules = null The old collection rules
 * @property null|iterable $rules = null The collection rules
 * @property null|CustomAttributeCollectionMethodEnum $collectionMethod = null The collection method
 * @property null|DataCollectionInfoInputInputType $dataCollection = null The data collection info
 */
final class ExecutableCollectionElementInputInputType extends InputType
{
    protected function decorate($name, $value)
    {
        if ($value === null) {
            return null;
        }

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

        if ($name === 'dataCollection') {
            return new DataCollectionInfoInputInputType($value);
        }

        return $value;
    }
}