use of com.spectralogic.ds3autogen.python.model.request.ConstructorParam in project ds3_autogen by SpectraLogic.
the class PutObjectRequestGenerator method toRequiredConstructorParams.
/**
* Gets the sorted list of required constructor params, including stream and length
*/
@Override
public ImmutableList<ConstructorParam> toRequiredConstructorParams(final Ds3Request ds3Request) {
final ImmutableList.Builder<Arguments> builder = ImmutableList.builder();
builder.addAll(getNonVoidArgsFromParamList(ds3Request.getRequiredQueryParams()));
builder.addAll(getAssignmentArguments(ds3Request));
builder.add(new Arguments("", "stream"));
builder.add(new Arguments("", "length"));
return builder.build().stream().sorted(new CustomArgumentComparator()).map(arg -> new ConstructorParam(camelToUnderscore(arg.getName()), false)).collect(GuavaCollectors.immutableList());
}
use of com.spectralogic.ds3autogen.python.model.request.ConstructorParam in project ds3_autogen by SpectraLogic.
the class BaseRequestGenerator method toRequiredConstructorParams.
/**
* Gets the sorted list of required constructor parameters for a Ds3Request
*/
@Override
public ImmutableList<ConstructorParam> toRequiredConstructorParams(final Ds3Request ds3Request) {
final ImmutableList.Builder<Arguments> builder = ImmutableList.builder();
builder.addAll(getNonVoidArgsFromParamList(ds3Request.getRequiredQueryParams()));
builder.addAll(getAssignmentArguments(ds3Request));
return builder.build().stream().sorted(new CustomArgumentComparator()).map(arg -> new ConstructorParam(camelToUnderscore(arg.getName()), false)).collect(GuavaCollectors.immutableList());
}
use of com.spectralogic.ds3autogen.python.model.request.ConstructorParam in project ds3_autogen by SpectraLogic.
the class StringPayloadGenerator method toRequiredConstructorParams.
/**
* Gets the sorted list of required constructor parameters including the request payload
*/
@Override
public ImmutableList<ConstructorParam> toRequiredConstructorParams(final Ds3Request ds3Request) {
final ImmutableList.Builder<Arguments> builder = ImmutableList.builder();
builder.addAll(getNonVoidArgsFromParamList(ds3Request.getRequiredQueryParams()));
builder.addAll(getAssignmentArguments(ds3Request));
builder.add(new Arguments("string", PAYLOAD_NAME));
return builder.build().stream().sorted(new CustomArgumentComparator()).map(arg -> new ConstructorParam(camelToUnderscore(arg.getName()), false)).collect(GuavaCollectors.immutableList());
}
use of com.spectralogic.ds3autogen.python.model.request.ConstructorParam in project ds3_autogen by SpectraLogic.
the class GetObjectRequestGenerator method toRequiredConstructorParams.
/**
* Gets the sorted list of required constructor parameters, including the stream
*/
@Override
public ImmutableList<ConstructorParam> toRequiredConstructorParams(final Ds3Request ds3Request) {
final ImmutableList.Builder<Arguments> builder = ImmutableList.builder();
builder.addAll(getNonVoidArgsFromParamList(ds3Request.getRequiredQueryParams()));
builder.addAll(getAssignmentArguments(ds3Request));
builder.add(new Arguments("", "stream"));
return builder.build().stream().sorted(new CustomArgumentComparator()).map(arg -> new ConstructorParam(camelToUnderscore(arg.getName()), false)).collect(GuavaCollectors.immutableList());
}
use of com.spectralogic.ds3autogen.python.model.request.ConstructorParam in project ds3_autogen by SpectraLogic.
the class ObjectsPayloadGenerator method toRequiredConstructorParams.
/**
* Gets the sorted list of required constructor parameters including the request payload
*/
@Override
public ImmutableList<ConstructorParam> toRequiredConstructorParams(final Ds3Request ds3Request) {
final ImmutableList.Builder<Arguments> builder = ImmutableList.builder();
builder.addAll(getNonVoidArgsFromParamList(ds3Request.getRequiredQueryParams()));
builder.addAll(getAssignmentArguments(ds3Request));
if (hasRequiredFileObjectListPayload(ds3Request)) {
builder.add(new Arguments(FILE_OBJECTS_TYPE, OBJECTS_NAME));
}
if (isMultiFileDeleteRequest(ds3Request)) {
builder.add(new Arguments(DELETE_OBJECTS_TYPE, OBJECTS_NAME));
}
if (isCompleteMultiPartUploadRequest(ds3Request)) {
builder.add(new Arguments(PARTS_TYPE, PARTS_NAME));
}
return builder.build().stream().sorted(new CustomArgumentComparator()).map(arg -> new ConstructorParam(camelToUnderscore(arg.getName()), false)).collect(GuavaCollectors.immutableList());
}
Aggregations