<?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 ThycoticFolderInput
 * A folder within the Thycotic password management system * @property null|iterable|ThycoticSecretServerAccountInputInputType[] $accounts = null The list of Thycotic accounts assigned to this folder
 * @property mixed $id = null The Thycotic folder ID
 * @property null|string $name = null The folder name
 * @property null|iterable|ThycoticFolderInputInputType[] $subfolders = null The list of Thycotic subfolders folder
 */
final class ThycoticFolderInputInputType extends InputType
{
    protected function decorate($name, $value)
    {
        if ($value === null) {
            return null;
        }

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

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

        return $value;
    }
}