resources.proto 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116
  1. // Copyright 2022 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.cloud.contactcenterinsights.v1;
  16. import "google/api/field_behavior.proto";
  17. import "google/api/resource.proto";
  18. import "google/protobuf/duration.proto";
  19. import "google/protobuf/timestamp.proto";
  20. option csharp_namespace = "Google.Cloud.ContactCenterInsights.V1";
  21. option go_package = "google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1;contactcenterinsights";
  22. option java_multiple_files = true;
  23. option java_outer_classname = "ResourcesProto";
  24. option java_package = "com.google.cloud.contactcenterinsights.v1";
  25. option php_namespace = "Google\\Cloud\\ContactCenterInsights\\V1";
  26. option ruby_package = "Google::Cloud::ContactCenterInsights::V1";
  27. option (google.api.resource_definition) = {
  28. type: "dialogflow.googleapis.com/Participant"
  29. pattern: "projects/{project}/conversations/{conversation}/participants/{participant}"
  30. pattern: "projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant}"
  31. };
  32. // The conversation resource.
  33. message Conversation {
  34. option (google.api.resource) = {
  35. type: "contactcenterinsights.googleapis.com/Conversation"
  36. pattern: "projects/{project}/locations/{location}/conversations/{conversation}"
  37. };
  38. // Call-specific metadata.
  39. message CallMetadata {
  40. // The audio channel that contains the customer.
  41. int32 customer_channel = 1;
  42. // The audio channel that contains the agent.
  43. int32 agent_channel = 2;
  44. }
  45. // A message representing the transcript of a conversation.
  46. message Transcript {
  47. // A segment of a full transcript.
  48. message TranscriptSegment {
  49. // Word-level info for words in a transcript.
  50. message WordInfo {
  51. // Time offset of the start of this word relative to the beginning of
  52. // the total conversation.
  53. google.protobuf.Duration start_offset = 1;
  54. // Time offset of the end of this word relative to the beginning of the
  55. // total conversation.
  56. google.protobuf.Duration end_offset = 2;
  57. // The word itself. Includes punctuation marks that surround the word.
  58. string word = 3;
  59. // A confidence estimate between 0.0 and 1.0 of the fidelity of this
  60. // word. A default value of 0.0 indicates that the value is unset.
  61. float confidence = 4;
  62. }
  63. // Metadata from Dialogflow relating to the current transcript segment.
  64. message DialogflowSegmentMetadata {
  65. // Whether the transcript segment was covered under the configured smart
  66. // reply allowlist in Agent Assist.
  67. bool smart_reply_allowlist_covered = 1;
  68. }
  69. // The time that the message occurred, if provided.
  70. google.protobuf.Timestamp message_time = 6;
  71. // The text of this segment.
  72. string text = 1;
  73. // A confidence estimate between 0.0 and 1.0 of the fidelity of this
  74. // segment. A default value of 0.0 indicates that the value is unset.
  75. float confidence = 2;
  76. // A list of the word-specific information for each word in the segment.
  77. repeated WordInfo words = 3;
  78. // The language code of this segment as a
  79. // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
  80. // Example: "en-US".
  81. string language_code = 4;
  82. // For conversations derived from multi-channel audio, this is the channel
  83. // number corresponding to the audio from that channel. For
  84. // audioChannelCount = N, its output values can range from '1' to 'N'. A
  85. // channel tag of 0 indicates that the audio is mono.
  86. int32 channel_tag = 5;
  87. // The participant of this segment.
  88. ConversationParticipant segment_participant = 9;
  89. // CCAI metadata relating to the current transcript segment.
  90. DialogflowSegmentMetadata dialogflow_segment_metadata = 10;
  91. // The sentiment for this transcript segment.
  92. SentimentData sentiment = 11;
  93. }
  94. // A list of sequential transcript segments that comprise the conversation.
  95. repeated TranscriptSegment transcript_segments = 1;
  96. }
  97. // Possible media for the conversation.
  98. enum Medium {
  99. // Default value, if unspecified will default to PHONE_CALL.
  100. MEDIUM_UNSPECIFIED = 0;
  101. // The format for conversations that took place over the phone.
  102. PHONE_CALL = 1;
  103. // The format for conversations that took place over chat.
  104. CHAT = 2;
  105. }
  106. // Metadata that applies to the conversation.
  107. oneof metadata {
  108. // Call-specific metadata.
  109. CallMetadata call_metadata = 7;
  110. }
  111. // A time to live expiration setting, can be either a specified timestamp or a
  112. // duration from the time that the conversation creation request was received.
  113. // Conversations with an expiration set will be removed up to 24 hours after
  114. // the specified time.
  115. oneof expiration {
  116. // The time at which this conversation should expire. After this time, the
  117. // conversation data and any associated analyses will be deleted.
  118. google.protobuf.Timestamp expire_time = 15;
  119. // Input only. The TTL for this resource. If specified, then this TTL will
  120. // be used to calculate the expire time.
  121. google.protobuf.Duration ttl = 16 [(google.api.field_behavior) = INPUT_ONLY];
  122. }
  123. // Immutable. The resource name of the conversation.
  124. // Format:
  125. // projects/{project}/locations/{location}/conversations/{conversation}
  126. string name = 1 [(google.api.field_behavior) = IMMUTABLE];
  127. // The source of the audio and transcription for the conversation.
  128. ConversationDataSource data_source = 2;
  129. // Output only. The time at which the conversation was created.
  130. google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  131. // Output only. The most recent time at which the conversation was updated.
  132. google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  133. // The time at which the conversation started.
  134. google.protobuf.Timestamp start_time = 17;
  135. // A user-specified language code for the conversation.
  136. string language_code = 14;
  137. // An opaque, user-specified string representing the human agent who handled
  138. // the conversation.
  139. string agent_id = 5;
  140. // A map for the user to specify any custom fields. A maximum of 20 labels per
  141. // conversation is allowed, with a maximum of 256 characters per entry.
  142. map<string, string> labels = 6;
  143. // Output only. The conversation transcript.
  144. Transcript transcript = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  145. // Immutable. The conversation medium, if unspecified will default to PHONE_CALL.
  146. Medium medium = 9 [(google.api.field_behavior) = IMMUTABLE];
  147. // Output only. The duration of the conversation.
  148. google.protobuf.Duration duration = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
  149. // Output only. The number of turns in the conversation.
  150. int32 turn_count = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
  151. // Output only. The conversation's latest analysis, if one exists.
  152. Analysis latest_analysis = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
  153. // Output only. The annotations that were generated during the customer and agent
  154. // interaction.
  155. repeated RuntimeAnnotation runtime_annotations = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
  156. // Output only. All the matched Dialogflow intents in the call. The key corresponds to a
  157. // Dialogflow intent, format:
  158. // projects/{project}/agent/{agent}/intents/{intent}
  159. map<string, DialogflowIntent> dialogflow_intents = 18 [(google.api.field_behavior) = OUTPUT_ONLY];
  160. // Obfuscated user ID which the customer sent to us.
  161. string obfuscated_user_id = 21;
  162. }
  163. // The analysis resource.
  164. message Analysis {
  165. option (google.api.resource) = {
  166. type: "contactcenterinsights.googleapis.com/Analysis"
  167. pattern: "projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis}"
  168. };
  169. // Immutable. The resource name of the analysis.
  170. // Format:
  171. // projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis}
  172. string name = 1 [(google.api.field_behavior) = IMMUTABLE];
  173. // Output only. The time at which the analysis was requested.
  174. google.protobuf.Timestamp request_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  175. // Output only. The time at which the analysis was created, which occurs when the
  176. // long-running operation completes.
  177. google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  178. // Output only. The result of the analysis, which is populated when the analysis
  179. // finishes.
  180. AnalysisResult analysis_result = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  181. }
  182. // The conversation source, which is a combination of transcript and audio.
  183. message ConversationDataSource {
  184. // The source of the conversation.
  185. oneof source {
  186. // A Cloud Storage location specification for the audio and transcript.
  187. GcsSource gcs_source = 1;
  188. // The source when the conversation comes from Dialogflow.
  189. DialogflowSource dialogflow_source = 3;
  190. }
  191. }
  192. // A Cloud Storage source of conversation data.
  193. message GcsSource {
  194. // Cloud Storage URI that points to a file that contains the conversation
  195. // audio.
  196. string audio_uri = 1;
  197. // Immutable. Cloud Storage URI that points to a file that contains the conversation
  198. // transcript.
  199. string transcript_uri = 2 [(google.api.field_behavior) = IMMUTABLE];
  200. }
  201. // A Dialogflow source of conversation data.
  202. message DialogflowSource {
  203. // Output only. The name of the Dialogflow conversation that this conversation
  204. // resource is derived from. Format:
  205. // projects/{project}/locations/{location}/conversations/{conversation}
  206. string dialogflow_conversation = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  207. // Cloud Storage URI that points to a file that contains the conversation
  208. // audio.
  209. string audio_uri = 3;
  210. }
  211. // The result of an analysis.
  212. message AnalysisResult {
  213. // Call-specific metadata created during analysis.
  214. message CallAnalysisMetadata {
  215. // A list of call annotations that apply to this call.
  216. repeated CallAnnotation annotations = 2;
  217. // All the entities in the call.
  218. map<string, Entity> entities = 3;
  219. // Overall conversation-level sentiment for each channel of the call.
  220. repeated ConversationLevelSentiment sentiments = 4;
  221. // All the matched intents in the call.
  222. map<string, Intent> intents = 6;
  223. // All the matched phrase matchers in the call.
  224. map<string, PhraseMatchData> phrase_matchers = 7;
  225. // Overall conversation-level issue modeling result.
  226. IssueModelResult issue_model_result = 8;
  227. }
  228. // Metadata discovered during analysis.
  229. oneof metadata {
  230. // Call-specific metadata created by the analysis.
  231. CallAnalysisMetadata call_analysis_metadata = 2;
  232. }
  233. // The time at which the analysis ended.
  234. google.protobuf.Timestamp end_time = 1;
  235. }
  236. // Issue Modeling result on a conversation.
  237. message IssueModelResult {
  238. // Issue model that generates the result.
  239. // Format: projects/{project}/locations/{location}/issueModels/{issue_model}
  240. string issue_model = 1 [(google.api.resource_reference) = {
  241. type: "contactcenterinsights.googleapis.com/IssueModel"
  242. }];
  243. // All the matched issues.
  244. repeated IssueAssignment issues = 2;
  245. }
  246. // One channel of conversation-level sentiment data.
  247. message ConversationLevelSentiment {
  248. // The channel of the audio that the data applies to.
  249. int32 channel_tag = 1;
  250. // Data specifying sentiment.
  251. SentimentData sentiment_data = 2;
  252. }
  253. // Information about the issue.
  254. message IssueAssignment {
  255. // Resource name of the assigned issue.
  256. string issue = 1;
  257. // Score indicating the likelihood of the issue assignment.
  258. // currently bounded on [0,1].
  259. double score = 2;
  260. // Immutable. Display name of the assigned issue. This field is set at time of analyis
  261. // and immutable since then.
  262. string display_name = 3 [(google.api.field_behavior) = IMMUTABLE];
  263. }
  264. // A piece of metadata that applies to a window of a call.
  265. message CallAnnotation {
  266. // The data in the annotation.
  267. oneof data {
  268. // Data specifying an interruption.
  269. InterruptionData interruption_data = 10;
  270. // Data specifying sentiment.
  271. SentimentData sentiment_data = 11;
  272. // Data specifying silence.
  273. SilenceData silence_data = 12;
  274. // Data specifying a hold.
  275. HoldData hold_data = 13;
  276. // Data specifying an entity mention.
  277. EntityMentionData entity_mention_data = 15;
  278. // Data specifying an intent match.
  279. IntentMatchData intent_match_data = 16;
  280. // Data specifying a phrase match.
  281. PhraseMatchData phrase_match_data = 17;
  282. }
  283. // The channel of the audio where the annotation occurs. For single-channel
  284. // audio, this field is not populated.
  285. int32 channel_tag = 1;
  286. // The boundary in the conversation where the annotation starts, inclusive.
  287. AnnotationBoundary annotation_start_boundary = 4;
  288. // The boundary in the conversation where the annotation ends, inclusive.
  289. AnnotationBoundary annotation_end_boundary = 5;
  290. }
  291. // A point in a conversation that marks the start or the end of an annotation.
  292. message AnnotationBoundary {
  293. // A detailed boundary, which describes a more specific point.
  294. oneof detailed_boundary {
  295. // The word index of this boundary with respect to the first word in the
  296. // transcript piece. This index starts at zero.
  297. int32 word_index = 3;
  298. }
  299. // The index in the sequence of transcribed pieces of the conversation where
  300. // the boundary is located. This index starts at zero.
  301. int32 transcript_index = 1;
  302. }
  303. // The data for an entity annotation.
  304. // Represents a phrase in the conversation that is a known entity, such
  305. // as a person, an organization, or location.
  306. message Entity {
  307. // The type of the entity. For most entity types, the associated metadata is a
  308. // Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`). The table
  309. // below lists the associated fields for entities that have different
  310. // metadata.
  311. enum Type {
  312. // Unspecified.
  313. TYPE_UNSPECIFIED = 0;
  314. // Person.
  315. PERSON = 1;
  316. // Location.
  317. LOCATION = 2;
  318. // Organization.
  319. ORGANIZATION = 3;
  320. // Event.
  321. EVENT = 4;
  322. // Artwork.
  323. WORK_OF_ART = 5;
  324. // Consumer product.
  325. CONSUMER_GOOD = 6;
  326. // Other types of entities.
  327. OTHER = 7;
  328. // Phone number.
  329. //
  330. // The metadata lists the phone number (formatted according to local
  331. // convention), plus whichever additional elements appear in the text:
  332. //
  333. // * `number` - The actual number, broken down into sections according to
  334. // local convention.
  335. // * `national_prefix` - Country code, if detected.
  336. // * `area_code` - Region or area code, if detected.
  337. // * `extension` - Phone extension (to be dialed after connection), if
  338. // detected.
  339. PHONE_NUMBER = 9;
  340. // Address.
  341. //
  342. // The metadata identifies the street number and locality plus whichever
  343. // additional elements appear in the text:
  344. //
  345. // * `street_number` - Street number.
  346. // * `locality` - City or town.
  347. // * `street_name` - Street/route name, if detected.
  348. // * `postal_code` - Postal code, if detected.
  349. // * `country` - Country, if detected.
  350. // * `broad_region` - Administrative area, such as the state, if detected.
  351. // * `narrow_region` - Smaller administrative area, such as county, if
  352. // detected.
  353. // * `sublocality` - Used in Asian addresses to demark a district within a
  354. // city, if detected.
  355. ADDRESS = 10;
  356. // Date.
  357. //
  358. // The metadata identifies the components of the date:
  359. //
  360. // * `year` - Four digit year, if detected.
  361. // * `month` - Two digit month number, if detected.
  362. // * `day` - Two digit day number, if detected.
  363. DATE = 11;
  364. // Number.
  365. //
  366. // The metadata is the number itself.
  367. NUMBER = 12;
  368. // Price.
  369. //
  370. // The metadata identifies the `value` and `currency`.
  371. PRICE = 13;
  372. }
  373. // The representative name for the entity.
  374. string display_name = 1;
  375. // The entity type.
  376. Type type = 2;
  377. // Metadata associated with the entity.
  378. //
  379. // For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`)
  380. // and Knowledge Graph MID (`mid`), if they are available. For the metadata
  381. // associated with other entity types, see the Type table below.
  382. map<string, string> metadata = 3;
  383. // The salience score associated with the entity in the [0, 1.0] range.
  384. //
  385. // The salience score for an entity provides information about the
  386. // importance or centrality of that entity to the entire document text.
  387. // Scores closer to 0 are less salient, while scores closer to 1.0 are highly
  388. // salient.
  389. float salience = 4;
  390. // The aggregate sentiment expressed for this entity in the conversation.
  391. SentimentData sentiment = 5;
  392. }
  393. // The data for an intent.
  394. // Represents a detected intent in the conversation, for example MAKES_PROMISE.
  395. message Intent {
  396. // The unique identifier of the intent.
  397. string id = 1;
  398. // The human-readable name of the intent.
  399. string display_name = 2;
  400. }
  401. // The data for a matched phrase matcher.
  402. // Represents information identifying a phrase matcher for a given match.
  403. message PhraseMatchData {
  404. // The unique identifier (the resource name) of the phrase matcher.
  405. string phrase_matcher = 1;
  406. // The human-readable name of the phrase matcher.
  407. string display_name = 2;
  408. }
  409. // The data for a Dialogflow intent.
  410. // Represents a detected intent in the conversation, e.g. MAKES_PROMISE.
  411. message DialogflowIntent {
  412. // The human-readable name of the intent.
  413. string display_name = 1;
  414. }
  415. // The data for an interruption annotation.
  416. message InterruptionData {
  417. }
  418. // The data for a silence annotation.
  419. message SilenceData {
  420. }
  421. // The data for a hold annotation.
  422. message HoldData {
  423. }
  424. // The data for an entity mention annotation.
  425. // This represents a mention of an `Entity` in the conversation.
  426. message EntityMentionData {
  427. // The supported types of mentions.
  428. enum MentionType {
  429. // Unspecified.
  430. MENTION_TYPE_UNSPECIFIED = 0;
  431. // Proper noun.
  432. PROPER = 1;
  433. // Common noun (or noun compound).
  434. COMMON = 2;
  435. }
  436. // The key of this entity in conversation entities.
  437. // Can be used to retrieve the exact `Entity` this mention is attached to.
  438. string entity_unique_id = 1;
  439. // The type of the entity mention.
  440. MentionType type = 2;
  441. // Sentiment expressed for this mention of the entity.
  442. SentimentData sentiment = 3;
  443. }
  444. // The data for an intent match.
  445. // Represents an intent match for a text segment in the conversation. A text
  446. // segment can be part of a sentence, a complete sentence, or an utterance
  447. // with multiple sentences.
  448. message IntentMatchData {
  449. // The id of the matched intent.
  450. // Can be used to retrieve the corresponding intent information.
  451. string intent_unique_id = 1;
  452. }
  453. // The data for a sentiment annotation.
  454. message SentimentData {
  455. // A non-negative number from 0 to infinity which represents the abolute
  456. // magnitude of sentiment regardless of score.
  457. float magnitude = 1;
  458. // The sentiment score between -1.0 (negative) and 1.0 (positive).
  459. float score = 2;
  460. }
  461. // The issue model resource.
  462. message IssueModel {
  463. option (google.api.resource) = {
  464. type: "contactcenterinsights.googleapis.com/IssueModel"
  465. pattern: "projects/{project}/locations/{location}/issueModels/{issue_model}"
  466. };
  467. // Configs for the input data used to create the issue model.
  468. message InputDataConfig {
  469. // Medium of conversations used in training data. This field is being
  470. // deprecated. To specify the medium to be used in training a new issue
  471. // model, set the `medium` field on `filter`.
  472. Conversation.Medium medium = 1 [deprecated = true];
  473. // Output only. Number of conversations used in training. Output only.
  474. int64 training_conversations_count = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  475. // A filter to reduce the conversations used for training the model to a
  476. // specific subset.
  477. string filter = 3;
  478. }
  479. // State of the model.
  480. enum State {
  481. // Unspecified.
  482. STATE_UNSPECIFIED = 0;
  483. // Model is not deployed but is ready to deploy.
  484. UNDEPLOYED = 1;
  485. // Model is being deployed.
  486. DEPLOYING = 2;
  487. // Model is deployed and is ready to be used. A model can only be used in
  488. // analysis if it's in this state.
  489. DEPLOYED = 3;
  490. // Model is being undeployed.
  491. UNDEPLOYING = 4;
  492. // Model is being deleted.
  493. DELETING = 5;
  494. }
  495. // Immutable. The resource name of the issue model.
  496. // Format:
  497. // projects/{project}/locations/{location}/issueModels/{issue_model}
  498. string name = 1 [(google.api.field_behavior) = IMMUTABLE];
  499. // The representative name for the issue model.
  500. string display_name = 2;
  501. // Output only. The time at which this issue model was created.
  502. google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  503. // Output only. The most recent time at which the issue model was updated.
  504. google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  505. // Output only. State of the model.
  506. State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  507. // Configs for the input data that used to create the issue model.
  508. InputDataConfig input_data_config = 6;
  509. // Output only. Immutable. The issue model's label statistics on its training data.
  510. IssueModelLabelStats training_stats = 7 [
  511. (google.api.field_behavior) = OUTPUT_ONLY,
  512. (google.api.field_behavior) = IMMUTABLE
  513. ];
  514. }
  515. // The issue resource.
  516. message Issue {
  517. option (google.api.resource) = {
  518. type: "contactcenterinsights.googleapis.com/Issue"
  519. pattern: "projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue}"
  520. };
  521. // Immutable. The resource name of the issue.
  522. // Format:
  523. // projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue}
  524. string name = 1 [(google.api.field_behavior) = IMMUTABLE];
  525. // The representative name for the issue.
  526. string display_name = 2;
  527. // Output only. The time at which this issue was created.
  528. google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  529. // Output only. The most recent time that this issue was updated.
  530. google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  531. }
  532. // Aggregated statistics about an issue model.
  533. message IssueModelLabelStats {
  534. // Aggregated statistics about an issue.
  535. message IssueStats {
  536. // Issue resource.
  537. // Format:
  538. // projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue}
  539. string issue = 1;
  540. // Number of conversations attached to the issue at this point in time.
  541. int64 labeled_conversations_count = 2;
  542. // Display name of the issue.
  543. string display_name = 3;
  544. }
  545. // Number of conversations the issue model has analyzed at this point in time.
  546. int64 analyzed_conversations_count = 1;
  547. // Number of analyzed conversations for which no issue was applicable at this
  548. // point in time.
  549. int64 unclassified_conversations_count = 2;
  550. // Statistics on each issue. Key is the issue's resource name.
  551. map<string, IssueStats> issue_stats = 3;
  552. }
  553. // The phrase matcher resource.
  554. message PhraseMatcher {
  555. option (google.api.resource) = {
  556. type: "contactcenterinsights.googleapis.com/PhraseMatcher"
  557. pattern: "projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher}"
  558. };
  559. // Specifies how to combine each phrase match rule group to determine whether
  560. // there is a match.
  561. enum PhraseMatcherType {
  562. // Unspecified.
  563. PHRASE_MATCHER_TYPE_UNSPECIFIED = 0;
  564. // Must meet all phrase match rule groups or there is no match.
  565. ALL_OF = 1;
  566. // If any of the phrase match rule groups are met, there is a match.
  567. ANY_OF = 2;
  568. }
  569. // The resource name of the phrase matcher.
  570. // Format:
  571. // projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher}
  572. string name = 1;
  573. // Output only. Immutable. The revision ID of the phrase matcher.
  574. // A new revision is committed whenever the matcher is changed, except when it
  575. // is activated or deactivated. A server generated random ID will be used.
  576. // Example: locations/global/phraseMatchers/my-first-matcher@1234567
  577. string revision_id = 2 [
  578. (google.api.field_behavior) = IMMUTABLE,
  579. (google.api.field_behavior) = OUTPUT_ONLY
  580. ];
  581. // The customized version tag to use for the phrase matcher. If not specified,
  582. // it will default to `revision_id`.
  583. string version_tag = 3;
  584. // Output only. The timestamp of when the revision was created. It is also the create time
  585. // when a new matcher is added.
  586. google.protobuf.Timestamp revision_create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  587. // The human-readable name of the phrase matcher.
  588. string display_name = 5;
  589. // Required. The type of this phrase matcher.
  590. PhraseMatcherType type = 6 [(google.api.field_behavior) = REQUIRED];
  591. // Applies the phrase matcher only when it is active.
  592. bool active = 7;
  593. // A list of phase match rule groups that are included in this matcher.
  594. repeated PhraseMatchRuleGroup phrase_match_rule_groups = 8;
  595. // Output only. The most recent time at which the activation status was updated.
  596. google.protobuf.Timestamp activation_update_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
  597. // The role whose utterances the phrase matcher should be matched
  598. // against. If the role is ROLE_UNSPECIFIED it will be matched against any
  599. // utterances in the transcript.
  600. ConversationParticipant.Role role_match = 10;
  601. // Output only. The most recent time at which the phrase matcher was updated.
  602. google.protobuf.Timestamp update_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
  603. }
  604. // A message representing a rule in the phrase matcher.
  605. message PhraseMatchRuleGroup {
  606. // Specifies how to combine each phrase match rule for whether there is a
  607. // match.
  608. enum PhraseMatchRuleGroupType {
  609. // Unspecified.
  610. PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED = 0;
  611. // Must meet all phrase match rules or there is no match.
  612. ALL_OF = 1;
  613. // If any of the phrase match rules are met, there is a match.
  614. ANY_OF = 2;
  615. }
  616. // Required. The type of this phrase match rule group.
  617. PhraseMatchRuleGroupType type = 1 [(google.api.field_behavior) = REQUIRED];
  618. // A list of phase match rules that are included in this group.
  619. repeated PhraseMatchRule phrase_match_rules = 2;
  620. }
  621. // The data for a phrase match rule.
  622. message PhraseMatchRule {
  623. // Required. The phrase to be matched.
  624. string query = 1 [(google.api.field_behavior) = REQUIRED];
  625. // Specifies whether the phrase must be missing from the transcript segment or
  626. // present in the transcript segment.
  627. bool negated = 2;
  628. // Provides additional information about the rule that specifies how to apply
  629. // the rule.
  630. PhraseMatchRuleConfig config = 3;
  631. }
  632. // Configuration information of a phrase match rule.
  633. message PhraseMatchRuleConfig {
  634. // The configuration of the phrase match rule.
  635. oneof config {
  636. // The configuration for the exact match rule.
  637. ExactMatchConfig exact_match_config = 1;
  638. }
  639. }
  640. // Exact match configuration.
  641. message ExactMatchConfig {
  642. // Whether to consider case sensitivity when performing an exact match.
  643. bool case_sensitive = 1;
  644. }
  645. // The settings resource.
  646. message Settings {
  647. option (google.api.resource) = {
  648. type: "contactcenterinsights.googleapis.com/Settings"
  649. pattern: "projects/{project}/locations/{location}/settings"
  650. };
  651. // Default configuration when creating Analyses in Insights.
  652. message AnalysisConfig {
  653. // Percentage of conversations created using Dialogflow runtime integration
  654. // to analyze automatically, between [0, 100].
  655. double runtime_integration_analysis_percentage = 1;
  656. }
  657. // Immutable. The resource name of the settings resource.
  658. // Format:
  659. // projects/{project}/locations/{location}/settings
  660. string name = 1 [(google.api.field_behavior) = IMMUTABLE];
  661. // Output only. The time at which the settings was created.
  662. google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  663. // Output only. The time at which the settings were last updated.
  664. google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  665. // A language code to be applied to each transcript segment unless the segment
  666. // already specifies a language code. Language code defaults to "en-US" if it
  667. // is neither specified on the segment nor here.
  668. string language_code = 4;
  669. // The default TTL for newly-created conversations. If a conversation has a
  670. // specified expiration, that value will be used instead. Changing this
  671. // value will not change the expiration of existing conversations.
  672. // Conversations with no expire time persist until they are deleted.
  673. google.protobuf.Duration conversation_ttl = 5;
  674. // A map that maps a notification trigger to a Pub/Sub topic. Each time a
  675. // specified trigger occurs, Insights will notify the corresponding Pub/Sub
  676. // topic.
  677. //
  678. // Keys are notification triggers. Supported keys are:
  679. //
  680. // * "all-triggers": Notify each time any of the supported triggers occurs.
  681. // * "create-analysis": Notify each time an analysis is created.
  682. // * "create-conversation": Notify each time a conversation is created.
  683. // * "export-insights-data": Notify each time an export is complete.
  684. // * "update-conversation": Notify each time a conversation is updated via
  685. // UpdateConversation.
  686. //
  687. // Values are Pub/Sub topics. The format of each Pub/Sub topic is:
  688. // projects/{project}/topics/{topic}
  689. map<string, string> pubsub_notification_settings = 6;
  690. // Default analysis settings.
  691. AnalysisConfig analysis_config = 7;
  692. }
  693. // An annotation that was generated during the customer and agent interaction.
  694. message RuntimeAnnotation {
  695. // The data in the annotation.
  696. oneof data {
  697. // Agent Assist Article Suggestion data.
  698. ArticleSuggestionData article_suggestion = 6;
  699. // Agent Assist FAQ answer data.
  700. FaqAnswerData faq_answer = 7;
  701. // Agent Assist Smart Reply data.
  702. SmartReplyData smart_reply = 8;
  703. // Agent Assist Smart Compose suggestion data.
  704. SmartComposeSuggestionData smart_compose_suggestion = 9;
  705. // Dialogflow interaction data.
  706. DialogflowInteractionData dialogflow_interaction = 10;
  707. }
  708. // The unique identifier of the annotation.
  709. // Format:
  710. // projects/{project}/locations/{location}/conversationDatasets/{dataset}/conversationDataItems/{data_item}/conversationAnnotations/{annotation}
  711. string annotation_id = 1;
  712. // The time at which this annotation was created.
  713. google.protobuf.Timestamp create_time = 2;
  714. // The boundary in the conversation where the annotation starts, inclusive.
  715. AnnotationBoundary start_boundary = 3;
  716. // The boundary in the conversation where the annotation ends, inclusive.
  717. AnnotationBoundary end_boundary = 4;
  718. // The feedback that the customer has about the answer in `data`.
  719. AnswerFeedback answer_feedback = 5;
  720. }
  721. // The feedback that the customer has about a certain answer in the
  722. // conversation.
  723. message AnswerFeedback {
  724. // The correctness level of an answer.
  725. enum CorrectnessLevel {
  726. // Correctness level unspecified.
  727. CORRECTNESS_LEVEL_UNSPECIFIED = 0;
  728. // Answer is totally wrong.
  729. NOT_CORRECT = 1;
  730. // Answer is partially correct.
  731. PARTIALLY_CORRECT = 2;
  732. // Answer is fully correct.
  733. FULLY_CORRECT = 3;
  734. }
  735. // The correctness level of an answer.
  736. CorrectnessLevel correctness_level = 1;
  737. // Indicates whether an answer or item was clicked by the human agent.
  738. bool clicked = 2;
  739. // Indicates whether an answer or item was displayed to the human agent in the
  740. // agent desktop UI.
  741. bool displayed = 3;
  742. }
  743. // Agent Assist Article Suggestion data.
  744. message ArticleSuggestionData {
  745. // Article title.
  746. string title = 1;
  747. // Article URI.
  748. string uri = 2;
  749. // The system's confidence score that this article is a good match for this
  750. // conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely
  751. // certain).
  752. float confidence_score = 3;
  753. // Map that contains metadata about the Article Suggestion and the document
  754. // that it originates from.
  755. map<string, string> metadata = 4;
  756. // The name of the answer record.
  757. // Format:
  758. // projects/{project}/locations/{location}/answerRecords/{answer_record}
  759. string query_record = 5;
  760. // The knowledge document that this answer was extracted from.
  761. // Format:
  762. // projects/{project}/knowledgeBases/{knowledge_base}/documents/{document}
  763. string source = 6;
  764. }
  765. // Agent Assist frequently-asked-question answer data.
  766. message FaqAnswerData {
  767. // The piece of text from the `source` knowledge base document.
  768. string answer = 1;
  769. // The system's confidence score that this answer is a good match for this
  770. // conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely
  771. // certain).
  772. float confidence_score = 2;
  773. // The corresponding FAQ question.
  774. string question = 3;
  775. // Map that contains metadata about the FAQ answer and the document that
  776. // it originates from.
  777. map<string, string> metadata = 4;
  778. // The name of the answer record.
  779. // Format:
  780. // projects/{project}/locations/{location}/answerRecords/{answer_record}
  781. string query_record = 5;
  782. // The knowledge document that this answer was extracted from.
  783. // Format:
  784. // projects/{project}/knowledgeBases/{knowledge_base}/documents/{document}.
  785. string source = 6;
  786. }
  787. // Agent Assist Smart Reply data.
  788. message SmartReplyData {
  789. // The content of the reply.
  790. string reply = 1;
  791. // The system's confidence score that this reply is a good match for this
  792. // conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely
  793. // certain).
  794. double confidence_score = 2;
  795. // Map that contains metadata about the Smart Reply and the document from
  796. // which it originates.
  797. map<string, string> metadata = 3;
  798. // The name of the answer record.
  799. // Format:
  800. // projects/{project}/locations/{location}/answerRecords/{answer_record}
  801. string query_record = 4;
  802. }
  803. // Agent Assist Smart Compose suggestion data.
  804. message SmartComposeSuggestionData {
  805. // The content of the suggestion.
  806. string suggestion = 1;
  807. // The system's confidence score that this suggestion is a good match for this
  808. // conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely
  809. // certain).
  810. double confidence_score = 2;
  811. // Map that contains metadata about the Smart Compose suggestion and the
  812. // document from which it originates.
  813. map<string, string> metadata = 3;
  814. // The name of the answer record.
  815. // Format:
  816. // projects/{project}/locations/{location}/answerRecords/{answer_record}
  817. string query_record = 4;
  818. }
  819. // Dialogflow interaction data.
  820. message DialogflowInteractionData {
  821. // The Dialogflow intent resource path. Format:
  822. // projects/{project}/agent/{agent}/intents/{intent}
  823. string dialogflow_intent_id = 1;
  824. // The confidence of the match ranging from 0.0 (completely uncertain) to 1.0
  825. // (completely certain).
  826. float confidence = 2;
  827. }
  828. // The call participant speaking for a given utterance.
  829. message ConversationParticipant {
  830. // The role of the participant.
  831. enum Role {
  832. // Participant's role is not set.
  833. ROLE_UNSPECIFIED = 0;
  834. // Participant is a human agent.
  835. HUMAN_AGENT = 1;
  836. // Participant is an automated agent.
  837. AUTOMATED_AGENT = 2;
  838. // Participant is an end user who conversed with the contact center.
  839. END_USER = 3;
  840. // Participant is either a human or automated agent.
  841. ANY_AGENT = 4;
  842. }
  843. oneof participant {
  844. // The name of the participant provided by Dialogflow. Format:
  845. // projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant}
  846. string dialogflow_participant_name = 5 [(google.api.resource_reference) = {
  847. type: "dialogflow.googleapis.com/Participant"
  848. }];
  849. // A user-specified ID representing the participant.
  850. string user_id = 6;
  851. }
  852. // Deprecated. Use `dialogflow_participant_name` instead.
  853. // The name of the Dialogflow participant. Format:
  854. // projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant}
  855. string dialogflow_participant = 1 [deprecated = true];
  856. // Obfuscated user ID from Dialogflow.
  857. string obfuscated_external_user_id = 3;
  858. // The role of the participant.
  859. Role role = 2;
  860. }
  861. // The View resource.
  862. message View {
  863. option (google.api.resource) = {
  864. type: "contactcenterinsights.googleapis.com/View"
  865. pattern: "projects/{project}/locations/{location}/views/{view}"
  866. };
  867. // Immutable. The resource name of the view.
  868. // Format:
  869. // projects/{project}/locations/{location}/views/{view}
  870. string name = 1 [(google.api.field_behavior) = IMMUTABLE];
  871. // The human-readable display name of the view.
  872. string display_name = 2;
  873. // Output only. The time at which this view was created.
  874. google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  875. // Output only. The most recent time at which the view was updated.
  876. google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  877. // String with specific view properties.
  878. string value = 5;
  879. }