<?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 ServiceInput
 * A service/daemon. * @property null|iterable|ClientAccessLicenseInputInputType[] $clientAccessLicenses = null Gets the list of client access licenses for this service
 * @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|iterable|IssuedClientAccessLicenseInputInputType[] $issuedClientAccessLicenses = null Gets the list of issued client access licenses 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 === 'clientAccessLicenses') {
            return (function($value) {foreach($value as $v) yield ($v === null ? null : new ClientAccessLicenseInputInputType($v)); })($value);
        }

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

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

        return $value;
    }
}