<?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 InventoryPermissionsGroupInput
 * Permissions group for users and user groups * @property null|string $descr = null Permissions group description
 * @property mixed $id = null Permissions group id
 * @property null|string $name = null Permissions group name
 * @property null|iterable|InventoryUserRightEnum[] $rights = null Permissions group rights
 */
final class InventoryPermissionsGroupInputInputType 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;
    }
}