{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-cloud-recommendations-ai/json-schema/google-cloud-recommendations-ai-google-cloud-recommender-v1-insight-schema.json",
  "title": "GoogleCloudRecommenderV1Insight",
  "description": "An insight along with the information used to derive the insight. The insight may have associated recommendations as well.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-cloud-recommendations-ai-recommender-billing-accounts-api-openapi.yml#/components/schemas/GoogleCloudRecommenderV1Insight",
  "properties": {
    "severity": {
      "type": "string",
      "enum": [
        "SEVERITY_UNSPECIFIED",
        "LOW",
        "MEDIUM",
        "HIGH",
        "CRITICAL"
      ],
      "description": "Insight's severity."
    },
    "category": {
      "description": "Category being targeted by the insight.",
      "enum": [
        "CATEGORY_UNSPECIFIED",
        "COST",
        "SECURITY",
        "PERFORMANCE",
        "MANAGEABILITY",
        "SUSTAINABILITY",
        "RELIABILITY"
      ],
      "type": "string"
    },
    "observationPeriod": {
      "format": "google-duration",
      "type": "string",
      "description": "Observation period that led to the insight. The source data used to generate the insight ends at last_refresh_time and begins at (last_refresh_time - observation_period)."
    },
    "etag": {
      "type": "string",
      "description": "Fingerprint of the Insight. Provides optimistic locking when updating states."
    },
    "name": {
      "description": "Identifier. Name of the insight.",
      "type": "string"
    },
    "stateInfo": {
      "$ref": "#/$defs/GoogleCloudRecommenderV1InsightStateInfo",
      "description": "Information state and metadata."
    },
    "description": {
      "description": "Free-form human readable summary in English. The maximum length is 500 characters.",
      "type": "string"
    },
    "associatedRecommendations": {
      "type": "array",
      "description": "Recommendations derived from this insight.",
      "items": {
        "$ref": "#/$defs/GoogleCloudRecommenderV1InsightRecommendationReference"
      }
    },
    "lastRefreshTime": {
      "description": "Timestamp of the latest data used to generate the insight.",
      "format": "google-datetime",
      "type": "string"
    },
    "content": {
      "type": "object",
      "description": "A struct of custom fields to explain the insight. Example: \"grantedPermissionsCount\": \"1000\"",
      "additionalProperties": {
        "description": "Properties of the object."
      }
    },
    "targetResources": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "description": "Fully qualified resource names that this insight is targeting."
    },
    "insightSubtype": {
      "type": "string",
      "description": "Insight subtype. Insight content schema will be stable for a given subtype."
    }
  },
  "type": "object",
  "$defs": {
    "GoogleCloudRecommenderV1InsightRecommendationReference": {
      "properties": {
        "recommendation": {
          "description": "Recommendation resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/recommendations/[RECOMMENDATION_ID]",
          "type": "string"
        }
      },
      "type": "object",
      "description": "Reference to an associated recommendation."
    },
    "GoogleCloudRecommenderV1InsightStateInfo": {
      "description": "Information related to insight state.",
      "type": "object",
      "properties": {
        "stateMetadata": {
          "description": "A map of metadata for the state, provided by user or automations systems.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "state": {
          "enum": [
            "STATE_UNSPECIFIED",
            "ACTIVE",
            "ACCEPTED",
            "DISMISSED"
          ],
          "description": "Insight state.",
          "type": "string"
        }
      }
    }
  }
}