---
extracts:
  - name: "CA10__databaseVersion__c"
    value: 
      FIELD:
        path: "CA10__databaseVersion__c"
        undeterminedIf:
          isEmpty:  "Database version should not be empty"
  - name: "CA10__ipv4Enabled__c"
    value: 
      FIELD:
        path: "CA10__ipv4Enabled__c"
        undeterminedIf:
          isEmpty:  "Ipv4Enabled should not be empty"
  - name: "caJsonFrom__databaseFlagsJson__c"
    value: 
      JSON_FROM:
        arg:
          FIELD:
            path: CA10__databaseFlagsJson__c
            returnType: BYTES
        undeterminedIf:
          isInvalid: "Database Flags JSON is invalid."
          isEmpty: "Database Flags JSON is empty."
  - name: "caJsonText__databaseFlagsSkipShowDatabaseFlagValue__c"
    value: 
      JSON_QUERY_TEXT:
        arg:
          EXTRACT: "caJsonFrom__databaseFlagsJson__c"
        expression: "to_string([?name == 'skip_show_database'].value[] | [0])"
        undeterminedIf:
          evaluationError: "The JSON query has failed."
          resultTypeMismatch: "The JSON query did not return text type."
  - name: "caJsonText__databaseFlagsLocalInfileFlagValue__c"
    value: 
      JSON_QUERY_TEXT:
        arg:
          EXTRACT: "caJsonFrom__databaseFlagsJson__c"
        expression: "to_string([?name == 'local_infile'].value[] | [0])"
        undeterminedIf:
          evaluationError: "The JSON query has failed."
          resultTypeMismatch: "The JSON query did not return text type."
  - name: "caJsonText__databaseFlagsLogErrorVerbosityFlagValue__c"
    value: 
      JSON_QUERY_TEXT:
        arg:
          EXTRACT: "caJsonFrom__databaseFlagsJson__c"
        expression:  "to_string([?name == 'log_error_verbosity'].value[] | [0])"
        undeterminedIf:
          evaluationError: "The JSON query has failed."
          resultTypeMismatch: "The JSON query did not return text type."
  - name: "caJsonText__databaseFlagsLogConnectionsFlagValue__c"
    value: 
      JSON_QUERY_TEXT:
        arg:
          EXTRACT: "caJsonFrom__databaseFlagsJson__c"
        expression: "to_string([?name == 'log_connections'].value[] | [0])"
        undeterminedIf:
          evaluationError: "The JSON query has failed."
          resultTypeMismatch: "The JSON query did not return text type."
  - name: "caJsonText__databaseFlagsLogDisconnectionsFlagValue__c"
    value: 
      JSON_QUERY_TEXT:
        arg:
          EXTRACT: "caJsonFrom__databaseFlagsJson__c"
        expression:  "to_string([?name == 'log_disconnections'].value[] | [0])"
        undeterminedIf:
          evaluationError: "The JSON query has failed."
          resultTypeMismatch: "The JSON query did not return text type."
  - name: "caJsonText__databaseFlagsLogStatementFlagValue__c"
    value: 
      JSON_QUERY_TEXT:
        arg:
          EXTRACT: "caJsonFrom__databaseFlagsJson__c"
        expression: "to_string([?name == 'log_statement'].value[] | [0])"
        undeterminedIf:
          evaluationError: "The JSON query has failed."
          resultTypeMismatch: "The JSON query did not return text type."
  - name: "caJsonText__databaseFlagsLogMinMessagesFlagValue__c"
    value: 
      JSON_QUERY_TEXT:
        arg:
          EXTRACT: "caJsonFrom__databaseFlagsJson__c"
        expression: "to_string([?name == 'log_min_messages'].value[] | [0])"
        undeterminedIf:
          evaluationError: "The JSON query has failed."
          resultTypeMismatch: "The JSON query did not return text type."
  - name: "caJsonText__databaseFlagsLogMinErrorStatementFlagValue__c"
    value: 
      JSON_QUERY_TEXT:
        arg:
          EXTRACT: "caJsonFrom__databaseFlagsJson__c"
        expression: "to_string([?name == 'log_min_error_statement'].value[] | [0])"
        undeterminedIf:
          evaluationError: "The JSON query has failed."
          resultTypeMismatch: "The JSON query did not return text type."
  - name: "caJsonText__databaseFlagsLogMinDurationStatementFlagValue__c"
    value: 
      JSON_QUERY_TEXT:
        arg:
          EXTRACT: "caJsonFrom__databaseFlagsJson__c"
        expression: "to_string([?name == 'log_min_duration_statement'].value[] | [0])"
        undeterminedIf:
          evaluationError: "The JSON query has failed."
          resultTypeMismatch: "The JSON query did not return text type."
  - name: "caJsonText__databaseFlagsCloudsqlEnablePgauditFlagValue__c"
    value: 
      JSON_QUERY_TEXT:
        arg:
          EXTRACT: "caJsonFrom__databaseFlagsJson__c"
        expression: "to_string([?name == 'cloudsql.enable_pgaudit'].value[] | [0])"
        undeterminedIf:
          evaluationError: "The JSON query has failed."
          resultTypeMismatch: "The JSON query did not return text type."
  - name: "caJsonText__databaseFlagsExternalScriptsEnabledFlagValue__c"
    value: 
      JSON_QUERY_TEXT:
        arg:
          EXTRACT: "caJsonFrom__databaseFlagsJson__c"
        expression: "to_string([?name == 'external scripts enabled'].value[] | [0])"
        undeterminedIf:
          evaluationError: "The JSON query has failed."
          resultTypeMismatch: "The JSON query did not return text type."
  - name: "caJsonText__databaseFlagsCrossDbOwnershipChainingFlagValue__c"
    value: 
      JSON_QUERY_TEXT:
        arg:
          EXTRACT: "caJsonFrom__databaseFlagsJson__c"
        expression: "to_string([?name == 'cross db ownership chaining'].value[] | [0])"
        undeterminedIf:
          evaluationError: "The JSON query has failed."
          resultTypeMismatch: "The JSON query did not return text type."

  - name: "caJsonText__databaseFlagsUserConnectionsFlagValue__c"
    value: 
      JSON_QUERY_TEXT:
        arg:
          EXTRACT: "caJsonFrom__databaseFlagsJson__c"
        expression: "to_string([?name == 'user connections'].value[] | [0])"
        undeterminedIf:
          evaluationError: "The JSON query has failed."
          resultTypeMismatch: "The JSON query did not return text type."

  - name: "caJsonText__databaseFlagsUserOptionsFlagValue__c"
    value: 
      JSON_QUERY_TEXT:
        arg:
          EXTRACT: "caJsonFrom__databaseFlagsJson__c"
        expression: "to_string([?name == 'user options'].value[] | [0])"
        undeterminedIf:
          evaluationError: "The JSON query has failed."
          resultTypeMismatch: "The JSON query did not return text type."
  - name: "caJsonText__databaseFlagsRemoteAccessFlagValue__c"
    value: 
      JSON_QUERY_TEXT:
        arg:
          EXTRACT: "caJsonFrom__databaseFlagsJson__c"
        expression: "to_string([?name == 'remote access'].value[] | [0])"
        undeterminedIf:
          evaluationError: "The JSON query has failed."
          resultTypeMismatch: "The JSON query did not return text type."
  - name: "caJsonText__databaseFlags3625FlagValue__c"
    value: 
      JSON_QUERY_TEXT:
        arg:
          EXTRACT: "caJsonFrom__databaseFlagsJson__c"
        expression: "to_string([?name == '3625'].value[] | [0])"
        undeterminedIf:
          evaluationError: "The JSON query has failed."
          resultTypeMismatch: "The JSON query did not return text type."
  - name: "caJsonText__databaseFlagsContainedDatabaseAuthenticationFlagValue__c"
    value: 
      JSON_QUERY_TEXT:
        arg:
          EXTRACT: "caJsonFrom__databaseFlagsJson__c"
        expression: "to_string([?name == 'contained database authentication'].value[] | [0])"
        undeterminedIf:
          evaluationError: "The JSON query has failed."
          resultTypeMismatch: "The JSON query did not return text type."
  - name: "CA10__authorizedNetworksJson__c"
    value: 
      FIELD:
        path: "CA10__authorizedNetworksJson__c"
        returnType: BYTES
  - name: "caJsonFrom__authorizedNetworksJson__c"
    value: 
      JSON_FROM:
        arg: 
          EXTRACT: "CA10__authorizedNetworksJson__c"
        undeterminedIf:
          isInvalid: "Authorized Networks JSON is invalid."  
  - name: "caJsonText__authorizedNetworksJsonValue__c"
    value: 
      JSON_QUERY_TEXT:
        arg:
          EXTRACT: "caJsonFrom__authorizedNetworksJson__c"
        expression: "to_string([].value)"
        undeterminedIf:
          evaluationError: "The JSON query was failed."
          resultTypeMismatch: "The JSON query did not return a text."
  - name: "CA10__instanceType__c"
    value: 
      FIELD:
        path: "CA10__instanceType__c"
        undeterminedIf:
          isEmpty: "Instance type should not be empty"
  - name: "CA10__backendType__c"
    value: 
      FIELD:
        path: "CA10__backendType__c"
        undeterminedIf:
          isEmpty: "Backend type should not be empty"
  - name: "CA10__backupEnabled__c"
    value: 
      FIELD:
        path: "CA10__backupEnabled__c"
        undeterminedIf:
          isEmpty: "Backup enabled should not be empty"
  - name: "CA10__backupStartTime__c"
    value: 
      FIELD:
        path: "CA10__backupStartTime__c"
  - name: "CA10__sslMode__c"
    value: 
      FIELD:
        path: "CA10__sslMode__c"
  - name: "CA10__createTime__c"
    value: 
      FIELD:
        path: "CA10__createTime__c"
  - name: "CA10__state__c"
    value: 
      FIELD:
        path: "CA10__state__c"
  - name: "CA10__cpuUtilizationAvg30Day__c"
    value: 
      FIELD:
        path: "CA10__cpuUtilizationAvg30Day__c"
  - name: "CA10__memoryUtilizationAvg30Day__c"
    value: 
      FIELD:
        path: "CA10__memoryUtilizationAvg30Day__c"
  - name: "CA10__diskReadIoOpsRate30Day__c"
    value: 
      FIELD:
        path: "CA10__diskReadIoOpsRate30Day__c"
  - name: "CA10__diskWriteIoOpsRate30Day__c"
    value: 
      FIELD:
        path: "CA10__diskWriteIoOpsRate30Day__c"
  - name: "CA10__cloudSqlConnectionsAvg30Day__c"
    value: 
      FIELD:
        path: "CA10__cloudSqlConnectionsAvg30Day__c"
# Text
  - name: "CA10__regionName__c"
    value: 
      FIELD:
        path: "CA10__regionName__c"
