<?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 GraphQLSshAccount
 * Class for storing ssh key and account data * @property null|string $account = null account for the ssh key
 * @property null|AccountTypeEnum $accountType = null account type for the ssh key
 * @property null|string $description = null a description for the ssh key
 * @property null|int $lengthInBits = null the length in bits
 * @property null|string $name = null name for the ssh key
 * @property null|string $passphrase = null the passphrase
 * @property null|string $privateKey = null the private key
 * @property null|string $publicKey = null the public key
 * @property null|SshKeyTypeEnum $sshKeyType = null the ssh key type
 */
final class GraphQLSshAccountInputType extends InputType
{
    protected function decorate($name, $value)
    {
        if ($value === null) {
            return null;
        }

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

        if ($name === 'sshKeyType') {
            return new SshKeyTypeEnum($value);
        }

        return $value;
    }
}