---
inputType: "CA10__CaGoogleProject__c"
testData:
  - file: test-data.json
conditions:
  - status: "INCOMPLIANT"
    currentStateMessage: "The Project has networks in the legacy mode."
    remediationMessage: "Delete the networks in the legacy mode."
    check:
      RELATED_LIST_HAS:
        status: "INCOMPLIANT"
        relationshipName: "CA10__Google_GCE_Networks__r" 
otherwise:
  status: "COMPLIANT"
  currentStateMessage: "The Project doesn't have networks in the legacy mode."
relatedLists:
  - relationshipName: "CA10__Google_GCE_Networks__r"
    importExtracts:
      - file: /types/CA10__CaGoogleGceNetwork__c/object.extracts.yaml
    conditions:
      - status: "INCOMPLIANT"
        currentStateMessage: "This is a legacy network."
        check:
          IS_EQUAL:
            left:
              EXTRACT: "CA10__autoCreationSubnetworksMode__c"
            right:
              TEXT: 'legacy'
    otherwise:
      status: "COMPLIANT"
      currentStateMessage: "This is not a legacy network."