use of com.sequenceiq.environment.parameters.dao.domain.AwsParameters in project cloudbreak by hortonworks.
the class AwsEnvironmentParametersConverter method postConvert.
@Override
protected void postConvert(BaseParameters baseParameters, Environment environment, ParametersDto parametersDto) {
super.postConvert(baseParameters, environment, parametersDto);
AwsParameters awsParameters = (AwsParameters) baseParameters;
Optional<AwsParametersDto> awsParametersDto = Optional.of(parametersDto).map(ParametersDto::getAwsParametersDto);
awsParameters.setS3guardTableName(awsParametersDto.map(AwsParametersDto::getS3GuardTableName).orElse(null));
awsParameters.setS3guardTableCreation(awsParametersDto.map(AwsParametersDto::getDynamoDbTableCreation).orElse(null));
awsParameters.setFreeIpaSpotPercentage(awsParametersDto.map(AwsParametersDto::getFreeIpaSpotPercentage).orElse(0));
awsParameters.setFreeIpaSpotMaxPrice(awsParametersDto.map(AwsParametersDto::getFreeIpaSpotMaxPrice).orElse(null));
awsParameters.setEncryptionKeyArn(awsParametersDto.map(AwsParametersDto::getAwsDiskEncryptionParametersDto).map(AwsDiskEncryptionParametersDto::getEncryptionKeyArn).orElse(null));
}
Aggregations