use of com.spectralogic.ds3autogen.python.model.request.ConstructorParam in project ds3_autogen by SpectraLogic.
the class ObjectsPayloadGenerator method toOptionalConstructorParams.
/**
* Gets the sorted list of optional constructor parameters including the request payload
*/
@Override
public ImmutableList<ConstructorParam> toOptionalConstructorParams(final Ds3Request ds3Request) {
final ImmutableList.Builder<Arguments> builder = ImmutableList.builder();
builder.addAll(toOptionalArgumentsList(ds3Request.getOptionalQueryParams()));
if (isEjectStorageDomainBlobsRequest(ds3Request)) {
builder.add(new Arguments(FILE_OBJECTS_TYPE, OBJECTS_NAME));
}
return builder.build().stream().sorted(new CustomArgumentComparator()).map(arg -> new ConstructorParam(camelToUnderscore(arg.getName()), true)).collect(GuavaCollectors.immutableList());
}
use of com.spectralogic.ds3autogen.python.model.request.ConstructorParam in project ds3_autogen by SpectraLogic.
the class PutObjectRequestGenerator method toOptionalConstructorParams.
/**
* Gets the sorted list of optional constructor params with headers
*/
@Override
public ImmutableList<ConstructorParam> toOptionalConstructorParams(final Ds3Request ds3Request) {
final ImmutableList.Builder<Arguments> builder = ImmutableList.builder();
builder.addAll(toOptionalArgumentsList(ds3Request.getOptionalQueryParams()));
builder.add(new Arguments("", "headers"));
return builder.build().stream().sorted(new CustomArgumentComparator()).map(arg -> new ConstructorParam(camelToUnderscore(arg.getName()), true)).collect(GuavaCollectors.immutableList());
}
Aggregations