{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-cloud-contact-center-ai/json-schema/google-cloud-contact-center-ai-google-cloud-contactcenterinsights-v1-generative-insights-request-schema.json",
  "title": "GoogleCloudContactcenterinsightsV1GenerativeInsightsRequest",
  "description": "The request for generative insights.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-cloud-contact-center-ai-contactcenterinsights-projects-api-openapi.yml#/components/schemas/GoogleCloudContactcenterinsightsV1GenerativeInsightsRequest",
  "properties": {
    "chart": {
      "description": "The full name of the chart resource this request corresponds to. Format: projects/{project}/locations/{location}/dashboards/{dashboard}/charts/{chart}",
      "type": "string"
    },
    "revisionId": {
      "type": "string",
      "description": "Optional. The revision id that maps to the state of the chart state revision. When specified, the backend will reload the chart with the sql and visual spec from that revision."
    },
    "userProvidedChartSpec": {
      "type": "object",
      "additionalProperties": {
        "description": "Properties of the object."
      },
      "description": "Optional. The user provided chart spec for the chart. This will be used to override the visual spec generated by the LLM."
    },
    "filter": {
      "type": "string",
      "description": "Filter for the data that can be specified in addition to the natural language query. Users are encouraged to use this field to populate time-windows."
    },
    "sqlComparisonKey": {
      "description": "Optional. For charts with comparison, this key will determine the metric that will be compared between the current and another dataset.",
      "type": "string"
    },
    "comparisonFilter": {
      "description": "Optional. Filter for the data that can be specified in addition to the natural language query. This `filter` is specifically used for charts where comparisons are possible. For example, \"compare to last month\" or \"compare to previous quarter\".",
      "type": "string"
    },
    "naturalLanguageQuery": {
      "description": "The natural language query specified by the user. If this field is specified, `sql_query` will be ignored.",
      "type": "string"
    },
    "timeZone": {
      "description": "Optional. The time zone name from the [IANA Time Zone Database](https://www.iana.org/time-zones) (for example, `\"America/Los_Angeles\"`) used to group daily time-series results. If empty, or if the name is well-formed but not known to the server, `UTC` is used. Malformed values are rejected with `INVALID_ARGUMENT`.",
      "type": "string"
    },
    "sessionId": {
      "description": "Optional. The session id of the conversation. If the session id is not specified, backend will generate a random session id. If the session id is specified, will associate user-provided user_query with the provided session id.",
      "type": "string"
    },
    "sqlQuery": {
      "description": "Optional. The SQL query specified by the user. This query must be in BigQuery SQL dialect. The `filter` field will also be ignored, as it is assumed that any filtering is already included in the SQL query.",
      "type": "string"
    }
  },
  "type": "object"
}