Contact Center AI Insights API . projects . locations . analysisRules

Instance Methods

close()

Close httplib2 connections.

create(parent, body=None, x__xgafv=None)

Creates a analysis rule.

delete(name, x__xgafv=None)

Deletes a analysis rule.

get(name, x__xgafv=None)

Get a analysis rule.

list(parent, pageSize=None, pageToken=None, x__xgafv=None)

Lists analysis rules.

list_next()

Retrieves the next page of results.

patch(name, body=None, updateMask=None, x__xgafv=None)

Updates a analysis rule.

Method Details

close()
Close httplib2 connections.
create(parent, body=None, x__xgafv=None)
Creates a analysis rule.

Args:
  parent: string, Required. The parent resource of the analysis rule. Required. The location to create a analysis rule for. Format: `projects//locations/` or `projects//locations/` (required)
  body: object, The request body.
    The object takes the form of:

{ # 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.
  "active": True or False, # If true, apply this rule to conversations. Otherwise, this rule is inactive and saved as a draft.
  "analysisPercentage": 3.14, # 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.
  "annotatorSelector": { # Selector of all available annotators and phrase matchers to run. # 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.
    "issueModels": [ # 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.
      "A String",
    ],
    "phraseMatchers": [ # 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}
      "A String",
    ],
    "qaConfig": { # Configuration for the QA feature. # Configuration for the QA annotator.
      "scorecardList": { # Container for a list of scorecards. # A manual list of scorecards to score.
        "qaScorecardRevisions": [ # List of QaScorecardRevisions.
          "A String",
        ],
      },
    },
    "runEntityAnnotator": True or False, # Whether to run the entity annotator.
    "runIntentAnnotator": True or False, # Whether to run the intent annotator.
    "runInterruptionAnnotator": True or False, # Whether to run the interruption annotator.
    "runIssueModelAnnotator": True or False, # Whether to run the issue model annotator. A model should have already been deployed for this to take effect.
    "runPhraseMatcherAnnotator": True or False, # Whether to run the active phrase matcher annotator(s).
    "runQaAnnotator": True or False, # Whether to run the QA annotator.
    "runSentimentAnnotator": True or False, # Whether to run the sentiment annotator.
    "runSilenceAnnotator": True or False, # Whether to run the silence annotator.
    "runSummarizationAnnotator": True or False, # Whether to run the summarization annotator.
    "summarizationConfig": { # Configuration for summarization. # Configuration for the summarization annotator.
      "conversationProfile": "A String", # Resource name of the Dialogflow conversation profile. Format: projects/{project}/locations/{location}/conversationProfiles/{conversation_profile}
      "summarizationModel": "A String", # Default summarization model to be used.
    },
  },
  "conversationFilter": "A String", # Filter for the conversations that should apply this analysis rule. An empty filter means this analysis rule applies to all conversations.
  "createTime": "A String", # Output only. The time at which this analysis rule was created.
  "displayName": "A String", # Display Name of the analysis rule.
  "name": "A String", # Identifier. The resource name of the analysis rule. Format: projects/{project}/locations/{location}/analysisRules/{analysis_rule}
  "updateTime": "A String", # Output only. The most recent time at which this analysis rule was updated.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # 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.
  "active": True or False, # If true, apply this rule to conversations. Otherwise, this rule is inactive and saved as a draft.
  "analysisPercentage": 3.14, # 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.
  "annotatorSelector": { # Selector of all available annotators and phrase matchers to run. # 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.
    "issueModels": [ # 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.
      "A String",
    ],
    "phraseMatchers": [ # 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}
      "A String",
    ],
    "qaConfig": { # Configuration for the QA feature. # Configuration for the QA annotator.
      "scorecardList": { # Container for a list of scorecards. # A manual list of scorecards to score.
        "qaScorecardRevisions": [ # List of QaScorecardRevisions.
          "A String",
        ],
      },
    },
    "runEntityAnnotator": True or False, # Whether to run the entity annotator.
    "runIntentAnnotator": True or False, # Whether to run the intent annotator.
    "runInterruptionAnnotator": True or False, # Whether to run the interruption annotator.
    "runIssueModelAnnotator": True or False, # Whether to run the issue model annotator. A model should have already been deployed for this to take effect.
    "runPhraseMatcherAnnotator": True or False, # Whether to run the active phrase matcher annotator(s).
    "runQaAnnotator": True or False, # Whether to run the QA annotator.
    "runSentimentAnnotator": True or False, # Whether to run the sentiment annotator.
    "runSilenceAnnotator": True or False, # Whether to run the silence annotator.
    "runSummarizationAnnotator": True or False, # Whether to run the summarization annotator.
    "summarizationConfig": { # Configuration for summarization. # Configuration for the summarization annotator.
      "conversationProfile": "A String", # Resource name of the Dialogflow conversation profile. Format: projects/{project}/locations/{location}/conversationProfiles/{conversation_profile}
      "summarizationModel": "A String", # Default summarization model to be used.
    },
  },
  "conversationFilter": "A String", # Filter for the conversations that should apply this analysis rule. An empty filter means this analysis rule applies to all conversations.
  "createTime": "A String", # Output only. The time at which this analysis rule was created.
  "displayName": "A String", # Display Name of the analysis rule.
  "name": "A String", # Identifier. The resource name of the analysis rule. Format: projects/{project}/locations/{location}/analysisRules/{analysis_rule}
  "updateTime": "A String", # Output only. The most recent time at which this analysis rule was updated.
}
delete(name, x__xgafv=None)
Deletes a analysis rule.

Args:
  name: string, Required. The name of the analysis rule to delete. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
}
get(name, x__xgafv=None)
Get a analysis rule.

Args:
  name: string, Required. The name of the AnalysisRule to get. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # 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.
  "active": True or False, # If true, apply this rule to conversations. Otherwise, this rule is inactive and saved as a draft.
  "analysisPercentage": 3.14, # 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.
  "annotatorSelector": { # Selector of all available annotators and phrase matchers to run. # 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.
    "issueModels": [ # 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.
      "A String",
    ],
    "phraseMatchers": [ # 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}
      "A String",
    ],
    "qaConfig": { # Configuration for the QA feature. # Configuration for the QA annotator.
      "scorecardList": { # Container for a list of scorecards. # A manual list of scorecards to score.
        "qaScorecardRevisions": [ # List of QaScorecardRevisions.
          "A String",
        ],
      },
    },
    "runEntityAnnotator": True or False, # Whether to run the entity annotator.
    "runIntentAnnotator": True or False, # Whether to run the intent annotator.
    "runInterruptionAnnotator": True or False, # Whether to run the interruption annotator.
    "runIssueModelAnnotator": True or False, # Whether to run the issue model annotator. A model should have already been deployed for this to take effect.
    "runPhraseMatcherAnnotator": True or False, # Whether to run the active phrase matcher annotator(s).
    "runQaAnnotator": True or False, # Whether to run the QA annotator.
    "runSentimentAnnotator": True or False, # Whether to run the sentiment annotator.
    "runSilenceAnnotator": True or False, # Whether to run the silence annotator.
    "runSummarizationAnnotator": True or False, # Whether to run the summarization annotator.
    "summarizationConfig": { # Configuration for summarization. # Configuration for the summarization annotator.
      "conversationProfile": "A String", # Resource name of the Dialogflow conversation profile. Format: projects/{project}/locations/{location}/conversationProfiles/{conversation_profile}
      "summarizationModel": "A String", # Default summarization model to be used.
    },
  },
  "conversationFilter": "A String", # Filter for the conversations that should apply this analysis rule. An empty filter means this analysis rule applies to all conversations.
  "createTime": "A String", # Output only. The time at which this analysis rule was created.
  "displayName": "A String", # Display Name of the analysis rule.
  "name": "A String", # Identifier. The resource name of the analysis rule. Format: projects/{project}/locations/{location}/analysisRules/{analysis_rule}
  "updateTime": "A String", # Output only. The most recent time at which this analysis rule was updated.
}
list(parent, pageSize=None, pageToken=None, x__xgafv=None)
Lists analysis rules.

Args:
  parent: string, Required. The parent resource of the analysis rules. (required)
  pageSize: integer, Optional. The maximum number of analysis rule to return in the response. If this value is zero, the service will select a default size. A call may return fewer objects than requested. A non-empty `next_page_token` in the response indicates that more data is available.
  pageToken: string, Optional. The value returned by the last `ListAnalysisRulesResponse`; indicates that this is a continuation of a prior `ListAnalysisRules` call and the system should return the next page of data.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The response of listing views.
  "analysisRules": [ # The analysis_rule that match the request.
    { # 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.
      "active": True or False, # If true, apply this rule to conversations. Otherwise, this rule is inactive and saved as a draft.
      "analysisPercentage": 3.14, # 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.
      "annotatorSelector": { # Selector of all available annotators and phrase matchers to run. # 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.
        "issueModels": [ # 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.
          "A String",
        ],
        "phraseMatchers": [ # 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}
          "A String",
        ],
        "qaConfig": { # Configuration for the QA feature. # Configuration for the QA annotator.
          "scorecardList": { # Container for a list of scorecards. # A manual list of scorecards to score.
            "qaScorecardRevisions": [ # List of QaScorecardRevisions.
              "A String",
            ],
          },
        },
        "runEntityAnnotator": True or False, # Whether to run the entity annotator.
        "runIntentAnnotator": True or False, # Whether to run the intent annotator.
        "runInterruptionAnnotator": True or False, # Whether to run the interruption annotator.
        "runIssueModelAnnotator": True or False, # Whether to run the issue model annotator. A model should have already been deployed for this to take effect.
        "runPhraseMatcherAnnotator": True or False, # Whether to run the active phrase matcher annotator(s).
        "runQaAnnotator": True or False, # Whether to run the QA annotator.
        "runSentimentAnnotator": True or False, # Whether to run the sentiment annotator.
        "runSilenceAnnotator": True or False, # Whether to run the silence annotator.
        "runSummarizationAnnotator": True or False, # Whether to run the summarization annotator.
        "summarizationConfig": { # Configuration for summarization. # Configuration for the summarization annotator.
          "conversationProfile": "A String", # Resource name of the Dialogflow conversation profile. Format: projects/{project}/locations/{location}/conversationProfiles/{conversation_profile}
          "summarizationModel": "A String", # Default summarization model to be used.
        },
      },
      "conversationFilter": "A String", # Filter for the conversations that should apply this analysis rule. An empty filter means this analysis rule applies to all conversations.
      "createTime": "A String", # Output only. The time at which this analysis rule was created.
      "displayName": "A String", # Display Name of the analysis rule.
      "name": "A String", # Identifier. The resource name of the analysis rule. Format: projects/{project}/locations/{location}/analysisRules/{analysis_rule}
      "updateTime": "A String", # Output only. The most recent time at which this analysis rule was updated.
    },
  ],
  "nextPageToken": "A String", # A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
}
list_next()
Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call 'execute()' on to request the next
          page. Returns None if there are no more items in the collection.
        
patch(name, body=None, updateMask=None, x__xgafv=None)
Updates a analysis rule.

Args:
  name: string, Identifier. The resource name of the analysis rule. Format: projects/{project}/locations/{location}/analysisRules/{analysis_rule} (required)
  body: object, The request body.
    The object takes the form of:

{ # 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.
  "active": True or False, # If true, apply this rule to conversations. Otherwise, this rule is inactive and saved as a draft.
  "analysisPercentage": 3.14, # 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.
  "annotatorSelector": { # Selector of all available annotators and phrase matchers to run. # 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.
    "issueModels": [ # 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.
      "A String",
    ],
    "phraseMatchers": [ # 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}
      "A String",
    ],
    "qaConfig": { # Configuration for the QA feature. # Configuration for the QA annotator.
      "scorecardList": { # Container for a list of scorecards. # A manual list of scorecards to score.
        "qaScorecardRevisions": [ # List of QaScorecardRevisions.
          "A String",
        ],
      },
    },
    "runEntityAnnotator": True or False, # Whether to run the entity annotator.
    "runIntentAnnotator": True or False, # Whether to run the intent annotator.
    "runInterruptionAnnotator": True or False, # Whether to run the interruption annotator.
    "runIssueModelAnnotator": True or False, # Whether to run the issue model annotator. A model should have already been deployed for this to take effect.
    "runPhraseMatcherAnnotator": True or False, # Whether to run the active phrase matcher annotator(s).
    "runQaAnnotator": True or False, # Whether to run the QA annotator.
    "runSentimentAnnotator": True or False, # Whether to run the sentiment annotator.
    "runSilenceAnnotator": True or False, # Whether to run the silence annotator.
    "runSummarizationAnnotator": True or False, # Whether to run the summarization annotator.
    "summarizationConfig": { # Configuration for summarization. # Configuration for the summarization annotator.
      "conversationProfile": "A String", # Resource name of the Dialogflow conversation profile. Format: projects/{project}/locations/{location}/conversationProfiles/{conversation_profile}
      "summarizationModel": "A String", # Default summarization model to be used.
    },
  },
  "conversationFilter": "A String", # Filter for the conversations that should apply this analysis rule. An empty filter means this analysis rule applies to all conversations.
  "createTime": "A String", # Output only. The time at which this analysis rule was created.
  "displayName": "A String", # Display Name of the analysis rule.
  "name": "A String", # Identifier. The resource name of the analysis rule. Format: projects/{project}/locations/{location}/analysisRules/{analysis_rule}
  "updateTime": "A String", # Output only. The most recent time at which this analysis rule was updated.
}

  updateMask: string, Optional. The list of fields to be updated. If the update_mask is not provided, the update will be applied to all fields.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # 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.
  "active": True or False, # If true, apply this rule to conversations. Otherwise, this rule is inactive and saved as a draft.
  "analysisPercentage": 3.14, # 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.
  "annotatorSelector": { # Selector of all available annotators and phrase matchers to run. # 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.
    "issueModels": [ # 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.
      "A String",
    ],
    "phraseMatchers": [ # 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}
      "A String",
    ],
    "qaConfig": { # Configuration for the QA feature. # Configuration for the QA annotator.
      "scorecardList": { # Container for a list of scorecards. # A manual list of scorecards to score.
        "qaScorecardRevisions": [ # List of QaScorecardRevisions.
          "A String",
        ],
      },
    },
    "runEntityAnnotator": True or False, # Whether to run the entity annotator.
    "runIntentAnnotator": True or False, # Whether to run the intent annotator.
    "runInterruptionAnnotator": True or False, # Whether to run the interruption annotator.
    "runIssueModelAnnotator": True or False, # Whether to run the issue model annotator. A model should have already been deployed for this to take effect.
    "runPhraseMatcherAnnotator": True or False, # Whether to run the active phrase matcher annotator(s).
    "runQaAnnotator": True or False, # Whether to run the QA annotator.
    "runSentimentAnnotator": True or False, # Whether to run the sentiment annotator.
    "runSilenceAnnotator": True or False, # Whether to run the silence annotator.
    "runSummarizationAnnotator": True or False, # Whether to run the summarization annotator.
    "summarizationConfig": { # Configuration for summarization. # Configuration for the summarization annotator.
      "conversationProfile": "A String", # Resource name of the Dialogflow conversation profile. Format: projects/{project}/locations/{location}/conversationProfiles/{conversation_profile}
      "summarizationModel": "A String", # Default summarization model to be used.
    },
  },
  "conversationFilter": "A String", # Filter for the conversations that should apply this analysis rule. An empty filter means this analysis rule applies to all conversations.
  "createTime": "A String", # Output only. The time at which this analysis rule was created.
  "displayName": "A String", # Display Name of the analysis rule.
  "name": "A String", # Identifier. The resource name of the analysis rule. Format: projects/{project}/locations/{location}/analysisRules/{analysis_rule}
  "updateTime": "A String", # Output only. The most recent time at which this analysis rule was updated.
}