{
  "type": "record",
  "name": "DataHubRetentionConfig",
  "namespace": "com.linkedin.pegasus2avro.retention",
  "fields": [
    {
      "name": "retention",
      "type": {
        "type": "record",
        "name": "Retention",
        "doc": "Base class that encapsulates different retention policies.\nOnly one of the fields should be set",
        "fields": [
          {
            "name": "version",
            "type": [
              "null",
              {
                "type": "record",
                "name": "VersionBasedRetention",
                "doc": "Keep max N latest records",
                "fields": [
                  {
                    "name": "maxVersions",
                    "type": "int"
                  }
                ]
              }
            ],
            "default": null
          },
          {
            "name": "time",
            "type": [
              "null",
              {
                "type": "record",
                "name": "TimeBasedRetention",
                "doc": "Keep records that are less than X seconds old",
                "fields": [
                  {
                    "name": "maxAgeInSeconds",
                    "type": "int"
                  }
                ]
              }
            ],
            "default": null
          }
        ]
      }
    }
  ],
  "Aspect": {
    "name": "dataHubRetentionConfig"
  }
}