---
inputType: "CA10G1__CaGoogleGceCommitment__c"
testData:
  - file: test-data.json
importExtracts:
  - file: /types/CA10G1__CaGoogleGceCommitment__c/object.extracts.yaml
conditions:
  - status: "INAPPLICABLE"
    currentStateMessage: "The commitment is not expired."
    check:
      NOT_EQUAL:
        left:
          EXTRACT: "CA10G1__status__c"
        right: 
          TEXT: "EXPIRED"
  - status: "INCOMPLIANT"
    currentStateMessage: "The commitment has expired within the last 30 days."
    remediationMessage: "Review the expired commitment to determine if a new one should be purchased to maintain cost savings."
    check:
      IS_WITHIN_LAST_DAYS:
        offsetDays: 30
        arg:
          EXTRACT: "CA10G1__endTimestamp__c"
otherwise:
  status: "COMPLIANT"
  currentStateMessage: "The commitment expired more than 30 days ago."