<?php

declare (strict_types=1);
namespace idoit\Module\SyneticsJdisc\Graphql\Schema\UnionResolveType;

use GraphQL\Type\Definition\ResolveInfo;
use Axtiva\FlexibleGraphql\Resolver\UnionResolveTypeInterface;
use idoit\Module\SyneticsJdisc\Graphql\Schema\Model\AceBITPasswordDepotServerType;
use idoit\Module\SyneticsJdisc\Graphql\Schema\Model\CyberarkServerDataType;
use idoit\Module\SyneticsJdisc\Graphql\Schema\Model\ManageEnginePMPServerType;
use idoit\Module\SyneticsJdisc\Graphql\Schema\Model\PasswordstateServerConnectionType;
use idoit\Module\SyneticsJdisc\Graphql\Schema\Model\ThycoticSecretServerType;

/**
 * This code is @generated by axtiva/flexible-graphql-php
 * and will be regenerated. Do not edit it manually
 */
final class PasswordManagerServerTypeResolver implements UnionResolveTypeInterface
{
    public function __invoke($model, $context, ResolveInfo $info)
    {
        if (isset($model)) {
            switch (get_class($model)) {
                case AceBITPasswordDepotServerType::class:
                    return $info->schema->getType('AceBITPasswordDepotServer');
                case CyberarkServerDataType::class:
                    return $info->schema->getType('CyberarkServerData');
                case ManageEnginePMPServerType::class:
                    return $info->schema->getType('ManageEnginePMPServer');
                case PasswordstateServerConnectionType::class:
                    return $info->schema->getType('PasswordstateServerConnection');
                case ThycoticSecretServerType::class:
                    return $info->schema->getType('ThycoticSecretServer');
            }
        }
        return null;
    }
}