/** * Sets the version of the output schema to use when exporting data. */ public void setOutputSchemaVersion(StorageClassAnalysisSchemaVersion outputSchemaVersion) { if (outputSchemaVersion == null) { setOutputSchemaVersion((String) null); } else { setOutputSchemaVersion(outputSchemaVersion.toString()); } }
/** * Sets the version of the output schema to use when exporting data. * @param outputSchemaVersion the output schema version. */ public void setOutputSchemaVersion(StorageClassAnalysisSchemaVersion outputSchemaVersion) { if (outputSchemaVersion == null) { setOutputSchemaVersion((String) null); } else { setOutputSchemaVersion(outputSchemaVersion.toString()); } }
@Test public void getResponse_unmarshalls_properly() throws Exception { AnalyticsConfiguration configuration = parseGetAnalyticsConfigurationResponse(GET_RESPONSE).getAnalyticsConfiguration(); AnalyticsFilter filter = configuration.getFilter(); StorageClassAnalysis storageClassAnalysis = configuration.getStorageClassAnalysis(); assertEquals("analytics-id", configuration.getId()); assertNotNull(filter); List<AnalyticsFilterPredicate> operands = ((AnalyticsAndOperator) filter.getPredicate()).getOperands(); assertEquals(2, operands.size()); assertEquals("documents/", ((AnalyticsPrefixPredicate) operands.get(0)).getPrefix()); assertEquals("foo", ((AnalyticsTagPredicate) operands.get(1)).getTag().getKey()); assertEquals("bar", ((AnalyticsTagPredicate) operands.get(1)).getTag().getValue()); assertEquals(StorageClassAnalysisSchemaVersion.V_1.toString(), storageClassAnalysis.getDataExport().getOutputSchemaVersion()); AnalyticsS3BucketDestination s3BucketDestination = storageClassAnalysis.getDataExport().getDestination().getS3BucketDestination(); assertEquals(AnalyticsS3ExportFileFormat.CSV.toString(), s3BucketDestination.getFormat()); assertEquals("123456789", s3BucketDestination.getBucketAccountId()); assertEquals("arn:aws:s3:::destination-bucket", s3BucketDestination.getBucketArn()); assertEquals("destination-prefix", s3BucketDestination.getPrefix()); }
/** * Sets the version of the output schema to use when exporting data. * @param outputSchemaVersion the output schema version. */ public void setOutputSchemaVersion(StorageClassAnalysisSchemaVersion outputSchemaVersion) { if (outputSchemaVersion == null) { setOutputSchemaVersion((String) null); } else { setOutputSchemaVersion(outputSchemaVersion.toString()); } }
/** * Sets the version of the output schema to use when exporting data. */ public void setOutputSchemaVersion(StorageClassAnalysisSchemaVersion outputSchemaVersion) { if (outputSchemaVersion == null) { setOutputSchemaVersion((String) null); } else { setOutputSchemaVersion(outputSchemaVersion.toString()); } }
assertEquals("foo", ((AnalyticsTagPredicate) operands.get(1)).getTag().getKey()); assertEquals("bar", ((AnalyticsTagPredicate) operands.get(1)).getTag().getValue()); assertEquals(StorageClassAnalysisSchemaVersion.V_1.toString(), storageClassAnalysis.getDataExport().getOutputSchemaVersion()); AnalyticsS3BucketDestination s3BucketDestination = storageClassAnalysis.getDataExport().getDestination().getS3BucketDestination(); assertEquals(AnalyticsS3ExportFileFormat.CSV.toString(), s3BucketDestination.getFormat());