use of com.google.api.codegen.configgen.nodes.FieldConfigNode in project toolkit by googleapis.
the class PageStreamingMerger method generatePageStreamingNode.
public ConfigNode generatePageStreamingNode(ConfigNode prevNode, MethodModel method) {
ConfigNode pageStreamingNode = new FieldConfigNode(NodeFinder.getNextLine(prevNode), "page_streaming");
ConfigNode requestNode = generatePageStreamingRequestNode(pageStreamingNode, method);
if (requestNode == null) {
return prevNode;
}
ConfigNode responseNode = generatePageStreamingResponseNode(requestNode, method);
if (responseNode == null) {
return prevNode;
}
prevNode.insertNext(pageStreamingNode);
return pageStreamingNode;
}
use of com.google.api.codegen.configgen.nodes.FieldConfigNode in project toolkit by googleapis.
the class RetryMerger method generateRetryDefinitionsNode.
public ConfigNode generateRetryDefinitionsNode(ConfigNode prevNode) {
FieldConfigNode retryCodesDefNode = new FieldConfigNode(NodeFinder.getNextLine(prevNode), "retry_codes_def").setComment(new DefaultComment("Definition for retryable codes."));
prevNode.insertNext(retryCodesDefNode);
generateRetryCodesDefValueNode(retryCodesDefNode);
FieldConfigNode retryParamsDefNode = new FieldConfigNode(NodeFinder.getNextLine(retryCodesDefNode), "retry_params_def").setComment(new DefaultComment("Definition for retry/backoff parameters."));
retryCodesDefNode.insertNext(retryParamsDefNode);
generateRetryParamsDefValueNode(retryParamsDefNode);
return retryParamsDefNode;
}
Aggregations