docs: public static String generate(ClientConfig clientConfig, int indent) {
          Preconditions.isNotNull(clientConfig, "ClientConfig");
  
          StringBuilder xml = new StringBuilder();
          xml.append("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>");
          XmlGenerator gen = new XmlGenerator(xml);
  
          gen.open("hazelcast-client", "xmlns", "http://www.hazelcast.com/schema/client-config",
                  "xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance",
                  "xsi:schemaLocation", "http://www.hazelcast.com/schema/client-config "
                          + "http://www.hazelcast.com/schema/client-config/hazelcast-client-config-4.0.xsd");
  
          //GroupConfig
          group(gen, clientConfig.getGroupConfig());
          //InstanceName
          gen.node("instance-name", clientConfig.getInstanceName());
          //attributes
          gen.appendLabels(clientConfig.getLabels());
          //Properties
          gen.appendProperties(clientConfig.getProperties());
          //Network
          network(gen, clientConfig.getNetworkConfig());
          //ExecutorPoolSize
          if (clientConfig.getExecutorPoolSize() > 0) {
              gen.node("executor-pool-size", clientConfig.getExecutorPoolSize());
          }
          //Security
          security(gen, clientConfig.getSecurityConfig());
          //Listeners
          listener(gen, clientConfig.getListenerConfigs());
          //Serialization
          serialization(gen, clientConfig.getSerializationConfig());
          //Native
          nativeMemory(gen, clientConfig.getNativeMemoryConfig());
          //ProxyFactories
          proxyFactory(gen, clientConfig.getProxyFactoryConfigs());
          //LoadBalancer
          loadBalancer(gen, clientConfig.getLoadBalancer());
          //NearCache
          nearCaches(gen, clientConfig.getNearCacheConfigMap());
          //QueryCaches
          queryCaches(gen, clientConfig.getQueryCacheConfigs());
          //ConnectionStrategy
          ClientConnectionStrategyConfig connectionStrategy = clientConfig.getConnectionStrategyConfig();
          gen.node("connection-strategy", null, "async-start", connectionStrategy.isAsyncStart(),
                  "reconnect-mode", connectionStrategy.getReconnectMode());
          //UserCodeDeployment
          userCodeDeployment(gen, clientConfig.getUserCodeDeploymentConfig());
          //FlakeIdGenerator
          flakeIdGenerator(gen, clientConfig.getFlakeIdGeneratorConfigMap());
  
          //close HazelcastClient
          gen.close();
  
          return format(xml.toString(), indent);
      }