---

inputType: "CA10__CaGoogleSqlInstance__c"
testData:
  - file: test-data.json
importExtracts:
  - file: /types/CA10__CaGoogleSqlInstance__c/object.extracts.yaml
conditions:
  - status: "INAPPLICABLE"
    currentStateMessage: "This is not a PostgreSQL database instance."
    check:
      NOT:
        arg:
          CONTAINS:
            arg:
              EXTRACT: "CA10__databaseVersion__c"
            search:
              TEXT: "POSTGRE" 
  - status: "COMPLIANT"
    currentStateMessage: "The log_checkpoints database flag is set to on."
    check:
      IS_EQUAL:
        left:
          EXTRACT: "caJsonText__databaseFlagsLogCheckpointsFlagValue__c"
        right:
          TEXT: "on"
otherwise:
  status: "INCOMPLIANT"
  currentStateMessage: "The log_checkpoints database flag isn't set to on."
  remediationMessage: "Set log_checkpoints database flag to on."