use of com.spectralogic.ds3autogen.api.models.apispec.Ds3Request in project ds3_autogen by SpectraLogic.
the class BaseClientGenerator method toPayloadCommands.
/**
* Converts the Ds3Requests with a response type into Payload Commands
*/
protected static ImmutableList<PayloadCommand> toPayloadCommands(final ImmutableList<Ds3Request> ds3Requests, final Ds3DocSpec docSpec) {
final ImmutableList.Builder<PayloadCommand> builder = ImmutableList.builder();
final ImmutableList<Ds3Request> payloadRequests = getRequestsBasedOnResponsePayload(ds3Requests, true);
for (final Ds3Request ds3Request : payloadRequests) {
builder.add(toPayloadCommand(ds3Request, docSpec));
}
return builder.build();
}
use of com.spectralogic.ds3autogen.api.models.apispec.Ds3Request in project ds3_autogen by SpectraLogic.
the class NetCodeGenerator method generateCommands.
/**
* Generates all code associated with the Ds3ApiSpec
*/
private void generateCommands(final ImmutableList<Ds3Request> requests, final ImmutableMap<String, Ds3Type> typeMap, final Ds3DocSpec docSpec) throws TemplateException, IOException {
if (isEmpty(requests)) {
LOG.info("There were no requests to generate");
return;
}
for (final Ds3Request request : requests) {
generateRequest(request, typeMap, docSpec);
generateResponseAndParser(request);
}
}
Aggregations