<?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 MailAccountInput
 * The mail account entity * @property null|AuthenticationProtocolEnum $authenticationProtocol = null The mail account authentication protocol
 * @property mixed $creationTime = null The creation time.
 * @property null|EncryptionProtocolEnum $encryptionProtocol = null The mail account encryption protocol
 * @property null|string $id = null The internal id this entity. Note that the id might change when the entity gets deleted and recreated.
 * @property null|string $mailServer = null The mail account mail server
 * @property mixed $modificationTime = null The modification time
 * @property null|string $name = null The mail account name
 * @property null|string $password = null The mail account password
 * @property null|int $port = null The mail account port
 * @property null|string $senderMailAddress = null The mail account sender mail address
 * @property null|string $username = null The mail account username
 */
final class MailAccountInputInputType extends InputType
{
    protected function decorate($name, $value)
    {
        if ($value === null) {
            return null;
        }

        if ($name === 'authenticationProtocol') {
            return new AuthenticationProtocolEnum($value);
        }

        if ($name === 'encryptionProtocol') {
            return new EncryptionProtocolEnum($value);
        }

        return $value;
    }
}