@Override public String getFullNameFor(TypeModel type) { if (type instanceof DiscoveryRequestType) { Method method = ((DiscoveryRequestType) type).parentMethod().getDiscoMethod(); return discoGapicNamer.getRequestTypeName(method, languageNamer).getFullName(); } return typeFormatter.getFullNameFor(type); }
@Override public TypeName getTypeName(TypeModel type) { if (type instanceof DiscoveryRequestType) { Method method = ((DiscoveryRequestType) type).parentMethod().getDiscoMethod(); return getDiscoGapicNamer().getRequestTypeName(method, getNamer()); } if (type.isEmptyType()) { return getTypeNameForElementType(type); } return getTypeName((DiscoveryField) type); }
Method method = ((DiscoveryMethodModel) methodConfig.getMethodModel()).getDiscoMethod(); namePatternsToMethod.put(DiscoGapicParser.getCanonicalPath(method.flatPath()), method);
if (methodConfigs != null) { for (MethodConfig methodConfig : methodConfigs) { Method method = ((DiscoveryMethodModel) methodConfig.getMethodModel()).getDiscoMethod(); String canonicalMethodPath = DiscoGapicParser.getCanonicalPath(method.flatPath()); for (SingleResourceNameConfig nameConfig : singleResourceNames) {
private HttpMethodView generateHttpFields(MethodContext context) { if (context.getProductConfig().getTransportProtocol().equals(TransportProtocol.HTTP)) { Method method = ((DiscoveryMethodModel) context.getMethodModel()).getDiscoMethod(); HttpMethodView.Builder httpMethodView = HttpMethodView.newBuilder(); httpMethodView.fullMethodName(method.id());
context .getNamer() .privateFieldName(DiscoGapicParser.getRequestName(method.getDiscoMethod())); String requestName = nameFormatter.privateFieldName(Name.anyCamel(symbolTable.getNewSymbol(requestClassId))); Method discoMethod = method.getDiscoMethod(); String resourceName = DiscoGapicParser.getResourceIdentifier(discoMethod.path()).toLowerCamel(); StringBuilder description = context, requestBody, DiscoGapicParser.getMethodInputName(((DiscoveryMethodModel) method).getDiscoMethod()) .toLowerCamel(), symbolTable,