docs: public static Config build(final BaseHazelcastProperties hz) {
          val cluster = hz.getCluster();
          val config = new Config();
  
          config.setLicenseKey(hz.getLicenseKey());
  
          val networkConfig = new NetworkConfig()
              .setPort(cluster.getPort())
              .setPortAutoIncrement(cluster.isPortAutoIncrement());
  
          if (StringUtils.hasText(hz.getCluster().getLocalAddress())) {
              config.setProperty(BaseHazelcastProperties.HAZELCAST_LOCAL_ADDRESS_PROP, hz.getCluster().getLocalAddress());
          }
          if (StringUtils.hasText(hz.getCluster().getPublicAddress())) {
              config.setProperty(BaseHazelcastProperties.HAZELCAST_PUBLIC_ADDRESS_PROP, hz.getCluster().getPublicAddress());
              networkConfig.setPublicAddress(hz.getCluster().getPublicAddress());
          }
  
          if (cluster.getWanReplication().isEnabled()) {
              if (!StringUtils.hasText(hz.getLicenseKey())) {
                  throw new IllegalArgumentException("Cannot activate WAN replication, a Hazelcast enterprise feature, without a license key");
              }
              LOGGER.warn("Using Hazelcast WAN Replication requires a Hazelcast Enterprise subscription. Make sure you "
                  + "have acquired the proper license, SDK and tooling from Hazelcast before activating this feature.");
              buildWanReplicationSettingsForConfig(hz, config);
          }
  
          val joinConfig = cluster.getDiscovery().isEnabled()
              ? createDiscoveryJoinConfig(config, hz.getCluster(), networkConfig)
              : createDefaultJoinConfig(config, hz.getCluster());
          LOGGER.trace("Created Hazelcast join configuration [{}]", joinConfig);
          networkConfig.setJoin(joinConfig);
  
          LOGGER.trace("Created Hazelcast network configuration [{}]", networkConfig);
          config.setNetworkConfig(networkConfig);
  
          return config.setInstanceName(cluster.getInstanceName())
              .setProperty(BaseHazelcastProperties.HAZELCAST_DISCOVERY_ENABLED_PROP, BooleanUtils.toStringTrueFalse(cluster.getDiscovery().isEnabled()))
              .setProperty(BaseHazelcastProperties.IPV4_STACK_PROP, String.valueOf(cluster.isIpv4Enabled()))
              .setProperty(BaseHazelcastProperties.LOGGING_TYPE_PROP, cluster.getLoggingType())
              .setProperty(BaseHazelcastProperties.MAX_HEARTBEAT_SECONDS_PROP, String.valueOf(cluster.getMaxNoHeartbeatSeconds()));
      }