---

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 SQL Server database instance."
    check:
      NOT:
        arg:
          CONTAINS:
            arg:
              EXTRACT: "CA10__databaseVersion__c"
            substring:
              TEXT: "SQLSERVER" 
  - status: "COMPLIANT"
    currentStateMessage: "cross db ownership chaining database flag is set to off."
    check:
      IS_EQUAL:
        left:
          EXTRACT: "caExtract_databaseFlags_cross_db_ownership_chaining_flagValue__c"
        right:
          TEXT: "off"
otherwise:
  status: "INCOMPLIANT"
  currentStateMessage: "cross db ownership chaining database flag isn't set to off."
  remediationMessage: "Set database flag cross db ownership chaining to off."
