@*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * license agreements; and to You under the Apache License, version 2.0:
 *
 *   https://www.apache.org/licenses/LICENSE-2.0
 *
 * This file is part of the Apache Pekko project, which was derived from Akka.
 *@

@*
 * Copyright (C) 2018-2021 Lightbend Inc. <https://www.lightbend.com>
 *@

@(service: org.apache.pekko.grpc.gen.javadsl.Service)

@org.apache.pekko.grpc.gen.Constants.DoNotEditComment
package @service.packageName;

import org.apache.pekko.grpc.PekkoGrpcGenerated;

@GenMethodImports(service)

@@PekkoGrpcGenerated
public abstract class @{service.name}ClientPowerApi {
  @for(method <- service.methods) {
    /**
     * Lower level "lifted" version of the method, giving access to request metadata etc.
     * prefer @{method.name}(@method.inputTypeUnboxed) if possible.
     */
    @if(method.methodType == org.apache.pekko.grpc.gen.Unary) {
      public SingleResponseRequestBuilder<@method.inputTypeUnboxed, @method.outputTypeUnboxed> @{method.name}()
    } else if(method.methodType == org.apache.pekko.grpc.gen.ClientStreaming){
      public SingleResponseRequestBuilder<org.apache.pekko.stream.javadsl.Source<@method.inputTypeUnboxed, org.apache.pekko.NotUsed>, @method.outputTypeUnboxed> @{method.name}()
    } else if(method.methodType == org.apache.pekko.grpc.gen.ServerStreaming){
      public StreamResponseRequestBuilder<@method.inputTypeUnboxed, @method.outputTypeUnboxed> @{method.name}()
    } else if(method.methodType == org.apache.pekko.grpc.gen.BidiStreaming){
      public StreamResponseRequestBuilder<org.apache.pekko.stream.javadsl.Source<@method.inputTypeUnboxed, org.apache.pekko.NotUsed>, @method.outputTypeUnboxed> @{method.name}()
    }
    {
        throw new java.lang.UnsupportedOperationException();
    }
  }
}
