class DiscoveryClientManagement {

    public DiscoveryClient getClient(HttpsdProtocol httpsdProtocol) {
        return createClient(httpsdProtocol, DiscoveryClientInstance.getByName(httpsdProtocol.getDiscoveryClientTypeName()));
    }

    private DiscoveryClient createClient(HttpsdProtocol httpsdProtocol, DiscoveryClientInstance discoveryClientInstance) {
        if (Objects.equals(discoveryClientInstance, DiscoveryClientInstance.NOT_SUPPORT)) {
            return null;
        }

        return doCreateClient(httpsdProtocol, discoveryClientInstance);
    }

    private DiscoveryClient doCreateClient(HttpsdProtocol httpsdProtocol, DiscoveryClientInstance discoveryClientInstance) {<FILL_FUNCTION_BODY>}
}

        DiscoveryClient discoveryClient;
        switch (discoveryClientInstance) {
            case CONSUL:
                discoveryClient = new ConsulDiscoveryClient();
                break;
            case NACOS:
                discoveryClient = new NacosDiscoveryClient();
                break;
            default:
                return null;
        }

        discoveryClient.initClient(discoveryClient.buildConnectConfig(httpsdProtocol));
        return discoveryClient;
    
<no_super_class>