Search in sources :

Example 6 with ProtoInterfaceModel

use of com.google.api.codegen.config.ProtoInterfaceModel in project toolkit by googleapis.

the class JavaSurfaceNamer method getGrpcContainerTypeName.

/**
 * The type name of the Grpc container class. This needs to match what Grpc generates for the
 * particular language.
 */
public String getGrpcContainerTypeName(InterfaceModel apiInterface) {
    String fullName = JavaModelTypeNameConverter.getGrpcTypeName(((ProtoInterfaceModel) apiInterface).getInterface()).getFullName();
    NamePath namePath = getTypeNameConverter().getNamePath(fullName);
    String publicClassName = publicClassName(Name.upperCamelKeepUpperAcronyms(namePath.getHead(), "Grpc"));
    return qualifiedName(namePath.withHead(publicClassName));
}
Also used : ProtoInterfaceModel(com.google.api.codegen.config.ProtoInterfaceModel) NamePath(com.google.api.codegen.util.NamePath)

Aggregations

ProtoInterfaceModel (com.google.api.codegen.config.ProtoInterfaceModel)6 NamePath (com.google.api.codegen.util.NamePath)2 Interface (com.google.api.tools.framework.model.Interface)2 TreeMap (java.util.TreeMap)2 ApiModel (com.google.api.codegen.config.ApiModel)1 FieldConfig (com.google.api.codegen.config.FieldConfig)1 GapicInterfaceConfig (com.google.api.codegen.config.GapicInterfaceConfig)1 GapicProductConfig (com.google.api.codegen.config.GapicProductConfig)1 InterfaceConfig (com.google.api.codegen.config.InterfaceConfig)1 InterfaceModel (com.google.api.codegen.config.InterfaceModel)1 ProtoApiModel (com.google.api.codegen.config.ProtoApiModel)1 SingleResourceNameConfig (com.google.api.codegen.config.SingleResourceNameConfig)1 SurfaceNamer (com.google.api.codegen.transformer.SurfaceNamer)1 LongRunningOperationDetailView (com.google.api.codegen.viewmodel.LongRunningOperationDetailView)1 PageStreamingDescriptorClassView (com.google.api.codegen.viewmodel.PageStreamingDescriptorClassView)1 RetryConfigDefinitionView (com.google.api.codegen.viewmodel.RetryConfigDefinitionView)1 StaticLangApiMethodView (com.google.api.codegen.viewmodel.StaticLangApiMethodView)1 StaticLangClientFileView (com.google.api.codegen.viewmodel.StaticLangClientFileView)1 TocContentView (com.google.api.codegen.viewmodel.metadata.TocContentView)1 Method (com.google.api.tools.framework.model.Method)1