contact_center_insights.proto 36 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094
  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/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/api/resource.proto";
  20. import "google/cloud/contactcenterinsights/v1/resources.proto";
  21. import "google/longrunning/operations.proto";
  22. import "google/protobuf/duration.proto";
  23. import "google/protobuf/empty.proto";
  24. import "google/protobuf/field_mask.proto";
  25. import "google/protobuf/timestamp.proto";
  26. import "google/rpc/status.proto";
  27. option csharp_namespace = "Google.Cloud.ContactCenterInsights.V1";
  28. option go_package = "google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1;contactcenterinsights";
  29. option java_multiple_files = true;
  30. option java_outer_classname = "ContactCenterInsightsProto";
  31. option java_package = "com.google.cloud.contactcenterinsights.v1";
  32. option php_namespace = "Google\\Cloud\\ContactCenterInsights\\V1";
  33. option ruby_package = "Google::Cloud::ContactCenterInsights::V1";
  34. // An API that lets users analyze and explore their business conversation data.
  35. service ContactCenterInsights {
  36. option (google.api.default_host) = "contactcenterinsights.googleapis.com";
  37. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
  38. // Creates a conversation.
  39. rpc CreateConversation(CreateConversationRequest) returns (Conversation) {
  40. option (google.api.http) = {
  41. post: "/v1/{parent=projects/*/locations/*}/conversations"
  42. body: "conversation"
  43. };
  44. option (google.api.method_signature) = "parent,conversation,conversation_id";
  45. }
  46. // Updates a conversation.
  47. rpc UpdateConversation(UpdateConversationRequest) returns (Conversation) {
  48. option (google.api.http) = {
  49. patch: "/v1/{conversation.name=projects/*/locations/*/conversations/*}"
  50. body: "conversation"
  51. };
  52. option (google.api.method_signature) = "conversation,update_mask";
  53. }
  54. // Gets a conversation.
  55. rpc GetConversation(GetConversationRequest) returns (Conversation) {
  56. option (google.api.http) = {
  57. get: "/v1/{name=projects/*/locations/*/conversations/*}"
  58. };
  59. option (google.api.method_signature) = "name";
  60. }
  61. // Lists conversations.
  62. rpc ListConversations(ListConversationsRequest) returns (ListConversationsResponse) {
  63. option (google.api.http) = {
  64. get: "/v1/{parent=projects/*/locations/*}/conversations"
  65. };
  66. option (google.api.method_signature) = "parent";
  67. }
  68. // Deletes a conversation.
  69. rpc DeleteConversation(DeleteConversationRequest) returns (google.protobuf.Empty) {
  70. option (google.api.http) = {
  71. delete: "/v1/{name=projects/*/locations/*/conversations/*}"
  72. };
  73. option (google.api.method_signature) = "name";
  74. }
  75. // Creates an analysis. The long running operation is done when the analysis
  76. // has completed.
  77. rpc CreateAnalysis(CreateAnalysisRequest) returns (google.longrunning.Operation) {
  78. option (google.api.http) = {
  79. post: "/v1/{parent=projects/*/locations/*/conversations/*}/analyses"
  80. body: "analysis"
  81. };
  82. option (google.api.method_signature) = "parent,analysis";
  83. option (google.longrunning.operation_info) = {
  84. response_type: "Analysis"
  85. metadata_type: "CreateAnalysisOperationMetadata"
  86. };
  87. }
  88. // Gets an analysis.
  89. rpc GetAnalysis(GetAnalysisRequest) returns (Analysis) {
  90. option (google.api.http) = {
  91. get: "/v1/{name=projects/*/locations/*/conversations/*/analyses/*}"
  92. };
  93. option (google.api.method_signature) = "name";
  94. }
  95. // Lists analyses.
  96. rpc ListAnalyses(ListAnalysesRequest) returns (ListAnalysesResponse) {
  97. option (google.api.http) = {
  98. get: "/v1/{parent=projects/*/locations/*/conversations/*}/analyses"
  99. };
  100. option (google.api.method_signature) = "parent";
  101. }
  102. // Deletes an analysis.
  103. rpc DeleteAnalysis(DeleteAnalysisRequest) returns (google.protobuf.Empty) {
  104. option (google.api.http) = {
  105. delete: "/v1/{name=projects/*/locations/*/conversations/*/analyses/*}"
  106. };
  107. option (google.api.method_signature) = "name";
  108. }
  109. // Export insights data to a destination defined in the request body.
  110. rpc ExportInsightsData(ExportInsightsDataRequest) returns (google.longrunning.Operation) {
  111. option (google.api.http) = {
  112. post: "/v1/{parent=projects/*/locations/*}/insightsdata:export"
  113. body: "*"
  114. };
  115. option (google.api.method_signature) = "parent";
  116. option (google.longrunning.operation_info) = {
  117. response_type: "ExportInsightsDataResponse"
  118. metadata_type: "ExportInsightsDataMetadata"
  119. };
  120. }
  121. // Creates an issue model.
  122. rpc CreateIssueModel(CreateIssueModelRequest) returns (google.longrunning.Operation) {
  123. option (google.api.http) = {
  124. post: "/v1/{parent=projects/*/locations/*}/issueModels"
  125. body: "issue_model"
  126. };
  127. option (google.api.method_signature) = "parent,issue_model";
  128. option (google.longrunning.operation_info) = {
  129. response_type: "IssueModel"
  130. metadata_type: "CreateIssueModelMetadata"
  131. };
  132. }
  133. // Updates an issue model.
  134. rpc UpdateIssueModel(UpdateIssueModelRequest) returns (IssueModel) {
  135. option (google.api.http) = {
  136. patch: "/v1/{issue_model.name=projects/*/locations/*/issueModels/*}"
  137. body: "issue_model"
  138. };
  139. option (google.api.method_signature) = "issue_model,update_mask";
  140. }
  141. // Gets an issue model.
  142. rpc GetIssueModel(GetIssueModelRequest) returns (IssueModel) {
  143. option (google.api.http) = {
  144. get: "/v1/{name=projects/*/locations/*/issueModels/*}"
  145. };
  146. option (google.api.method_signature) = "name";
  147. }
  148. // Lists issue models.
  149. rpc ListIssueModels(ListIssueModelsRequest) returns (ListIssueModelsResponse) {
  150. option (google.api.http) = {
  151. get: "/v1/{parent=projects/*/locations/*}/issueModels"
  152. };
  153. option (google.api.method_signature) = "parent";
  154. }
  155. // Deletes an issue model.
  156. rpc DeleteIssueModel(DeleteIssueModelRequest) returns (google.longrunning.Operation) {
  157. option (google.api.http) = {
  158. delete: "/v1/{name=projects/*/locations/*/issueModels/*}"
  159. };
  160. option (google.api.method_signature) = "name";
  161. option (google.longrunning.operation_info) = {
  162. response_type: "google.protobuf.Empty"
  163. metadata_type: "DeleteIssueModelMetadata"
  164. };
  165. }
  166. // Deploys an issue model. Returns an error if a model is already deployed.
  167. // An issue model can only be used in analysis after it has been deployed.
  168. rpc DeployIssueModel(DeployIssueModelRequest) returns (google.longrunning.Operation) {
  169. option (google.api.http) = {
  170. post: "/v1/{name=projects/*/locations/*/issueModels/*}:deploy"
  171. body: "*"
  172. };
  173. option (google.api.method_signature) = "name";
  174. option (google.longrunning.operation_info) = {
  175. response_type: "DeployIssueModelResponse"
  176. metadata_type: "DeployIssueModelMetadata"
  177. };
  178. }
  179. // Undeploys an issue model.
  180. // An issue model can not be used in analysis after it has been undeployed.
  181. rpc UndeployIssueModel(UndeployIssueModelRequest) returns (google.longrunning.Operation) {
  182. option (google.api.http) = {
  183. post: "/v1/{name=projects/*/locations/*/issueModels/*}:undeploy"
  184. body: "*"
  185. };
  186. option (google.api.method_signature) = "name";
  187. option (google.longrunning.operation_info) = {
  188. response_type: "UndeployIssueModelResponse"
  189. metadata_type: "UndeployIssueModelMetadata"
  190. };
  191. }
  192. // Gets an issue.
  193. rpc GetIssue(GetIssueRequest) returns (Issue) {
  194. option (google.api.http) = {
  195. get: "/v1/{name=projects/*/locations/*/issueModels/*/issues/*}"
  196. };
  197. option (google.api.method_signature) = "name";
  198. }
  199. // Lists issues.
  200. rpc ListIssues(ListIssuesRequest) returns (ListIssuesResponse) {
  201. option (google.api.http) = {
  202. get: "/v1/{parent=projects/*/locations/*/issueModels/*}/issues"
  203. };
  204. option (google.api.method_signature) = "parent";
  205. }
  206. // Updates an issue.
  207. rpc UpdateIssue(UpdateIssueRequest) returns (Issue) {
  208. option (google.api.http) = {
  209. patch: "/v1/{issue.name=projects/*/locations/*/issueModels/*/issues/*}"
  210. body: "issue"
  211. };
  212. option (google.api.method_signature) = "issue,update_mask";
  213. }
  214. // Gets an issue model's statistics.
  215. rpc CalculateIssueModelStats(CalculateIssueModelStatsRequest) returns (CalculateIssueModelStatsResponse) {
  216. option (google.api.http) = {
  217. get: "/v1/{issue_model=projects/*/locations/*/issueModels/*}:calculateIssueModelStats"
  218. };
  219. option (google.api.method_signature) = "issue_model";
  220. }
  221. // Creates a phrase matcher.
  222. rpc CreatePhraseMatcher(CreatePhraseMatcherRequest) returns (PhraseMatcher) {
  223. option (google.api.http) = {
  224. post: "/v1/{parent=projects/*/locations/*}/phraseMatchers"
  225. body: "phrase_matcher"
  226. };
  227. option (google.api.method_signature) = "parent,phrase_matcher";
  228. }
  229. // Gets a phrase matcher.
  230. rpc GetPhraseMatcher(GetPhraseMatcherRequest) returns (PhraseMatcher) {
  231. option (google.api.http) = {
  232. get: "/v1/{name=projects/*/locations/*/phraseMatchers/*}"
  233. };
  234. option (google.api.method_signature) = "name";
  235. }
  236. // Lists phrase matchers.
  237. rpc ListPhraseMatchers(ListPhraseMatchersRequest) returns (ListPhraseMatchersResponse) {
  238. option (google.api.http) = {
  239. get: "/v1/{parent=projects/*/locations/*}/phraseMatchers"
  240. };
  241. option (google.api.method_signature) = "parent";
  242. }
  243. // Deletes a phrase matcher.
  244. rpc DeletePhraseMatcher(DeletePhraseMatcherRequest) returns (google.protobuf.Empty) {
  245. option (google.api.http) = {
  246. delete: "/v1/{name=projects/*/locations/*/phraseMatchers/*}"
  247. };
  248. option (google.api.method_signature) = "name";
  249. }
  250. // Updates a phrase matcher.
  251. rpc UpdatePhraseMatcher(UpdatePhraseMatcherRequest) returns (PhraseMatcher) {
  252. option (google.api.http) = {
  253. patch: "/v1/{phrase_matcher.name=projects/*/locations/*/phraseMatchers/*}"
  254. body: "phrase_matcher"
  255. };
  256. option (google.api.method_signature) = "phrase_matcher,update_mask";
  257. }
  258. // Gets conversation statistics.
  259. rpc CalculateStats(CalculateStatsRequest) returns (CalculateStatsResponse) {
  260. option (google.api.http) = {
  261. get: "/v1/{location=projects/*/locations/*}/conversations:calculateStats"
  262. };
  263. option (google.api.method_signature) = "location";
  264. }
  265. // Gets project-level settings.
  266. rpc GetSettings(GetSettingsRequest) returns (Settings) {
  267. option (google.api.http) = {
  268. get: "/v1/{name=projects/*/locations/*/settings}"
  269. };
  270. option (google.api.method_signature) = "name";
  271. }
  272. // Updates project-level settings.
  273. rpc UpdateSettings(UpdateSettingsRequest) returns (Settings) {
  274. option (google.api.http) = {
  275. patch: "/v1/{settings.name=projects/*/locations/*/settings}"
  276. body: "settings"
  277. };
  278. option (google.api.method_signature) = "settings,update_mask";
  279. }
  280. // Creates a view.
  281. rpc CreateView(CreateViewRequest) returns (View) {
  282. option (google.api.http) = {
  283. post: "/v1/{parent=projects/*/locations/*}/views"
  284. body: "view"
  285. };
  286. option (google.api.method_signature) = "parent,view";
  287. }
  288. // Gets a view.
  289. rpc GetView(GetViewRequest) returns (View) {
  290. option (google.api.http) = {
  291. get: "/v1/{name=projects/*/locations/*/views/*}"
  292. };
  293. option (google.api.method_signature) = "name";
  294. }
  295. // Lists views.
  296. rpc ListViews(ListViewsRequest) returns (ListViewsResponse) {
  297. option (google.api.http) = {
  298. get: "/v1/{parent=projects/*/locations/*}/views"
  299. };
  300. option (google.api.method_signature) = "parent";
  301. }
  302. // Updates a view.
  303. rpc UpdateView(UpdateViewRequest) returns (View) {
  304. option (google.api.http) = {
  305. patch: "/v1/{view.name=projects/*/locations/*/views/*}"
  306. body: "view"
  307. };
  308. option (google.api.method_signature) = "view,update_mask";
  309. }
  310. // Deletes a view.
  311. rpc DeleteView(DeleteViewRequest) returns (google.protobuf.Empty) {
  312. option (google.api.http) = {
  313. delete: "/v1/{name=projects/*/locations/*/views/*}"
  314. };
  315. option (google.api.method_signature) = "name";
  316. }
  317. }
  318. // Represents the options for viewing a conversation.
  319. enum ConversationView {
  320. // The conversation view is not specified.
  321. //
  322. // * Defaults to `FULL` in `GetConversationRequest`.
  323. // * Defaults to `BASIC` in `ListConversationsRequest`.
  324. CONVERSATION_VIEW_UNSPECIFIED = 0;
  325. // Populates all fields in the conversation.
  326. FULL = 2;
  327. // Populates all fields in the conversation except the transcript.
  328. BASIC = 1;
  329. }
  330. // The request for calculating conversation statistics.
  331. message CalculateStatsRequest {
  332. // Required. The location of the conversations.
  333. string location = 1 [
  334. (google.api.field_behavior) = REQUIRED,
  335. (google.api.resource_reference) = {
  336. type: "locations.googleapis.com/Location"
  337. }
  338. ];
  339. // A filter to reduce results to a specific subset. This field is useful for
  340. // getting statistics about conversations with specific properties.
  341. string filter = 2;
  342. }
  343. // The response for calculating conversation statistics.
  344. message CalculateStatsResponse {
  345. // A time series representing conversations over time.
  346. message TimeSeries {
  347. // A single interval in a time series.
  348. message Interval {
  349. // The start time of this interval.
  350. google.protobuf.Timestamp start_time = 1;
  351. // The number of conversations created in this interval.
  352. int32 conversation_count = 2;
  353. }
  354. // The duration of each interval.
  355. google.protobuf.Duration interval_duration = 1;
  356. // An ordered list of intervals from earliest to latest, where each interval
  357. // represents the number of conversations that transpired during the time
  358. // window.
  359. repeated Interval points = 2;
  360. }
  361. // The average duration of all conversations. The average is calculated using
  362. // only conversations that have a time duration.
  363. google.protobuf.Duration average_duration = 1;
  364. // The average number of turns per conversation.
  365. int32 average_turn_count = 2;
  366. // The total number of conversations.
  367. int32 conversation_count = 3;
  368. // A map associating each smart highlighter display name with its respective
  369. // number of matches in the set of conversations.
  370. map<string, int32> smart_highlighter_matches = 4;
  371. // A map associating each custom highlighter resource name with its respective
  372. // number of matches in the set of conversations.
  373. map<string, int32> custom_highlighter_matches = 5;
  374. // A map associating each issue resource name with its respective number of
  375. // matches in the set of conversations. Key has the format:
  376. // `projects/<Project-ID>/locations/<Location-ID>/issueModels/<Issue-Model-ID>/issues/<Issue-ID>`
  377. // Deprecated, use `issue_matches_stats` field instead.
  378. map<string, int32> issue_matches = 6 [deprecated = true];
  379. // A map associating each issue resource name with its respective number of
  380. // matches in the set of conversations. Key has the format:
  381. // `projects/<Project-ID>/locations/<Location-ID>/issueModels/<Issue-Model-ID>/issues/<Issue-ID>`
  382. map<string, IssueModelLabelStats.IssueStats> issue_matches_stats = 8;
  383. // A time series representing the count of conversations created over time
  384. // that match that requested filter criteria.
  385. TimeSeries conversation_count_time_series = 7;
  386. }
  387. // Metadata for a create analysis operation.
  388. message CreateAnalysisOperationMetadata {
  389. // Output only. The time the operation was created.
  390. google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  391. // Output only. The time the operation finished running.
  392. google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  393. // Output only. The Conversation that this Analysis Operation belongs to.
  394. string conversation = 3 [
  395. (google.api.field_behavior) = OUTPUT_ONLY,
  396. (google.api.resource_reference) = {
  397. type: "contactcenterinsights.googleapis.com/Conversation"
  398. }
  399. ];
  400. }
  401. // Request to create a conversation.
  402. message CreateConversationRequest {
  403. // Required. The parent resource of the conversation.
  404. string parent = 1 [
  405. (google.api.field_behavior) = REQUIRED,
  406. (google.api.resource_reference) = {
  407. type: "locations.googleapis.com/Location"
  408. }
  409. ];
  410. // Required. The conversation resource to create.
  411. Conversation conversation = 2 [(google.api.field_behavior) = REQUIRED];
  412. // A unique ID for the new conversation. This ID will become the final
  413. // component of the conversation's resource name. If no ID is specified, a
  414. // server-generated ID will be used.
  415. //
  416. // This value should be 4-64 characters and must match the regular
  417. // expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-`
  418. string conversation_id = 3;
  419. }
  420. // Request to list conversations.
  421. message ListConversationsRequest {
  422. // Required. The parent resource of the conversation.
  423. string parent = 1 [
  424. (google.api.field_behavior) = REQUIRED,
  425. (google.api.resource_reference) = {
  426. type: "locations.googleapis.com/Location"
  427. }
  428. ];
  429. // The maximum number of conversations to return in the response. A valid page
  430. // size ranges from 0 to 1,000 inclusive. If the page size is zero or
  431. // unspecified, a default page size of 100 will be chosen. Note that a call
  432. // might return fewer results than the requested page size.
  433. int32 page_size = 2;
  434. // The value returned by the last `ListConversationsResponse`. This value
  435. // indicates that this is a continuation of a prior `ListConversations` call
  436. // and that the system should return the next page of data.
  437. string page_token = 3;
  438. // A filter to reduce results to a specific subset. Useful for querying
  439. // conversations with specific properties.
  440. string filter = 4;
  441. // The level of details of the conversation. Default is `BASIC`.
  442. ConversationView view = 5;
  443. }
  444. // The response of listing conversations.
  445. message ListConversationsResponse {
  446. // The conversations that match the request.
  447. repeated Conversation conversations = 1;
  448. // A token which can be sent as `page_token` to retrieve the next page. If
  449. // this field is set, it means there is another page available. If it is not
  450. // set, it means no other pages are available.
  451. string next_page_token = 2;
  452. }
  453. // The request to get a conversation.
  454. message GetConversationRequest {
  455. // Required. The name of the conversation to get.
  456. string name = 1 [
  457. (google.api.field_behavior) = REQUIRED,
  458. (google.api.resource_reference) = {
  459. type: "contactcenterinsights.googleapis.com/Conversation"
  460. }
  461. ];
  462. // The level of details of the conversation. Default is `FULL`.
  463. ConversationView view = 2;
  464. }
  465. // The request to update a conversation.
  466. message UpdateConversationRequest {
  467. // Required. The new values for the conversation.
  468. Conversation conversation = 1 [(google.api.field_behavior) = REQUIRED];
  469. // The list of fields to be updated.
  470. google.protobuf.FieldMask update_mask = 2;
  471. }
  472. // The request to delete a conversation.
  473. message DeleteConversationRequest {
  474. // Required. The name of the conversation to delete.
  475. string name = 1 [
  476. (google.api.field_behavior) = REQUIRED,
  477. (google.api.resource_reference) = {
  478. type: "contactcenterinsights.googleapis.com/Conversation"
  479. }
  480. ];
  481. // If set to true, all of this conversation's analyses will also be deleted.
  482. // Otherwise, the request will only succeed if the conversation has no
  483. // analyses.
  484. bool force = 2;
  485. }
  486. // The request to create an analysis.
  487. message CreateAnalysisRequest {
  488. // Required. The parent resource of the analysis.
  489. string parent = 1 [
  490. (google.api.field_behavior) = REQUIRED,
  491. (google.api.resource_reference) = {
  492. type: "contactcenterinsights.googleapis.com/Conversation"
  493. }
  494. ];
  495. // Required. The analysis to create.
  496. Analysis analysis = 2 [(google.api.field_behavior) = REQUIRED];
  497. }
  498. // The request to list analyses.
  499. message ListAnalysesRequest {
  500. // Required. The parent resource of the analyses.
  501. string parent = 1 [
  502. (google.api.field_behavior) = REQUIRED,
  503. (google.api.resource_reference) = {
  504. type: "contactcenterinsights.googleapis.com/Conversation"
  505. }
  506. ];
  507. // The maximum number of analyses to return in the response. If this
  508. // value is zero, the service will select a default size. A call might return
  509. // fewer objects than requested. A non-empty `next_page_token` in the response
  510. // indicates that more data is available.
  511. int32 page_size = 2;
  512. // The value returned by the last `ListAnalysesResponse`; indicates
  513. // that this is a continuation of a prior `ListAnalyses` call and
  514. // the system should return the next page of data.
  515. string page_token = 3;
  516. // A filter to reduce results to a specific subset. Useful for querying
  517. // conversations with specific properties.
  518. string filter = 4;
  519. }
  520. // The response to list analyses.
  521. message ListAnalysesResponse {
  522. // The analyses that match the request.
  523. repeated Analysis analyses = 1;
  524. // A token, which can be sent as `page_token` to retrieve the next page.
  525. // If this field is omitted, there are no subsequent pages.
  526. string next_page_token = 2;
  527. }
  528. // The request to get an analysis.
  529. message GetAnalysisRequest {
  530. // Required. The name of the analysis to get.
  531. string name = 1 [
  532. (google.api.field_behavior) = REQUIRED,
  533. (google.api.resource_reference) = {
  534. type: "contactcenterinsights.googleapis.com/Analysis"
  535. }
  536. ];
  537. }
  538. // The request to delete an analysis.
  539. message DeleteAnalysisRequest {
  540. // Required. The name of the analysis to delete.
  541. string name = 1 [
  542. (google.api.field_behavior) = REQUIRED,
  543. (google.api.resource_reference) = {
  544. type: "contactcenterinsights.googleapis.com/Analysis"
  545. }
  546. ];
  547. }
  548. // The request to export insights.
  549. message ExportInsightsDataRequest {
  550. // A BigQuery Table Reference.
  551. message BigQueryDestination {
  552. // A project ID or number. If specified, then export will attempt to
  553. // write data to this project instead of the resource project. Otherwise,
  554. // the resource project will be used.
  555. string project_id = 3;
  556. // Required. The name of the BigQuery dataset that the snapshot result should be
  557. // exported to. If this dataset does not exist, the export call returns an
  558. // INVALID_ARGUMENT error.
  559. string dataset = 1 [(google.api.field_behavior) = REQUIRED];
  560. // The BigQuery table name to which the insights data should be written.
  561. // If this table does not exist, the export call returns an INVALID_ARGUMENT
  562. // error.
  563. string table = 2;
  564. }
  565. // Specifies the action that occurs if the destination table already exists.
  566. enum WriteDisposition {
  567. // Write disposition is not specified. Defaults to WRITE_TRUNCATE.
  568. WRITE_DISPOSITION_UNSPECIFIED = 0;
  569. // If the table already exists, BigQuery will overwrite the table data and
  570. // use the schema from the load.
  571. WRITE_TRUNCATE = 1;
  572. // If the table already exists, BigQuery will append data to the table.
  573. WRITE_APPEND = 2;
  574. }
  575. // Exporter destination.
  576. oneof destination {
  577. // Specified if sink is a BigQuery table.
  578. BigQueryDestination big_query_destination = 2;
  579. }
  580. // Required. The parent resource to export data from.
  581. string parent = 1 [
  582. (google.api.field_behavior) = REQUIRED,
  583. (google.api.resource_reference) = {
  584. type: "locations.googleapis.com/Location"
  585. }
  586. ];
  587. // A filter to reduce results to a specific subset. Useful for exporting
  588. // conversations with specific properties.
  589. string filter = 3;
  590. // A fully qualified KMS key name for BigQuery tables protected by CMEK.
  591. // Format:
  592. // projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}/cryptoKeyVersions/{version}
  593. string kms_key = 4;
  594. // Options for what to do if the destination table already exists.
  595. WriteDisposition write_disposition = 5;
  596. }
  597. // Metadata for an export insights operation.
  598. message ExportInsightsDataMetadata {
  599. // Output only. The time the operation was created.
  600. google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  601. // Output only. The time the operation finished running.
  602. google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  603. // The original request for export.
  604. ExportInsightsDataRequest request = 3;
  605. // Partial errors during export operation that might cause the operation
  606. // output to be incomplete.
  607. repeated google.rpc.Status partial_errors = 4;
  608. }
  609. // Response for an export insights operation.
  610. message ExportInsightsDataResponse {
  611. }
  612. // The request to create an issue model.
  613. message CreateIssueModelRequest {
  614. // Required. The parent resource of the issue model.
  615. string parent = 1 [
  616. (google.api.field_behavior) = REQUIRED,
  617. (google.api.resource_reference) = {
  618. type: "locations.googleapis.com/Location"
  619. }
  620. ];
  621. // Required. The issue model to create.
  622. IssueModel issue_model = 2 [(google.api.field_behavior) = REQUIRED];
  623. }
  624. // Metadata for creating an issue model.
  625. message CreateIssueModelMetadata {
  626. // Output only. The time the operation was created.
  627. google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  628. // Output only. The time the operation finished running.
  629. google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  630. // The original request for creation.
  631. CreateIssueModelRequest request = 3;
  632. }
  633. // The request to update an issue model.
  634. message UpdateIssueModelRequest {
  635. // Required. The new values for the issue model.
  636. IssueModel issue_model = 1 [(google.api.field_behavior) = REQUIRED];
  637. // The list of fields to be updated.
  638. google.protobuf.FieldMask update_mask = 2;
  639. }
  640. // Request to list issue models.
  641. message ListIssueModelsRequest {
  642. // Required. The parent resource of the issue model.
  643. string parent = 1 [
  644. (google.api.field_behavior) = REQUIRED,
  645. (google.api.resource_reference) = {
  646. type: "locations.googleapis.com/Location"
  647. }
  648. ];
  649. }
  650. // The response of listing issue models.
  651. message ListIssueModelsResponse {
  652. // The issue models that match the request.
  653. repeated IssueModel issue_models = 1;
  654. }
  655. // The request to get an issue model.
  656. message GetIssueModelRequest {
  657. // Required. The name of the issue model to get.
  658. string name = 1 [
  659. (google.api.field_behavior) = REQUIRED,
  660. (google.api.resource_reference) = {
  661. type: "contactcenterinsights.googleapis.com/IssueModel"
  662. }
  663. ];
  664. }
  665. // The request to delete an issue model.
  666. message DeleteIssueModelRequest {
  667. // Required. The name of the issue model to delete.
  668. string name = 1 [
  669. (google.api.field_behavior) = REQUIRED,
  670. (google.api.resource_reference) = {
  671. type: "contactcenterinsights.googleapis.com/IssueModel"
  672. }
  673. ];
  674. }
  675. // Metadata for deleting an issue model.
  676. message DeleteIssueModelMetadata {
  677. // Output only. The time the operation was created.
  678. google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  679. // Output only. The time the operation finished running.
  680. google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  681. // The original request for deletion.
  682. DeleteIssueModelRequest request = 3;
  683. }
  684. // The request to deploy an issue model.
  685. message DeployIssueModelRequest {
  686. // Required. The issue model to deploy.
  687. string name = 1 [
  688. (google.api.field_behavior) = REQUIRED,
  689. (google.api.resource_reference) = {
  690. type: "contactcenterinsights.googleapis.com/IssueModel"
  691. }
  692. ];
  693. }
  694. // The response to deploy an issue model.
  695. message DeployIssueModelResponse {
  696. }
  697. // Metadata for deploying an issue model.
  698. message DeployIssueModelMetadata {
  699. // Output only. The time the operation was created.
  700. google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  701. // Output only. The time the operation finished running.
  702. google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  703. // The original request for deployment.
  704. DeployIssueModelRequest request = 3;
  705. }
  706. // The request to undeploy an issue model.
  707. message UndeployIssueModelRequest {
  708. // Required. The issue model to undeploy.
  709. string name = 1 [
  710. (google.api.field_behavior) = REQUIRED,
  711. (google.api.resource_reference) = {
  712. type: "contactcenterinsights.googleapis.com/IssueModel"
  713. }
  714. ];
  715. }
  716. // The response to undeploy an issue model.
  717. message UndeployIssueModelResponse {
  718. }
  719. // Metadata for undeploying an issue model.
  720. message UndeployIssueModelMetadata {
  721. // Output only. The time the operation was created.
  722. google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  723. // Output only. The time the operation finished running.
  724. google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  725. // The original request for undeployment.
  726. UndeployIssueModelRequest request = 3;
  727. }
  728. // The request to get an issue.
  729. message GetIssueRequest {
  730. // Required. The name of the issue to get.
  731. string name = 1 [
  732. (google.api.field_behavior) = REQUIRED,
  733. (google.api.resource_reference) = {
  734. type: "contactcenterinsights.googleapis.com/Issue"
  735. }
  736. ];
  737. }
  738. // Request to list issues.
  739. message ListIssuesRequest {
  740. // Required. The parent resource of the issue.
  741. string parent = 1 [
  742. (google.api.field_behavior) = REQUIRED,
  743. (google.api.resource_reference) = {
  744. type: "contactcenterinsights.googleapis.com/IssueModel"
  745. }
  746. ];
  747. }
  748. // The response of listing issues.
  749. message ListIssuesResponse {
  750. // The issues that match the request.
  751. repeated Issue issues = 1;
  752. }
  753. // The request to update an issue.
  754. message UpdateIssueRequest {
  755. // Required. The new values for the issue.
  756. Issue issue = 1 [(google.api.field_behavior) = REQUIRED];
  757. // The list of fields to be updated.
  758. google.protobuf.FieldMask update_mask = 2;
  759. }
  760. // Request to get statistics of an issue model.
  761. message CalculateIssueModelStatsRequest {
  762. // Required. The resource name of the issue model to query against.
  763. string issue_model = 1 [
  764. (google.api.field_behavior) = REQUIRED,
  765. (google.api.resource_reference) = {
  766. type: "contactcenterinsights.googleapis.com/IssueModel"
  767. }
  768. ];
  769. }
  770. // Response of querying an issue model's statistics.
  771. message CalculateIssueModelStatsResponse {
  772. // The latest label statistics for the queried issue model. Includes results
  773. // on both training data and data labeled after deployment.
  774. IssueModelLabelStats current_stats = 4;
  775. }
  776. // Request to create a phrase matcher.
  777. message CreatePhraseMatcherRequest {
  778. // Required. The parent resource of the phrase matcher. Required. The location to create
  779. // a phrase matcher for.
  780. // Format: `projects/<Project ID>/locations/<Location ID>` or
  781. // `projects/<Project Number>/locations/<Location ID>`
  782. string parent = 1 [
  783. (google.api.field_behavior) = REQUIRED,
  784. (google.api.resource_reference) = {
  785. type: "locations.googleapis.com/Location"
  786. }
  787. ];
  788. // Required. The phrase matcher resource to create.
  789. PhraseMatcher phrase_matcher = 2 [(google.api.field_behavior) = REQUIRED];
  790. }
  791. // Request to list phrase matchers.
  792. message ListPhraseMatchersRequest {
  793. // Required. The parent resource of the phrase matcher.
  794. string parent = 1 [
  795. (google.api.field_behavior) = REQUIRED,
  796. (google.api.resource_reference) = {
  797. type: "locations.googleapis.com/Location"
  798. }
  799. ];
  800. // The maximum number of phrase matchers to return in the response. If this
  801. // value is zero, the service will select a default size. A call might return
  802. // fewer objects than requested. A non-empty `next_page_token` in the response
  803. // indicates that more data is available.
  804. int32 page_size = 2;
  805. // The value returned by the last `ListPhraseMatchersResponse`. This value
  806. // indicates that this is a continuation of a prior `ListPhraseMatchers` call
  807. // and that the system should return the next page of data.
  808. string page_token = 3;
  809. // A filter to reduce results to a specific subset. Useful for querying
  810. // phrase matchers with specific properties.
  811. string filter = 4;
  812. }
  813. // The response of listing phrase matchers.
  814. message ListPhraseMatchersResponse {
  815. // The phrase matchers that match the request.
  816. repeated PhraseMatcher phrase_matchers = 1;
  817. // A token, which can be sent as `page_token` to retrieve the next page.
  818. // If this field is omitted, there are no subsequent pages.
  819. string next_page_token = 2;
  820. }
  821. // The request to get a a phrase matcher.
  822. message GetPhraseMatcherRequest {
  823. // Required. The name of the phrase matcher to get.
  824. string name = 1 [
  825. (google.api.field_behavior) = REQUIRED,
  826. (google.api.resource_reference) = {
  827. type: "contactcenterinsights.googleapis.com/PhraseMatcher"
  828. }
  829. ];
  830. }
  831. // The request to delete a phrase matcher.
  832. message DeletePhraseMatcherRequest {
  833. // Required. The name of the phrase matcher to delete.
  834. string name = 1 [
  835. (google.api.field_behavior) = REQUIRED,
  836. (google.api.resource_reference) = {
  837. type: "contactcenterinsights.googleapis.com/PhraseMatcher"
  838. }
  839. ];
  840. }
  841. // The request to update a phrase matcher.
  842. message UpdatePhraseMatcherRequest {
  843. // Required. The new values for the phrase matcher.
  844. PhraseMatcher phrase_matcher = 1 [(google.api.field_behavior) = REQUIRED];
  845. // The list of fields to be updated.
  846. google.protobuf.FieldMask update_mask = 2;
  847. }
  848. // The request to get project-level settings.
  849. message GetSettingsRequest {
  850. // Required. The name of the settings resource to get.
  851. string name = 1 [
  852. (google.api.field_behavior) = REQUIRED,
  853. (google.api.resource_reference) = {
  854. type: "contactcenterinsights.googleapis.com/Settings"
  855. }
  856. ];
  857. }
  858. // The request to update project-level settings.
  859. message UpdateSettingsRequest {
  860. // Required. The new settings values.
  861. Settings settings = 1 [(google.api.field_behavior) = REQUIRED];
  862. // Required. The list of fields to be updated.
  863. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
  864. }
  865. // The request to create a view.
  866. message CreateViewRequest {
  867. // Required. The parent resource of the view. Required. The location to create
  868. // a view for.
  869. // Format: `projects/<Project ID>/locations/<Location ID>` or
  870. // `projects/<Project Number>/locations/<Location ID>`
  871. string parent = 1 [
  872. (google.api.field_behavior) = REQUIRED,
  873. (google.api.resource_reference) = {
  874. type: "locations.googleapis.com/Location"
  875. }
  876. ];
  877. // Required. The view resource to create.
  878. View view = 2 [(google.api.field_behavior) = REQUIRED];
  879. }
  880. // The request to get a view.
  881. message GetViewRequest {
  882. // Required. The name of the view to get.
  883. string name = 1 [
  884. (google.api.field_behavior) = REQUIRED,
  885. (google.api.resource_reference) = {
  886. type: "contactcenterinsights.googleapis.com/View"
  887. }
  888. ];
  889. }
  890. // The request to list views.
  891. message ListViewsRequest {
  892. // Required. The parent resource of the views.
  893. string parent = 1 [
  894. (google.api.field_behavior) = REQUIRED,
  895. (google.api.resource_reference) = {
  896. type: "locations.googleapis.com/Location"
  897. }
  898. ];
  899. // The maximum number of views to return in the response. If this
  900. // value is zero, the service will select a default size. A call may return
  901. // fewer objects than requested. A non-empty `next_page_token` in the response
  902. // indicates that more data is available.
  903. int32 page_size = 2;
  904. // The value returned by the last `ListViewsResponse`; indicates
  905. // that this is a continuation of a prior `ListViews` call and
  906. // the system should return the next page of data.
  907. string page_token = 3;
  908. }
  909. // The response of listing views.
  910. message ListViewsResponse {
  911. // The views that match the request.
  912. repeated View views = 1;
  913. // A token, which can be sent as `page_token` to retrieve the next page.
  914. // If this field is omitted, there are no subsequent pages.
  915. string next_page_token = 2;
  916. }
  917. // The request to update a view.
  918. message UpdateViewRequest {
  919. // Required. The new view.
  920. View view = 1 [(google.api.field_behavior) = REQUIRED];
  921. // The list of fields to be updated.
  922. google.protobuf.FieldMask update_mask = 2;
  923. }
  924. // The request to delete a view.
  925. message DeleteViewRequest {
  926. // Required. The name of the view to delete.
  927. string name = 1 [
  928. (google.api.field_behavior) = REQUIRED,
  929. (google.api.resource_reference) = {
  930. type: "contactcenterinsights.googleapis.com/View"
  931. }
  932. ];
  933. }