<?php

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

use GraphQL\Type\Definition\ResolveInfo;
use Axtiva\FlexibleGraphql\Resolver\UnionResolveTypeInterface;
use idoit\Module\JDisc\Graphql\Schema\Model\WebUIAceBITPasswordDepotRootNodeType;
use idoit\Module\JDisc\Graphql\Schema\Model\WebUICyberarkRootNodeType;
use idoit\Module\JDisc\Graphql\Schema\Model\WebUIManageEnginePMPRootNodeType;
use idoit\Module\JDisc\Graphql\Schema\Model\WebUIThycoticRootNodeType;

/**
 * This code is @generated by axtiva/flexible-graphql-php
 * and will be regenerated. Do not edit it manually
 */
final class PasswordManagerRootNodeTypeResolver implements UnionResolveTypeInterface
{
    public function __invoke($model, $context, ResolveInfo $info)
    {
        if (isset($model)) {
            switch (get_class($model)) {
                case WebUIAceBITPasswordDepotRootNodeType::class:
                    return $info->schema->getType('WebUIAceBITPasswordDepotRootNode');
                case WebUICyberarkRootNodeType::class:
                    return $info->schema->getType('WebUICyberarkRootNode');
                case WebUIManageEnginePMPRootNodeType::class:
                    return $info->schema->getType('WebUIManageEnginePMPRootNode');
                case WebUIThycoticRootNodeType::class:
                    return $info->schema->getType('WebUIThycoticRootNode');
            }
        }
        return null;
    }
}