<?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 ServiceInput
 * A service/daemon. * @property mixed $creationTime = null The time when the service was detected for the first time.
 * @property null|iterable|InstalledServiceInputInputType[] $installations = null The list of installations for this service
 * @property null|string $manufacturer = null The service manufacturer
 * @property null|string $name = null The service name
 */
final class ServiceInputInputType extends InputType
{
    protected function decorate($name, $value)
    {
        if ($value === null) {
            return null;
        }

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

        return $value;
    }
}