<?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 CyberarkServerNodeInput
 * This cyberark secret server node. * @property null|iterable $children = null Children of a tree node
 * @property mixed $data = null The node data
 * @property null|GraphQLNodeDataTypeEnum $dataType = null The node data type
 * @property null|bool $draggable = null The tree node draggable flag
 * @property null|bool $droppable = null The tree node droppable flag
 * @property null|bool $expanded = null The tree node expanded flag
 * @property null|IconKeyEnum $icon = null The tree node icon
 * @property null|string $key = null The tree node key
 * @property null|string $label = null The tree node label
 * @property null|bool $selectable = null The tree node selectable flag
 * @property null|string $style = null The tree node style
 */
final class CyberarkServerNodeInputInputType extends InputType
{
    protected function decorate($name, $value)
    {
        if ($value === null) {
            return null;
        }

        if ($name === 'dataType') {
            return new GraphQLNodeDataTypeEnum($value);
        }

        if ($name === 'icon') {
            return new IconKeyEnum($value);
        }

        return $value;
    }
}