<?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 SoftwareMeteringFilterInput
 * A software metering filter * @property null|string $description = null The filter description
 * @property null|iterable|SoftwareMeteringFilterValueInputInputType[] $filterEntries = null The filter entries
 * @property mixed $id The filter id
 * @property null|string $tag = null The filter tag
 * @property null|SoftwareMeteringTemplateTypeEnum $type = null The filter type
 * @property null|string $uuid = null The filter uuid
 */
final class SoftwareMeteringFilterInputInputType extends InputType
{
    protected function decorate($name, $value)
    {
        if ($value === null) {
            return null;
        }

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

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

        return $value;
    }
}