<?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 InventoryUserGroupInfoInput
 * User groups * @property null|string $descr = null User group description
 * @property mixed $id = null User group id
 * @property null|string $name = null User group name
 * @property null|iterable|InventoryUserRightEnum[] $rights = null User group rights
 */
final class InventoryUserGroupInfoInputInputType extends InputType
{
    protected function decorate($name, $value)
    {
        if ($value === null) {
            return null;
        }

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

        return $value;
    }
}