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

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

        if ($name === 'platform') {
            return new DevicePlatformEnum($value);
        }

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

        return $value;
    }
}