{
  "$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-analysis-rule-schema.json",
  "title": "GoogleCloudContactcenterinsightsV1AnalysisRule",
  "description": "The CCAI Insights project wide analysis rule. This rule will be applied to all conversations that match the filter defined in the rule. For a conversation matches the filter, the annotators specified in the rule will be run. If a conversation matches multiple rules, a union of all the annotators will be run. One project can have multiple analysis rules.",
  "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/GoogleCloudContactcenterinsightsV1AnalysisRule",
  "properties": {
    "satisfiesPzs": {
      "type": "boolean",
      "readOnly": true,
      "description": "Output only. Whether this resource is zone separated."
    },
    "conversationFilter": {
      "type": "string",
      "description": "Filter for the conversations that should apply this analysis rule. An empty filter means this analysis rule applies to all conversations. Refer to https://cloud.google.com/contact-center/insights/docs/filtering for details."
    },
    "updateTime": {
      "type": "string",
      "description": "Output only. The most recent time at which this analysis rule was updated.",
      "format": "google-datetime",
      "readOnly": true
    },
    "analysisPercentage": {
      "type": "number",
      "description": "Percentage of conversations that we should apply this analysis setting automatically, between [0, 1]. For example, 0.1 means 10%. Conversations are sampled in a determenestic way. The original runtime_percentage & upload percentage will be replaced by defining filters on the conversation.",
      "format": "double"
    },
    "annotatorSelector": {
      "$ref": "#/$defs/GoogleCloudContactcenterinsightsV1AnnotatorSelector",
      "description": "Selector of annotators to run and the phrase matchers to use for conversations that matches the conversation_filter. If not specified, NO annotators will be run."
    },
    "name": {
      "description": "Identifier. The resource name of the analysis rule. Format: projects/{project}/locations/{location}/analysisRules/{analysis_rule}",
      "type": "string"
    },
    "satisfiesPzi": {
      "type": "boolean",
      "description": "Output only. Whether this resource is zone isolated.",
      "readOnly": true
    },
    "displayName": {
      "description": "Display Name of the analysis rule.",
      "type": "string"
    },
    "active": {
      "description": "If true, apply this rule to conversations. Otherwise, this rule is inactive and saved as a draft.",
      "type": "boolean"
    },
    "createTime": {
      "type": "string",
      "readOnly": true,
      "format": "google-datetime",
      "description": "Output only. The time at which this analysis rule was created."
    }
  },
  "type": "object",
  "$defs": {
    "GoogleCloudContactcenterinsightsV1AnnotatorSelector": {
      "description": "Selector of all available annotators and phrase matchers to run.",
      "properties": {
        "runSilenceAnnotator": {
          "description": "Whether to run the silence annotator.",
          "type": "boolean"
        },
        "runSentimentAnnotator": {
          "type": "boolean",
          "description": "Whether to run the sentiment annotator."
        },
        "runEntityAnnotator": {
          "description": "Whether to run the entity annotator.",
          "type": "boolean"
        },
        "runQaAnnotator": {
          "type": "boolean",
          "description": "Whether to run the QA annotator."
        },
        "runIntentAnnotator": {
          "description": "Whether to run the intent annotator.",
          "type": "boolean"
        },
        "runInterruptionAnnotator": {
          "type": "boolean",
          "description": "Whether to run the interruption annotator."
        },
        "issueModels": {
          "description": "The issue model to run. If not provided, the most recently deployed topic model will be used. The provided issue model will only be used for inference if the issue model is deployed and if run_issue_model_annotator is set to true. If more than one issue model is provided, only the first provided issue model will be used for inference.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "phraseMatchers": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "description": "The list of phrase matchers to run. If not provided, all active phrase matchers will be used. If inactive phrase matchers are provided, they will not be used. Phrase matchers will be run only if run_phrase_matcher_annotator is set to true. Format: projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher}"
        },
        "runAutoLabelingAnnotator": {
          "type": "boolean",
          "description": "Optional. Whether to run the auto-labeling annotator. If true, the auto-labeling annotator will be run. This is a non-billable operation designed for fixing or backfilling custom labels."
        },
        "runIssueModelAnnotator": {
          "description": "Whether to run the issue model annotator. A model should have already been deployed for this to take effect.",
          "type": "boolean"
        },
        "runSummarizationAnnotator": {
          "description": "Whether to run the summarization annotator.",
          "type": "boolean"
        },
        "summarizationConfig": {
          "$ref": "#/$defs/GoogleCloudContactcenterinsightsV1AnnotatorSelectorSummarizationConfig",
          "description": "Configuration for the summarization annotator."
        },
        "qaConfig": {
          "$ref": "#/$defs/GoogleCloudContactcenterinsightsV1AnnotatorSelectorQaConfig",
          "description": "Configuration for the QA annotator."
        },
        "runPhraseMatcherAnnotator": {
          "description": "Whether to run the active phrase matcher annotator(s).",
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "GoogleCloudContactcenterinsightsV1AnnotatorSelectorQaConfig": {
      "type": "object",
      "properties": {
        "scorecardList": {
          "$ref": "#/$defs/GoogleCloudContactcenterinsightsV1AnnotatorSelectorQaConfigScorecardList",
          "description": "A manual list of scorecards to score."
        }
      },
      "description": "Configuration for the QA feature."
    },
    "GoogleCloudContactcenterinsightsV1AnnotatorSelectorQaConfigScorecardList": {
      "type": "object",
      "properties": {
        "qaScorecardRevisions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "List of QaScorecardRevisions."
        }
      },
      "description": "Container for a list of scorecards."
    },
    "GoogleCloudContactcenterinsightsV1AnnotatorSelectorSummarizationConfig": {
      "properties": {
        "generator": {
          "description": "The resource name of the existing created generator. Format: projects//locations//generators/",
          "type": "string"
        },
        "summarizationModel": {
          "enum": [
            "SUMMARIZATION_MODEL_UNSPECIFIED",
            "BASELINE_MODEL",
            "BASELINE_MODEL_V2_0"
          ],
          "description": "Default summarization model to be used.",
          "type": "string"
        },
        "conversationProfile": {
          "type": "string",
          "description": "Resource name of the Dialogflow conversation profile. Format: projects/{project}/locations/{location}/conversationProfiles/{conversation_profile}"
        }
      },
      "description": "Configuration for summarization.",
      "type": "object"
    }
  }
}