<?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 DiagramPreferencesInput
 * The WEB UI diagram preferences. * @property null|DiagramAggregationPreferencesInputInputType $aggregationPreferences = null The aggregation preferences.
 * @property null|iterable|DiagramLabelPreferenceInputInputType[] $diagramNodeLabelPreferences = null The diagram node label preferences.
 * @property null|IconSetEnum $iconSet = null The diagram icon set.
 * @property null|int $nodeSize = null The diagram node size.
 * @property null|iterable|DiagramTemplatePreferencesInputInputType[] $templatePreferences = null The preferences for each relations template.
 */
final class DiagramPreferencesInputInputType extends InputType
{
    protected function decorate($name, $value)
    {
        if ($value === null) {
            return null;
        }

        if ($name === 'aggregationPreferences') {
            return new DiagramAggregationPreferencesInputInputType($value);
        }

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

        if ($name === 'iconSet') {
            return new IconSetEnum($value);
        }

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

        return $value;
    }
}