use of com.google.api.codegen.samplegen.v1p2.RequestFieldProto in project toolkit by googleapis.
the class SampleTransformer method sampleParamConfigMapFromRequestConfigs.
private ImmutableMap<String, SampleParameterConfig> sampleParamConfigMapFromRequestConfigs(List<RequestFieldProto> requests) {
ImmutableMap.Builder<String, SampleParameterConfig> builder = ImmutableMap.builder();
for (RequestFieldProto request : requests) {
String field = request.getField();
SampleParameterConfig config = SampleParameterConfig.newBuilder().field(field).isFile(request.getValueIsFile()).inputParameter(request.getInputParameter()).comment(request.getComment()).build();
builder.put(field, config);
}
return builder.build();
}
Aggregations