#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Conversation {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub data_source: ::core::option::Option<ConversationDataSource>,
#[prost(message, optional, tag = "3")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "4")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "17")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "14")]
pub language_code: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub agent_id: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "6")]
pub labels:
::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
#[prost(message, optional, tag = "8")]
pub transcript: ::core::option::Option<conversation::Transcript>,
#[prost(enumeration = "conversation::Medium", tag = "9")]
pub medium: i32,
#[prost(message, optional, tag = "10")]
pub duration: ::core::option::Option<::prost_types::Duration>,
#[prost(int32, tag = "11")]
pub turn_count: i32,
#[prost(message, optional, tag = "12")]
pub latest_analysis: ::core::option::Option<Analysis>,
#[prost(message, repeated, tag = "13")]
pub runtime_annotations: ::prost::alloc::vec::Vec<RuntimeAnnotation>,
#[prost(map = "string, message", tag = "18")]
pub dialogflow_intents:
::std::collections::HashMap<::prost::alloc::string::String, DialogflowIntent>,
#[prost(oneof = "conversation::Metadata", tags = "7")]
pub metadata: ::core::option::Option<conversation::Metadata>,
#[prost(oneof = "conversation::Expiration", tags = "15, 16")]
pub expiration: ::core::option::Option<conversation::Expiration>,
}
pub mod conversation {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CallMetadata {
#[prost(int32, tag = "1")]
pub customer_channel: i32,
#[prost(int32, tag = "2")]
pub agent_channel: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Transcript {
#[prost(message, repeated, tag = "1")]
pub transcript_segments: ::prost::alloc::vec::Vec<transcript::TranscriptSegment>,
}
pub mod transcript {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TranscriptSegment {
#[prost(message, optional, tag = "6")]
pub message_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "1")]
pub text: ::prost::alloc::string::String,
#[prost(float, tag = "2")]
pub confidence: f32,
#[prost(message, repeated, tag = "3")]
pub words: ::prost::alloc::vec::Vec<transcript_segment::WordInfo>,
#[prost(string, tag = "4")]
pub language_code: ::prost::alloc::string::String,
#[prost(int32, tag = "5")]
pub channel_tag: i32,
#[prost(message, optional, tag = "9")]
pub segment_participant: ::core::option::Option<super::super::ConversationParticipant>,
#[prost(message, optional, tag = "10")]
pub dialogflow_segment_metadata:
::core::option::Option<transcript_segment::DialogflowSegmentMetadata>,
#[prost(message, optional, tag = "11")]
pub sentiment: ::core::option::Option<super::super::SentimentData>,
}
pub mod transcript_segment {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WordInfo {
#[prost(message, optional, tag = "1")]
pub start_offset: ::core::option::Option<::prost_types::Duration>,
#[prost(message, optional, tag = "2")]
pub end_offset: ::core::option::Option<::prost_types::Duration>,
#[prost(string, tag = "3")]
pub word: ::prost::alloc::string::String,
#[prost(float, tag = "4")]
pub confidence: f32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DialogflowSegmentMetadata {
#[prost(bool, tag = "1")]
pub smart_reply_allowlist_covered: bool,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Medium {
Unspecified = 0,
PhoneCall = 1,
Chat = 2,
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Metadata {
#[prost(message, tag = "7")]
CallMetadata(CallMetadata),
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Expiration {
#[prost(message, tag = "15")]
ExpireTime(::prost_types::Timestamp),
#[prost(message, tag = "16")]
Ttl(::prost_types::Duration),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Analysis {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub request_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "3")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "7")]
pub analysis_result: ::core::option::Option<AnalysisResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConversationDataSource {
#[prost(oneof = "conversation_data_source::Source", tags = "1, 3")]
pub source: ::core::option::Option<conversation_data_source::Source>,
}
pub mod conversation_data_source {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Source {
#[prost(message, tag = "1")]
GcsSource(super::GcsSource),
#[prost(message, tag = "3")]
DialogflowSource(super::DialogflowSource),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GcsSource {
#[prost(string, tag = "1")]
pub audio_uri: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub transcript_uri: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DialogflowSource {
#[prost(string, tag = "1")]
pub dialogflow_conversation: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub audio_uri: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AnalysisResult {
#[prost(message, optional, tag = "1")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(oneof = "analysis_result::Metadata", tags = "2")]
pub metadata: ::core::option::Option<analysis_result::Metadata>,
}
pub mod analysis_result {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CallAnalysisMetadata {
#[prost(message, repeated, tag = "2")]
pub annotations: ::prost::alloc::vec::Vec<super::CallAnnotation>,
#[prost(map = "string, message", tag = "3")]
pub entities: ::std::collections::HashMap<::prost::alloc::string::String, super::Entity>,
#[prost(message, repeated, tag = "4")]
pub sentiments: ::prost::alloc::vec::Vec<super::ConversationLevelSentiment>,
#[prost(map = "string, message", tag = "6")]
pub intents: ::std::collections::HashMap<::prost::alloc::string::String, super::Intent>,
#[prost(map = "string, message", tag = "7")]
pub phrase_matchers:
::std::collections::HashMap<::prost::alloc::string::String, super::PhraseMatchData>,
#[prost(message, optional, tag = "8")]
pub issue_model_result: ::core::option::Option<super::IssueModelResult>,
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Metadata {
#[prost(message, tag = "2")]
CallAnalysisMetadata(CallAnalysisMetadata),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IssueModelResult {
#[prost(string, tag = "1")]
pub issue_model: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub issues: ::prost::alloc::vec::Vec<IssueAssignment>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConversationLevelSentiment {
#[prost(int32, tag = "1")]
pub channel_tag: i32,
#[prost(message, optional, tag = "2")]
pub sentiment_data: ::core::option::Option<SentimentData>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IssueAssignment {
#[prost(string, tag = "1")]
pub issue: ::prost::alloc::string::String,
#[prost(double, tag = "2")]
pub score: f64,
#[prost(string, tag = "3")]
pub display_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CallAnnotation {
#[prost(int32, tag = "1")]
pub channel_tag: i32,
#[prost(message, optional, tag = "4")]
pub annotation_start_boundary: ::core::option::Option<AnnotationBoundary>,
#[prost(message, optional, tag = "5")]
pub annotation_end_boundary: ::core::option::Option<AnnotationBoundary>,
#[prost(oneof = "call_annotation::Data", tags = "10, 11, 12, 13, 15, 16, 17")]
pub data: ::core::option::Option<call_annotation::Data>,
}
pub mod call_annotation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Data {
#[prost(message, tag = "10")]
InterruptionData(super::InterruptionData),
#[prost(message, tag = "11")]
SentimentData(super::SentimentData),
#[prost(message, tag = "12")]
SilenceData(super::SilenceData),
#[prost(message, tag = "13")]
HoldData(super::HoldData),
#[prost(message, tag = "15")]
EntityMentionData(super::EntityMentionData),
#[prost(message, tag = "16")]
IntentMatchData(super::IntentMatchData),
#[prost(message, tag = "17")]
PhraseMatchData(super::PhraseMatchData),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AnnotationBoundary {
#[prost(int32, tag = "1")]
pub transcript_index: i32,
#[prost(oneof = "annotation_boundary::DetailedBoundary", tags = "3")]
pub detailed_boundary: ::core::option::Option<annotation_boundary::DetailedBoundary>,
}
pub mod annotation_boundary {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum DetailedBoundary {
#[prost(int32, tag = "3")]
WordIndex(i32),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Entity {
#[prost(string, tag = "1")]
pub display_name: ::prost::alloc::string::String,
#[prost(enumeration = "entity::Type", tag = "2")]
pub r#type: i32,
#[prost(map = "string, string", tag = "3")]
pub metadata:
::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
#[prost(float, tag = "4")]
pub salience: f32,
#[prost(message, optional, tag = "5")]
pub sentiment: ::core::option::Option<SentimentData>,
}
pub mod entity {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Type {
Unspecified = 0,
Person = 1,
Location = 2,
Organization = 3,
Event = 4,
WorkOfArt = 5,
ConsumerGood = 6,
Other = 7,
PhoneNumber = 9,
Address = 10,
Date = 11,
Number = 12,
Price = 13,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Intent {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub display_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PhraseMatchData {
#[prost(string, tag = "1")]
pub phrase_matcher: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub display_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DialogflowIntent {
#[prost(string, tag = "1")]
pub display_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InterruptionData {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SilenceData {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HoldData {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EntityMentionData {
#[prost(string, tag = "1")]
pub entity_unique_id: ::prost::alloc::string::String,
#[prost(enumeration = "entity_mention_data::MentionType", tag = "2")]
pub r#type: i32,
#[prost(message, optional, tag = "3")]
pub sentiment: ::core::option::Option<SentimentData>,
}
pub mod entity_mention_data {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MentionType {
Unspecified = 0,
Proper = 1,
Common = 2,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IntentMatchData {
#[prost(string, tag = "1")]
pub intent_unique_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SentimentData {
#[prost(float, tag = "1")]
pub magnitude: f32,
#[prost(float, tag = "2")]
pub score: f32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IssueModel {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub display_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "4")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(enumeration = "issue_model::State", tag = "5")]
pub state: i32,
#[prost(message, optional, tag = "6")]
pub input_data_config: ::core::option::Option<issue_model::InputDataConfig>,
#[prost(message, optional, tag = "7")]
pub training_stats: ::core::option::Option<IssueModelLabelStats>,
}
pub mod issue_model {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InputDataConfig {
#[deprecated]
#[prost(enumeration = "super::conversation::Medium", tag = "1")]
pub medium: i32,
#[prost(int64, tag = "2")]
pub training_conversations_count: i64,
#[prost(string, tag = "3")]
pub filter: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
Undeployed = 1,
Deploying = 2,
Deployed = 3,
Undeploying = 4,
Deleting = 5,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Issue {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub display_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "4")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IssueModelLabelStats {
#[prost(int64, tag = "1")]
pub analyzed_conversations_count: i64,
#[prost(int64, tag = "2")]
pub unclassified_conversations_count: i64,
#[prost(map = "string, message", tag = "3")]
pub issue_stats: ::std::collections::HashMap<
::prost::alloc::string::String,
issue_model_label_stats::IssueStats,
>,
}
pub mod issue_model_label_stats {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IssueStats {
#[prost(string, tag = "1")]
pub issue: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub labeled_conversations_count: i64,
#[prost(string, tag = "3")]
pub display_name: ::prost::alloc::string::String,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PhraseMatcher {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub revision_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub version_tag: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub revision_create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "5")]
pub display_name: ::prost::alloc::string::String,
#[prost(enumeration = "phrase_matcher::PhraseMatcherType", tag = "6")]
pub r#type: i32,
#[prost(bool, tag = "7")]
pub active: bool,
#[prost(message, repeated, tag = "8")]
pub phrase_match_rule_groups: ::prost::alloc::vec::Vec<PhraseMatchRuleGroup>,
#[prost(message, optional, tag = "9")]
pub activation_update_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(enumeration = "conversation_participant::Role", tag = "10")]
pub role_match: i32,
#[prost(message, optional, tag = "11")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
}
pub mod phrase_matcher {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PhraseMatcherType {
Unspecified = 0,
AllOf = 1,
AnyOf = 2,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PhraseMatchRuleGroup {
#[prost(enumeration = "phrase_match_rule_group::PhraseMatchRuleGroupType", tag = "1")]
pub r#type: i32,
#[prost(message, repeated, tag = "2")]
pub phrase_match_rules: ::prost::alloc::vec::Vec<PhraseMatchRule>,
}
pub mod phrase_match_rule_group {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PhraseMatchRuleGroupType {
Unspecified = 0,
AllOf = 1,
AnyOf = 2,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PhraseMatchRule {
#[prost(string, tag = "1")]
pub query: ::prost::alloc::string::String,
#[prost(bool, tag = "2")]
pub negated: bool,
#[prost(message, optional, tag = "3")]
pub config: ::core::option::Option<PhraseMatchRuleConfig>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PhraseMatchRuleConfig {
#[prost(oneof = "phrase_match_rule_config::Config", tags = "1")]
pub config: ::core::option::Option<phrase_match_rule_config::Config>,
}
pub mod phrase_match_rule_config {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Config {
#[prost(message, tag = "1")]
ExactMatchConfig(super::ExactMatchConfig),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExactMatchConfig {
#[prost(bool, tag = "1")]
pub case_sensitive: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Settings {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "3")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "4")]
pub language_code: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub conversation_ttl: ::core::option::Option<::prost_types::Duration>,
#[prost(map = "string, string", tag = "6")]
pub pubsub_notification_settings:
::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
#[prost(message, optional, tag = "7")]
pub analysis_config: ::core::option::Option<settings::AnalysisConfig>,
}
pub mod settings {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AnalysisConfig {
#[prost(double, tag = "1")]
pub runtime_integration_analysis_percentage: f64,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RuntimeAnnotation {
#[prost(string, tag = "1")]
pub annotation_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "3")]
pub start_boundary: ::core::option::Option<AnnotationBoundary>,
#[prost(message, optional, tag = "4")]
pub end_boundary: ::core::option::Option<AnnotationBoundary>,
#[prost(message, optional, tag = "5")]
pub answer_feedback: ::core::option::Option<AnswerFeedback>,
#[prost(oneof = "runtime_annotation::Data", tags = "6, 7, 8, 9, 10")]
pub data: ::core::option::Option<runtime_annotation::Data>,
}
pub mod runtime_annotation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Data {
#[prost(message, tag = "6")]
ArticleSuggestion(super::ArticleSuggestionData),
#[prost(message, tag = "7")]
FaqAnswer(super::FaqAnswerData),
#[prost(message, tag = "8")]
SmartReply(super::SmartReplyData),
#[prost(message, tag = "9")]
SmartComposeSuggestion(super::SmartComposeSuggestionData),
#[prost(message, tag = "10")]
DialogflowInteraction(super::DialogflowInteractionData),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AnswerFeedback {
#[prost(enumeration = "answer_feedback::CorrectnessLevel", tag = "1")]
pub correctness_level: i32,
#[prost(bool, tag = "2")]
pub clicked: bool,
#[prost(bool, tag = "3")]
pub displayed: bool,
}
pub mod answer_feedback {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CorrectnessLevel {
Unspecified = 0,
NotCorrect = 1,
PartiallyCorrect = 2,
FullyCorrect = 3,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ArticleSuggestionData {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub uri: ::prost::alloc::string::String,
#[prost(float, tag = "3")]
pub confidence_score: f32,
#[prost(map = "string, string", tag = "4")]
pub metadata:
::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
#[prost(string, tag = "5")]
pub query_record: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub source: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FaqAnswerData {
#[prost(string, tag = "1")]
pub answer: ::prost::alloc::string::String,
#[prost(float, tag = "2")]
pub confidence_score: f32,
#[prost(string, tag = "3")]
pub question: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "4")]
pub metadata:
::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
#[prost(string, tag = "5")]
pub query_record: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub source: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SmartReplyData {
#[prost(string, tag = "1")]
pub reply: ::prost::alloc::string::String,
#[prost(double, tag = "2")]
pub confidence_score: f64,
#[prost(map = "string, string", tag = "3")]
pub metadata:
::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
#[prost(string, tag = "4")]
pub query_record: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SmartComposeSuggestionData {
#[prost(string, tag = "1")]
pub suggestion: ::prost::alloc::string::String,
#[prost(double, tag = "2")]
pub confidence_score: f64,
#[prost(map = "string, string", tag = "3")]
pub metadata:
::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
#[prost(string, tag = "4")]
pub query_record: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DialogflowInteractionData {
#[prost(string, tag = "1")]
pub dialogflow_intent_id: ::prost::alloc::string::String,
#[prost(float, tag = "2")]
pub confidence: f32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConversationParticipant {
#[deprecated]
#[prost(string, tag = "1")]
pub dialogflow_participant: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub obfuscated_external_user_id: ::prost::alloc::string::String,
#[prost(enumeration = "conversation_participant::Role", tag = "2")]
pub role: i32,
#[prost(oneof = "conversation_participant::Participant", tags = "5, 6")]
pub participant: ::core::option::Option<conversation_participant::Participant>,
}
pub mod conversation_participant {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Role {
Unspecified = 0,
HumanAgent = 1,
AutomatedAgent = 2,
EndUser = 3,
AnyAgent = 4,
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Participant {
#[prost(string, tag = "5")]
DialogflowParticipantName(::prost::alloc::string::String),
#[prost(string, tag = "6")]
UserId(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CalculateStatsRequest {
#[prost(string, tag = "1")]
pub location: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub filter: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CalculateStatsResponse {
#[prost(message, optional, tag = "1")]
pub average_duration: ::core::option::Option<::prost_types::Duration>,
#[prost(int32, tag = "2")]
pub average_turn_count: i32,
#[prost(int32, tag = "3")]
pub conversation_count: i32,
#[prost(map = "string, int32", tag = "4")]
pub smart_highlighter_matches: ::std::collections::HashMap<::prost::alloc::string::String, i32>,
#[prost(map = "string, int32", tag = "5")]
pub custom_highlighter_matches:
::std::collections::HashMap<::prost::alloc::string::String, i32>,
#[prost(map = "string, int32", tag = "6")]
pub issue_matches: ::std::collections::HashMap<::prost::alloc::string::String, i32>,
#[prost(map = "string, message", tag = "8")]
pub issue_matches_stats: ::std::collections::HashMap<
::prost::alloc::string::String,
issue_model_label_stats::IssueStats,
>,
#[prost(message, optional, tag = "7")]
pub conversation_count_time_series:
::core::option::Option<calculate_stats_response::TimeSeries>,
}
pub mod calculate_stats_response {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimeSeries {
#[prost(message, optional, tag = "1")]
pub interval_duration: ::core::option::Option<::prost_types::Duration>,
#[prost(message, repeated, tag = "2")]
pub points: ::prost::alloc::vec::Vec<time_series::Interval>,
}
pub mod time_series {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Interval {
#[prost(message, optional, tag = "1")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(int32, tag = "2")]
pub conversation_count: i32,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateAnalysisOperationMetadata {
#[prost(message, optional, tag = "1")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "2")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "3")]
pub conversation: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateConversationRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub conversation: ::core::option::Option<Conversation>,
#[prost(string, tag = "3")]
pub conversation_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListConversationsRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub page_size: i32,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
#[prost(enumeration = "ConversationView", tag = "5")]
pub view: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListConversationsResponse {
#[prost(message, repeated, tag = "1")]
pub conversations: ::prost::alloc::vec::Vec<Conversation>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetConversationRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(enumeration = "ConversationView", tag = "2")]
pub view: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateConversationRequest {
#[prost(message, optional, tag = "1")]
pub conversation: ::core::option::Option<Conversation>,
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteConversationRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(bool, tag = "2")]
pub force: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateAnalysisRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub analysis: ::core::option::Option<Analysis>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAnalysesRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub page_size: i32,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAnalysesResponse {
#[prost(message, repeated, tag = "1")]
pub analyses: ::prost::alloc::vec::Vec<Analysis>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAnalysisRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteAnalysisRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExportInsightsDataRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub filter: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub kms_key: ::prost::alloc::string::String,
#[prost(oneof = "export_insights_data_request::Destination", tags = "2")]
pub destination: ::core::option::Option<export_insights_data_request::Destination>,
}
pub mod export_insights_data_request {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BigQueryDestination {
#[prost(string, tag = "3")]
pub project_id: ::prost::alloc::string::String,
#[prost(string, tag = "1")]
pub dataset: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub table: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Destination {
#[prost(message, tag = "2")]
BigQueryDestination(BigQueryDestination),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExportInsightsDataMetadata {
#[prost(message, optional, tag = "1")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "2")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "3")]
pub request: ::core::option::Option<ExportInsightsDataRequest>,
#[prost(message, repeated, tag = "4")]
pub partial_errors: ::prost::alloc::vec::Vec<super::super::super::rpc::Status>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExportInsightsDataResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateIssueModelRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub issue_model: ::core::option::Option<IssueModel>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateIssueModelMetadata {
#[prost(message, optional, tag = "1")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "2")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "3")]
pub request: ::core::option::Option<CreateIssueModelRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateIssueModelRequest {
#[prost(message, optional, tag = "1")]
pub issue_model: ::core::option::Option<IssueModel>,
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListIssueModelsRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListIssueModelsResponse {
#[prost(message, repeated, tag = "1")]
pub issue_models: ::prost::alloc::vec::Vec<IssueModel>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetIssueModelRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteIssueModelRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteIssueModelMetadata {
#[prost(message, optional, tag = "1")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "2")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "3")]
pub request: ::core::option::Option<DeleteIssueModelRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeployIssueModelRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeployIssueModelResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeployIssueModelMetadata {
#[prost(message, optional, tag = "1")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "2")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "3")]
pub request: ::core::option::Option<DeployIssueModelRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UndeployIssueModelRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UndeployIssueModelResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UndeployIssueModelMetadata {
#[prost(message, optional, tag = "1")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "2")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "3")]
pub request: ::core::option::Option<UndeployIssueModelRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetIssueRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListIssuesRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListIssuesResponse {
#[prost(message, repeated, tag = "1")]
pub issues: ::prost::alloc::vec::Vec<Issue>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateIssueRequest {
#[prost(message, optional, tag = "1")]
pub issue: ::core::option::Option<Issue>,
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CalculateIssueModelStatsRequest {
#[prost(string, tag = "1")]
pub issue_model: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CalculateIssueModelStatsResponse {
#[prost(message, optional, tag = "4")]
pub current_stats: ::core::option::Option<IssueModelLabelStats>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreatePhraseMatcherRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub phrase_matcher: ::core::option::Option<PhraseMatcher>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPhraseMatchersRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub page_size: i32,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPhraseMatchersResponse {
#[prost(message, repeated, tag = "1")]
pub phrase_matchers: ::prost::alloc::vec::Vec<PhraseMatcher>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPhraseMatcherRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeletePhraseMatcherRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdatePhraseMatcherRequest {
#[prost(message, optional, tag = "1")]
pub phrase_matcher: ::core::option::Option<PhraseMatcher>,
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSettingsRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateSettingsRequest {
#[prost(message, optional, tag = "1")]
pub settings: ::core::option::Option<Settings>,
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ConversationView {
Unspecified = 0,
Basic = 1,
Full = 2,
}
#[doc = r" Generated client implementations."]
pub mod contact_center_insights_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " An API that lets users analyze and explore their business conversation data."]
#[derive(Debug, Clone)]
pub struct ContactCenterInsightsClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> ContactCenterInsightsClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ContactCenterInsightsClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
ContactCenterInsightsClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Creates a conversation."]
pub async fn create_conversation(
&mut self,
request: impl tonic::IntoRequest<super::CreateConversationRequest>,
) -> Result<tonic::Response<super::Conversation>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.contactcenterinsights.v1.ContactCenterInsights/CreateConversation",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Updates a conversation."]
pub async fn update_conversation(
&mut self,
request: impl tonic::IntoRequest<super::UpdateConversationRequest>,
) -> Result<tonic::Response<super::Conversation>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.contactcenterinsights.v1.ContactCenterInsights/UpdateConversation",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets a conversation."]
pub async fn get_conversation(
&mut self,
request: impl tonic::IntoRequest<super::GetConversationRequest>,
) -> Result<tonic::Response<super::Conversation>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.contactcenterinsights.v1.ContactCenterInsights/GetConversation",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Lists conversations."]
pub async fn list_conversations(
&mut self,
request: impl tonic::IntoRequest<super::ListConversationsRequest>,
) -> Result<tonic::Response<super::ListConversationsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.contactcenterinsights.v1.ContactCenterInsights/ListConversations",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Deletes a conversation."]
pub async fn delete_conversation(
&mut self,
request: impl tonic::IntoRequest<super::DeleteConversationRequest>,
) -> Result<tonic::Response<()>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.contactcenterinsights.v1.ContactCenterInsights/DeleteConversation",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates an analysis. The long running operation is done when the analysis"]
#[doc = " has completed."]
pub async fn create_analysis(
&mut self,
request: impl tonic::IntoRequest<super::CreateAnalysisRequest>,
) -> Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.contactcenterinsights.v1.ContactCenterInsights/CreateAnalysis",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets an analysis."]
pub async fn get_analysis(
&mut self,
request: impl tonic::IntoRequest<super::GetAnalysisRequest>,
) -> Result<tonic::Response<super::Analysis>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.contactcenterinsights.v1.ContactCenterInsights/GetAnalysis",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Lists analyses."]
pub async fn list_analyses(
&mut self,
request: impl tonic::IntoRequest<super::ListAnalysesRequest>,
) -> Result<tonic::Response<super::ListAnalysesResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.contactcenterinsights.v1.ContactCenterInsights/ListAnalyses",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Deletes an analysis."]
pub async fn delete_analysis(
&mut self,
request: impl tonic::IntoRequest<super::DeleteAnalysisRequest>,
) -> Result<tonic::Response<()>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.contactcenterinsights.v1.ContactCenterInsights/DeleteAnalysis",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Export insights data to a destination defined in the request body."]
pub async fn export_insights_data(
&mut self,
request: impl tonic::IntoRequest<super::ExportInsightsDataRequest>,
) -> Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.contactcenterinsights.v1.ContactCenterInsights/ExportInsightsData",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates an issue model."]
pub async fn create_issue_model(
&mut self,
request: impl tonic::IntoRequest<super::CreateIssueModelRequest>,
) -> Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.contactcenterinsights.v1.ContactCenterInsights/CreateIssueModel",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Updates an issue model."]
pub async fn update_issue_model(
&mut self,
request: impl tonic::IntoRequest<super::UpdateIssueModelRequest>,
) -> Result<tonic::Response<super::IssueModel>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.contactcenterinsights.v1.ContactCenterInsights/UpdateIssueModel",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets an issue model."]
pub async fn get_issue_model(
&mut self,
request: impl tonic::IntoRequest<super::GetIssueModelRequest>,
) -> Result<tonic::Response<super::IssueModel>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.contactcenterinsights.v1.ContactCenterInsights/GetIssueModel",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Lists issue models."]
pub async fn list_issue_models(
&mut self,
request: impl tonic::IntoRequest<super::ListIssueModelsRequest>,
) -> Result<tonic::Response<super::ListIssueModelsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.contactcenterinsights.v1.ContactCenterInsights/ListIssueModels",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Deletes an issue model."]
pub async fn delete_issue_model(
&mut self,
request: impl tonic::IntoRequest<super::DeleteIssueModelRequest>,
) -> Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.contactcenterinsights.v1.ContactCenterInsights/DeleteIssueModel",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Deploys an issue model. Returns an error if a model is already deployed."]
#[doc = " An issue model can only be used in analysis after it has been deployed."]
pub async fn deploy_issue_model(
&mut self,
request: impl tonic::IntoRequest<super::DeployIssueModelRequest>,
) -> Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.contactcenterinsights.v1.ContactCenterInsights/DeployIssueModel",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Undeploys an issue model."]
#[doc = " An issue model can not be used in analysis after it has been undeployed."]
pub async fn undeploy_issue_model(
&mut self,
request: impl tonic::IntoRequest<super::UndeployIssueModelRequest>,
) -> Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.contactcenterinsights.v1.ContactCenterInsights/UndeployIssueModel",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets an issue."]
pub async fn get_issue(
&mut self,
request: impl tonic::IntoRequest<super::GetIssueRequest>,
) -> Result<tonic::Response<super::Issue>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.contactcenterinsights.v1.ContactCenterInsights/GetIssue",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Lists issues."]
pub async fn list_issues(
&mut self,
request: impl tonic::IntoRequest<super::ListIssuesRequest>,
) -> Result<tonic::Response<super::ListIssuesResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.contactcenterinsights.v1.ContactCenterInsights/ListIssues",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Updates an issue."]
pub async fn update_issue(
&mut self,
request: impl tonic::IntoRequest<super::UpdateIssueRequest>,
) -> Result<tonic::Response<super::Issue>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.contactcenterinsights.v1.ContactCenterInsights/UpdateIssue",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets an issue model's statistics."]
pub async fn calculate_issue_model_stats(
&mut self,
request: impl tonic::IntoRequest<super::CalculateIssueModelStatsRequest>,
) -> Result<tonic::Response<super::CalculateIssueModelStatsResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.cloud.contactcenterinsights.v1.ContactCenterInsights/CalculateIssueModelStats") ;
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates a phrase matcher."]
pub async fn create_phrase_matcher(
&mut self,
request: impl tonic::IntoRequest<super::CreatePhraseMatcherRequest>,
) -> Result<tonic::Response<super::PhraseMatcher>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.contactcenterinsights.v1.ContactCenterInsights/CreatePhraseMatcher",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets a phrase matcher."]
pub async fn get_phrase_matcher(
&mut self,
request: impl tonic::IntoRequest<super::GetPhraseMatcherRequest>,
) -> Result<tonic::Response<super::PhraseMatcher>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.contactcenterinsights.v1.ContactCenterInsights/GetPhraseMatcher",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Lists phrase matchers."]
pub async fn list_phrase_matchers(
&mut self,
request: impl tonic::IntoRequest<super::ListPhraseMatchersRequest>,
) -> Result<tonic::Response<super::ListPhraseMatchersResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.contactcenterinsights.v1.ContactCenterInsights/ListPhraseMatchers",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Deletes a phrase matcher."]
pub async fn delete_phrase_matcher(
&mut self,
request: impl tonic::IntoRequest<super::DeletePhraseMatcherRequest>,
) -> Result<tonic::Response<()>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.contactcenterinsights.v1.ContactCenterInsights/DeletePhraseMatcher",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Updates a phrase matcher."]
pub async fn update_phrase_matcher(
&mut self,
request: impl tonic::IntoRequest<super::UpdatePhraseMatcherRequest>,
) -> Result<tonic::Response<super::PhraseMatcher>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.contactcenterinsights.v1.ContactCenterInsights/UpdatePhraseMatcher",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets conversation statistics."]
pub async fn calculate_stats(
&mut self,
request: impl tonic::IntoRequest<super::CalculateStatsRequest>,
) -> Result<tonic::Response<super::CalculateStatsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.contactcenterinsights.v1.ContactCenterInsights/CalculateStats",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets project-level settings."]
pub async fn get_settings(
&mut self,
request: impl tonic::IntoRequest<super::GetSettingsRequest>,
) -> Result<tonic::Response<super::Settings>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.contactcenterinsights.v1.ContactCenterInsights/GetSettings",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Updates project-level settings."]
pub async fn update_settings(
&mut self,
request: impl tonic::IntoRequest<super::UpdateSettingsRequest>,
) -> Result<tonic::Response<super::Settings>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.contactcenterinsights.v1.ContactCenterInsights/UpdateSettings",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}