---
# Not Nullable. Can't have no access, retrieved via Microsoft.Security/pricings
extracts:
  - name: "CA10Z1__name__c"
    value: 
      FIELD:
        path: "CA10Z1__name__c"
        undeterminedIf:
          isEmpty: "Corrupted data. Name cannot be empty."
# Values: Free, Standard. Not Nullable. Can't have no access, retrieved via Microsoft.Security/pricings
  - name: "CA10Z1__pricingTier__c"
    value: 
      FIELD:
        path: "CA10Z1__pricingTier__c"
        undeterminedIf:
          isEmpty: "Corrupted data. Pricing Tier cannot be empty."
# Nullable. Text.
  - name: "CA10Z1__extensions__c"
    value:
      FIELD:
        path: "CA10Z1__extensions__c"
        returnType: BYTES
# Nullable.
  - name: "caJsonFrom__extensions__c"
    value:
      JSON_FROM:
        arg:
          EXTRACT: "CA10Z1__extensions__c"
        undeterminedIf:
          isInvalid: "Extensions JSON is invalid"
# Number. ContainerRegistriesVulnerabilityAssessments extension status.
  - name: "caJsonNumber__extensionsContainerRegistriesVulnerabilityAssessmentsIsEnabled__c"
    value: 
      JSON_QUERY_NUMBER:
        arg: 
          EXTRACT: "caJsonFrom__extensions__c"
        expression: "length([?name=='ContainerRegistriesVulnerabilityAssessments' && isEnabled=='True'])"
        undeterminedIf: 
          evaluationError: "The JSON query has failed."
          resultTypeMismatch: "The JSON query did not return a number type."


# Number. AgentlessDiscoveryForKubernetes extension status.
  - name: "caJsonNumber__extensionsAgentlessDiscoveryForKubernetesIsEnabled__c"
    value: 
      JSON_QUERY_NUMBER:
        arg: 
          EXTRACT: "caJsonFrom__extensions__c"
        expression: "length([?name=='AgentlessDiscoveryForKubernetes' && isEnabled=='True'])"
        undeterminedIf: 
          evaluationError: "The JSON query has failed."
          resultTypeMismatch: "The JSON query did not return a number type."
# Number. AgentlessVmScanning extension status.
  - name: "caJsonNumber__extensionsAgentlessVmScanningIsEnabled__c"
    value: 
      JSON_QUERY_NUMBER:
        arg: 
          EXTRACT: "caJsonFrom__extensions__c"
        expression: "length([?name=='AgentlessVmScanning' && isEnabled=='True'])"
        undeterminedIf: 
          evaluationError: "The JSON query has failed."
          resultTypeMismatch: "The JSON query did not return a number type."
# Number. ContainerSensor extension status.
  - name: "caJsonNumber__extensionsContainerSensorIsEnabled__c"
    value: 
      JSON_QUERY_NUMBER:
        arg: 
          EXTRACT: "caJsonFrom__extensions__c"
        expression: "length([?name=='ContainerSensor' && isEnabled=='True'])"
        undeterminedIf: 
          evaluationError: "The JSON query has failed."
          resultTypeMismatch: "The JSON query did not return a number type."