2017-03-24 20:50:42 -07:00
|
|
|
/**
|
2017-05-19 03:05:25 -07:00
|
|
|
* Builds a default shape for securitySpecification & privacyCompliancePolicy with default / unset values
|
2017-04-28 22:02:46 -07:00
|
|
|
* for non null properties as per Avro schema
|
2017-05-19 09:52:19 -07:00
|
|
|
* @param {Number} datasetId id for the dataset that this privacy object applies to
|
2017-04-01 14:13:28 -07:00
|
|
|
*/
|
2017-05-19 10:52:58 -07:00
|
|
|
const createInitialComplianceInfo = datasetId => ({
|
2017-05-19 03:05:25 -07:00
|
|
|
datasetId,
|
|
|
|
// default to first item in compliance types list
|
|
|
|
complianceType: 'AUTO_PURGE',
|
2017-05-19 08:45:05 -07:00
|
|
|
complianceEntities: [],
|
2017-05-19 03:05:25 -07:00
|
|
|
fieldClassification: {},
|
|
|
|
datasetClassification: {},
|
|
|
|
geographicAffinity: { affinity: '' },
|
|
|
|
recordOwnerType: '',
|
|
|
|
retentionPolicy: { retentionType: '' }
|
|
|
|
});
|
2017-04-28 22:02:46 -07:00
|
|
|
|
2017-05-19 03:05:25 -07:00
|
|
|
export { createInitialComplianceInfo };
|