use of com.google.api.codegen.SampleInitAttribute in project toolkit by googleapis.
the class SampleTransformer method sampleParamConfigMapFromValueSet.
private ImmutableMap<String, SampleParameterConfig> sampleParamConfigMapFromValueSet(SampleValueSet valueSet) {
ImmutableMap.Builder<String, SampleParameterConfig> builder = ImmutableMap.builder();
for (SampleInitAttribute attr : valueSet.getParameters().getAttributesList()) {
String field = attr.getParameter();
SampleParameterConfig config = SampleParameterConfig.newBuilder().field(field).isFile(attr.getReadFile()).inputParameter(attr.getSampleArgumentName()).comment(attr.getDescription()).build();
builder.put(field, config);
}
return builder.build();
}
Aggregations