---

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"
            substring:
              TEXT: "POSTGRE" 
  - status: "COMPLIANT"
    currentStateMessage: "log_error_verbosity database flag is set to DEFAULT or stricter."
    check:
      OR:
        args:
          - IS_EQUAL:
              left:
                EXTRACT: "caExtract_databaseFlags_log_error_verbosity_flagValue__c"
              right:
                TEXT: "DEFAULT"
          - IS_EQUAL:
              left:
                EXTRACT: "caExtract_databaseFlags_log_error_verbosity_flagValue__c"
              right:
                TEXT: "TERSE"
          - IS_EQUAL:
              left:
                EXTRACT: "caExtract_databaseFlags_log_error_verbosity_flagValue__c"
              right:
                TEXT: "VERBOSE"
otherwise:
  status: "INCOMPLIANT"
  currentStateMessage: "log_error_verbosity database flag isn't set to DEFAULT or stricter."
  remediationMessage: "Set log_error_verbosity database flag to DEFAULT or stricter."