All Downloads are FREE. Search and download functionalities are using the official Maven repository.

templates.JavaClient.txt.ClientPowerApi.template.scala Maven / Gradle / Ivy


package templates.JavaClient.txt

import _root_.play.twirl.api.TwirlFeatureImports._
import _root_.play.twirl.api.TwirlHelperImports._
import _root_.play.twirl.api.Html
import _root_.play.twirl.api.JavaScript
import _root_.play.twirl.api.Txt
import _root_.play.twirl.api.Xml

object ClientPowerApi extends _root_.play.twirl.api.BaseScalaTemplate[play.twirl.api.TxtFormat.Appendable,_root_.play.twirl.api.Format[play.twirl.api.TxtFormat.Appendable]](play.twirl.api.TxtFormat) with _root_.play.twirl.api.Template1[org.apache.pekko.grpc.gen.javadsl.Service,play.twirl.api.TxtFormat.Appendable] {

  /*
 * Copyright (C) 2018-2021 Lightbend Inc. 
 */
  def apply/*14.2*/(service: org.apache.pekko.grpc.gen.javadsl.Service):play.twirl.api.TxtFormat.Appendable = {
    _display_ {
      {


Seq[Any](format.raw/*15.1*/("""
"""),_display_(/*16.2*/org/*16.5*/.apache.pekko.grpc.gen.Constants.DoNotEditComment),format.raw/*16.54*/("""
"""),format.raw/*17.1*/("""package """),_display_(/*17.10*/service/*17.17*/.packageName),format.raw/*17.29*/(""";

import org.apache.pekko.grpc.PekkoGrpcGenerated;

"""),_display_(/*21.2*/GenMethodImports(service)),format.raw/*21.27*/("""

"""),format.raw/*23.1*/("""@PekkoGrpcGenerated
public abstract class """),_display_(/*24.24*/{service.name}),format.raw/*24.38*/("""ClientPowerApi """),format.raw/*24.53*/("""{"""),format.raw/*24.54*/("""
  """),_display_(/*25.4*/for(method <- service.methods) yield /*25.34*/ {_display_(Seq[Any](format.raw/*25.36*/("""
    """),format.raw/*26.5*/("""/**
     * Lower level "lifted" version of the method, giving access to request metadata etc.
     * prefer """),_display_(/*28.16*/{method.name}),format.raw/*28.29*/("""("""),_display_(/*28.31*/method/*28.37*/.inputTypeUnboxed),format.raw/*28.54*/(""") if possible.
     */
    """),_display_(if(method.methodType == org.apache.pekko.grpc.gen.Unary)/*30.62*/ {_display_(Seq[Any](format.raw/*30.64*/("""
      """),format.raw/*31.7*/("""public SingleResponseRequestBuilder<"""),_display_(/*31.44*/method/*31.50*/.inputTypeUnboxed),format.raw/*31.67*/(""", """),_display_(/*31.70*/method/*31.76*/.outputTypeUnboxed),format.raw/*31.94*/("""> """),_display_(/*31.97*/{method.name}),format.raw/*31.110*/("""()
    """)))}else if(method.methodType == org.apache.pekko.grpc.gen.ClientStreaming)/*32.78*/{_display_(Seq[Any](format.raw/*32.79*/("""
      """),format.raw/*33.7*/("""public SingleResponseRequestBuilder, """),_display_(/*33.136*/method/*33.142*/.outputTypeUnboxed),format.raw/*33.160*/("""> """),_display_(/*33.163*/{method.name}),format.raw/*33.176*/("""()
    """)))}else if(method.methodType == org.apache.pekko.grpc.gen.ServerStreaming)/*34.78*/{_display_(Seq[Any](format.raw/*34.79*/("""
      """),format.raw/*35.7*/("""public StreamResponseRequestBuilder<"""),_display_(/*35.44*/method/*35.50*/.inputTypeUnboxed),format.raw/*35.67*/(""", """),_display_(/*35.70*/method/*35.76*/.outputTypeUnboxed),format.raw/*35.94*/("""> """),_display_(/*35.97*/{method.name}),format.raw/*35.110*/("""()
    """)))}else if(method.methodType == org.apache.pekko.grpc.gen.BidiStreaming)/*36.76*/{_display_(Seq[Any](format.raw/*36.77*/("""
      """),format.raw/*37.7*/("""public StreamResponseRequestBuilder, """),_display_(/*37.136*/method/*37.142*/.outputTypeUnboxed),format.raw/*37.160*/("""> """),_display_(/*37.163*/{method.name}),format.raw/*37.176*/("""()
    """)))} else {null} ),format.raw/*38.6*/("""
    """),format.raw/*39.5*/("""{"""),format.raw/*39.6*/("""
        """),format.raw/*40.9*/("""throw new java.lang.UnsupportedOperationException();
    """),format.raw/*41.5*/("""}"""),format.raw/*41.6*/("""
  """)))}),format.raw/*42.4*/("""
"""),format.raw/*43.1*/("""}"""),format.raw/*43.2*/("""
"""))
      }
    }
  }

  def render(service:org.apache.pekko.grpc.gen.javadsl.Service): play.twirl.api.TxtFormat.Appendable = apply(service)

  def f:((org.apache.pekko.grpc.gen.javadsl.Service) => play.twirl.api.TxtFormat.Appendable) = (service) => apply(service)

  def ref: this.type = this

}


              /*
                  -- GENERATED --
                  SOURCE: codegen/src/main/twirl/templates/JavaClient/ClientPowerApi.scala.txt
                  HASH: d2294bb4748fdd6d452415c31f9f8528976fd794
                  MATRIX: 693->364|839->417|867->419|878->422|948->471|976->472|1012->481|1028->488|1061->500|1141->554|1187->579|1216->581|1286->625|1321->639|1364->654|1393->655|1423->659|1469->689|1509->691|1541->696|1677->805|1711->818|1740->820|1755->826|1793->843|1904->927|1944->929|1978->936|2042->973|2057->979|2095->996|2125->999|2140->1005|2179->1023|2209->1026|2244->1039|2342->1119|2381->1120|2415->1127|2518->1203|2533->1209|2572->1226|2630->1256|2646->1262|2686->1280|2717->1283|2752->1296|2850->1376|2889->1377|2923->1384|2987->1421|3002->1427|3040->1444|3070->1447|3085->1453|3124->1471|3154->1474|3189->1487|3285->1565|3324->1566|3358->1573|3461->1649|3476->1655|3515->1672|3573->1702|3589->1708|3629->1726|3660->1729|3695->1742|3746->1750|3778->1755|3806->1756|3842->1765|3926->1822|3954->1823|3988->1827|4016->1828|4044->1829
                  LINES: 16->14|21->15|22->16|22->16|22->16|23->17|23->17|23->17|23->17|27->21|27->21|29->23|30->24|30->24|30->24|30->24|31->25|31->25|31->25|32->26|34->28|34->28|34->28|34->28|34->28|36->30|36->30|37->31|37->31|37->31|37->31|37->31|37->31|37->31|37->31|37->31|38->32|38->32|39->33|39->33|39->33|39->33|39->33|39->33|39->33|39->33|39->33|40->34|40->34|41->35|41->35|41->35|41->35|41->35|41->35|41->35|41->35|41->35|42->36|42->36|43->37|43->37|43->37|43->37|43->37|43->37|43->37|43->37|43->37|44->38|45->39|45->39|46->40|47->41|47->41|48->42|49->43|49->43
                  -- GENERATED --
              */
          




© 2015 - 2025 Weber Informatics LLC | Privacy Policy