package com.l7tech.external.assertions.gatewaygraphql.server.resolver.query;

import com.l7tech.external.assertions.gatewaygraphql.EntityTypeInfo;
import com.l7tech.external.assertions.gatewaygraphql.server.data.InternalWebApiServiceDTO;
import com.l7tech.external.assertions.gatewaygraphql.server.data.WebApiServiceDTO;
import graphql.schema.DataFetchingEnvironment;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutorService;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import lombok.Generated;
import org.springframework.beans.factory.BeanFactory;

@Deprecated
public class InternalWebApiServiceQueryResolver extends BasicGraphQLQueryResolver {
   @Generated
   private static final Logger c = Logger.getLogger(InternalWebApiServiceQueryResolver.class.getName());
   private final WebApiServiceQueryResolver d;

   public InternalWebApiServiceQueryResolver(ExecutorService var1, BeanFactory var2) {
      super(EntityTypeInfo.INTERNAL_WEB_API_SERVICE, var1);
      this.d = new b(this, var1, var2);
   }

   @Override
   protected Logger getLogger() {
      return c;
   }

   private List<InternalWebApiServiceDTO> a(List<WebApiServiceDTO> var1) {
      return var1.stream().map(InternalWebApiServiceDTO.class::cast).collect(Collectors.toList());
   }

   public CompletableFuture<List<InternalWebApiServiceDTO>> internalWebApiServices(DataFetchingEnvironment var1) {
      return this.d.webApiServices(var1).thenApply(this::a);
   }

   public CompletableFuture<InternalWebApiServiceDTO> internalWebApiServiceByName(String var1, DataFetchingEnvironment var2) {
      return this.d.webApiServiceByName(var1, var2).thenApply(InternalWebApiServiceDTO.class::cast);
   }

   public CompletableFuture<InternalWebApiServiceDTO> internalWebApiServiceByResolutionPath(String var1, DataFetchingEnvironment var2) {
      return this.d.webApiServiceByResolutionPath(var1, var2).thenApply(InternalWebApiServiceDTO.class::cast);
   }

   public CompletableFuture<List<InternalWebApiServiceDTO>> internalWebApiServicesByFolderPath(String var1, DataFetchingEnvironment var2) {
      return this.d.webApiServicesByFolderPath(var1, var2).thenApply(this::a);
   }
}
