<?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 CustomAttributeInfoInput
 * The custom attribute info * @property null|AttributeTypeEnum $attributeType = null The custom attribute type
 * @property bool $builtIn The custom attribute built in flag
 * @property null|string $cachedPath = null The cached path
 * @property null|iterable|CustomAttributeInfoInputInputType[] $children = null The custom attributes
 * @property null|iterable $collectionElements = null The collection elements
 * @property null|string $correlationId = null A helper id set by Web UI for new attributes
 * @property null|string $description = null The custom attribute description
 * @property null|bool $enabled = null The custom attribute enabled flag
 * @property null|iterable|string[] $enumValues = null The custom attribute enum values
 * @property mixed $id = null The custom attribute id
 * @property null|int $keepHistoryForHours = null The custom attribute keep history for hours value
 * @property null|string $name = null The custom attribute name
 * @property null|int $orderNumber = null The custom attribute order number
 * @property null|CustomAttributeInfoInputInputType $parent = null The custom attribute parent
 * @property null|string $path = null The path
 */
final class CustomAttributeInfoInputInputType extends InputType
{
    protected function decorate($name, $value)
    {
        if ($value === null) {
            return null;
        }

        if ($name === 'attributeType') {
            return new AttributeTypeEnum($value);
        }

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

        if ($name === 'parent') {
            return new CustomAttributeInfoInputInputType($value);
        }

        return $value;
    }
}