code: public OperationFuture<List<Group>> defineInfrastructure(InfrastructureConfig... configs) {
          checkNotNull(configs, "array of InfrastructureConfig must be not null");
  
          Arrays.asList(configs).stream()
              .map(InfrastructureConfig::getAlertPolicies)
              .flatMap(List::stream)
              .forEach(alertConfig -> {
                      List<AlertPolicyMetadata> policies = policyService.alert().find(
                          new AlertPolicyFilter().names(alertConfig.getName())
                      );
  
                      if (policies.size() == 0) {
                          policyService.alert().create(alertConfig).waitUntilComplete();
                      }
              }
          );
  
          List<OperationFuture<Group>> operationFutures = Arrays.asList(configs).stream()
              .map(cfg ->
                  cfg.getDataCenters().stream()
                      .map(dc -> {
                              defineAntiAffinityPolicies(dc, cfg.getAntiAffinityPolicies());
  
                              return cfg.getSubitems().stream()
                                  .map(subCfg -> defineGroupHierarchy(dc, subCfg))
                                  .collect(toList());
                          }
                      )
                      .collect(toList())
              )
              .flatMap(List::stream)
              .flatMap(List::stream)
              .collect(toList());
  
          List<Group> groups = operationFutures.stream()
              .map(OperationFuture::getResult)
              .collect(toList());
  
          List<JobFuture> futures = operationFutures.stream()
              .map(OperationFuture::jobFuture)
              .collect(toList());
  
          return new OperationFuture<>(groups, new ParallelJobsFuture(futures));
      }
docs: Create group hierarchy based on {@link InfrastructureConfig} instance.<br>
  Existing groups are not override!
  
  @param configs group hierarchy configs
  @return OperationFuture wrapper for list of root groups in each data center