use of com.google.api.codegen.viewmodel.SettingsDocView in project toolkit by googleapis.
the class JavaSurfaceTransformer method generateSettingsDoc.
private SettingsDocView generateSettingsDoc(InterfaceContext context, StaticLangApiMethodView exampleApiMethod, GapicProductConfig productConfig, String settingsClassName, String apiClassName) {
SurfaceNamer namer = context.getNamer();
SettingsDocView.Builder settingsDoc = SettingsDocView.newBuilder();
ApiModel model = context.getApiModel();
settingsDoc.serviceAddress(model.getServiceAddress());
settingsDoc.servicePort(model.getServicePort());
settingsDoc.transportProtocol(productConfig.getTransportProtocol());
settingsDoc.exampleApiMethodName(exampleApiMethod.name());
settingsDoc.exampleApiMethodSettingsGetter(exampleApiMethod.settingsGetterName());
settingsDoc.apiClassName(apiClassName);
settingsDoc.settingsVarName(namer.getApiSettingsVariableName(context.getInterfaceConfig()));
settingsDoc.settingsClassName(settingsClassName);
settingsDoc.settingsBuilderVarName(namer.getApiSettingsBuilderVarName(context.getInterfaceConfig()));
settingsDoc.hasDefaultInstance(context.getInterfaceConfig().hasDefaultInstance());
return settingsDoc.build();
}
use of com.google.api.codegen.viewmodel.SettingsDocView in project toolkit by googleapis.
the class CSharpGapicClientTransformer method generateSettingsDoc.
public SettingsDocView generateSettingsDoc(GapicInterfaceContext context) {
SurfaceNamer namer = context.getNamer();
SettingsDocView.Builder settingsDoc = SettingsDocView.newBuilder();
ApiModel model = context.getApiModel();
settingsDoc.serviceAddress(model.getServiceAddress());
settingsDoc.servicePort(model.getServicePort());
// Unused in C#
settingsDoc.exampleApiMethodName("");
// Unused in C#
settingsDoc.exampleApiMethodSettingsGetter("");
settingsDoc.apiClassName(namer.getApiWrapperClassName(context.getInterfaceConfig()));
settingsDoc.settingsVarName(namer.getApiSettingsVariableName(context.getInterfaceConfig()));
settingsDoc.settingsClassName(namer.getApiSettingsClassName(context.getInterfaceConfig()));
settingsDoc.settingsBuilderVarName(namer.getApiSettingsBuilderVarName(context.getInterfaceConfig()));
settingsDoc.hasDefaultInstance(context.getInterfaceConfig().hasDefaultInstance());
return settingsDoc.build();
}
Aggregations