class AwsDataSourceResourceConverter extends GenericJdbcDataSourceResourceConverter<AwsReportDataSource, ClientAwsDataSource> {

    @Override
    protected AwsReportDataSource resourceSpecificFieldsToServer(ClientAwsDataSource clientObject, AwsReportDataSource resultToUpdate, List<Exception> exceptions, ToServerConversionOptions options) throws IllegalParameterValueException {
        final AwsReportDataSource awsReportDataSource = super.resourceSpecificFieldsToServer(clientObject, resultToUpdate, exceptions, options);
        awsReportDataSource.setRoleARN(clientObject.getRoleArn());
        awsReportDataSource.setAWSAccessKey(clientObject.getAccessKey());
        awsReportDataSource.setAWSRegion(clientObject.getRegion());
        if (clientObject.getSecretKey() != null || clientObject.getAccessKey() == null) {
            awsReportDataSource.setAWSSecretKey(clientObject.getSecretKey());
        }
        awsReportDataSource.setDbInstanceIdentifier(clientObject.getDbInstanceIdentifier());
        awsReportDataSource.setDbName(clientObject.getDbName());
        awsReportDataSource.setDbService(clientObject.getDbService());
        return awsReportDataSource;
    }

}