<?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 AccountInput
 * An account object containing login, type and comment. The password is for security reasons not part of the object. * @property null|string $comment = null The account's comment string.
 * @property null|string $password = null The account's password. IMPORTANT: This field is never populated when being read from the database. This field is only used when setting passwords from the UI
 * @property null|AccountTypeEnum $type = null The account's username.
 * @property null|string $username = null The account's username.
 */
final class AccountInputInputType extends InputType
{
    protected function decorate($name, $value)
    {
        if ($value === null) {
            return null;
        }

        if ($name === 'type') {
            return new AccountTypeEnum($value);
        }

        return $value;
    }
}