1// Copyright 2023 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 15syntax = "proto3"; 16 17package google.cloud.dialogflow.v2beta1; 18 19import "google/api/annotations.proto"; 20import "google/api/client.proto"; 21import "google/api/field_behavior.proto"; 22import "google/api/resource.proto"; 23import "google/cloud/dialogflow/v2beta1/audio_config.proto"; 24import "google/cloud/dialogflow/v2beta1/participant.proto"; 25import "google/longrunning/operations.proto"; 26import "google/protobuf/duration.proto"; 27import "google/protobuf/empty.proto"; 28import "google/protobuf/field_mask.proto"; 29import "google/protobuf/timestamp.proto"; 30 31option cc_enable_arenas = true; 32option csharp_namespace = "Google.Cloud.Dialogflow.V2Beta1"; 33option go_package = "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb;dialogflowpb"; 34option java_multiple_files = true; 35option java_outer_classname = "ConversationProfileProto"; 36option java_package = "com.google.cloud.dialogflow.v2beta1"; 37option objc_class_prefix = "DF"; 38option (google.api.resource_definition) = { 39 type: "dialogflow.googleapis.com/CXSecuritySettings" 40 pattern: "projects/{project}/locations/{location}/securitySettings/{security_settings}" 41}; 42option (google.api.resource_definition) = { 43 type: "dialogflow.googleapis.com/ConversationModel" 44 pattern: "projects/{project}/locations/{location}/conversationModels/{conversation_model}" 45}; 46 47// Service for managing 48// [ConversationProfiles][google.cloud.dialogflow.v2beta1.ConversationProfile]. 49service ConversationProfiles { 50 option (google.api.default_host) = "dialogflow.googleapis.com"; 51 option (google.api.oauth_scopes) = 52 "https://www.googleapis.com/auth/cloud-platform," 53 "https://www.googleapis.com/auth/dialogflow"; 54 55 // Returns the list of all conversation profiles in the specified project. 56 rpc ListConversationProfiles(ListConversationProfilesRequest) 57 returns (ListConversationProfilesResponse) { 58 option (google.api.http) = { 59 get: "/v2beta1/{parent=projects/*}/conversationProfiles" 60 additional_bindings { 61 get: "/v2beta1/{parent=projects/*/locations/*}/conversationProfiles" 62 } 63 }; 64 option (google.api.method_signature) = "parent"; 65 } 66 67 // Retrieves the specified conversation profile. 68 rpc GetConversationProfile(GetConversationProfileRequest) 69 returns (ConversationProfile) { 70 option (google.api.http) = { 71 get: "/v2beta1/{name=projects/*/conversationProfiles/*}" 72 additional_bindings { 73 get: "/v2beta1/{name=projects/*/locations/*/conversationProfiles/*}" 74 } 75 }; 76 option (google.api.method_signature) = "name"; 77 } 78 79 // Creates a conversation profile in the specified project. 80 // 81 // [ConversationProfile.CreateTime][] and [ConversationProfile.UpdateTime][] 82 // aren't populated in the response. You can retrieve them via 83 // [GetConversationProfile][google.cloud.dialogflow.v2beta1.ConversationProfiles.GetConversationProfile] 84 // API. 85 rpc CreateConversationProfile(CreateConversationProfileRequest) 86 returns (ConversationProfile) { 87 option (google.api.http) = { 88 post: "/v2beta1/{parent=projects/*}/conversationProfiles" 89 body: "conversation_profile" 90 additional_bindings { 91 post: "/v2beta1/{parent=projects/*/locations/*}/conversationProfiles" 92 body: "conversation_profile" 93 } 94 }; 95 option (google.api.method_signature) = "parent,conversation_profile"; 96 } 97 98 // Updates the specified conversation profile. 99 // 100 // [ConversationProfile.CreateTime][] and [ConversationProfile.UpdateTime][] 101 // aren't populated in the response. You can retrieve them via 102 // [GetConversationProfile][google.cloud.dialogflow.v2beta1.ConversationProfiles.GetConversationProfile] 103 // API. 104 rpc UpdateConversationProfile(UpdateConversationProfileRequest) 105 returns (ConversationProfile) { 106 option (google.api.http) = { 107 patch: "/v2beta1/{conversation_profile.name=projects/*/conversationProfiles/*}" 108 body: "conversation_profile" 109 additional_bindings { 110 patch: "/v2beta1/{conversation_profile.name=projects/*/locations/*/conversationProfiles/*}" 111 body: "conversation_profile" 112 } 113 }; 114 option (google.api.method_signature) = "conversation_profile,update_mask"; 115 } 116 117 // Deletes the specified conversation profile. 118 rpc DeleteConversationProfile(DeleteConversationProfileRequest) 119 returns (google.protobuf.Empty) { 120 option (google.api.http) = { 121 delete: "/v2beta1/{name=projects/*/conversationProfiles/*}" 122 additional_bindings { 123 delete: "/v2beta1/{name=projects/*/locations/*/conversationProfiles/*}" 124 } 125 }; 126 option (google.api.method_signature) = "name"; 127 } 128 129 // Adds or updates a suggestion feature in a conversation profile. 130 // If the conversation profile contains the type of suggestion feature for 131 // the participant role, it will update it. Otherwise it will insert the 132 // suggestion feature. 133 // 134 // This method is a [long-running 135 // operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). 136 // The returned `Operation` type has the following method-specific fields: 137 // 138 // - `metadata`: 139 // [SetSuggestionFeatureConfigOperationMetadata][google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata] 140 // - `response`: 141 // [ConversationProfile][google.cloud.dialogflow.v2beta1.ConversationProfile] 142 // 143 // If a long running operation to add or update suggestion feature 144 // config for the same conversation profile, participant role and suggestion 145 // feature type exists, please cancel the existing long running operation 146 // before sending such request, otherwise the request will be rejected. 147 rpc SetSuggestionFeatureConfig(SetSuggestionFeatureConfigRequest) 148 returns (google.longrunning.Operation) { 149 option (google.api.http) = { 150 post: "/v2beta1/{conversation_profile=projects/*/conversationProfiles/*}:setSuggestionFeatureConfig" 151 body: "*" 152 additional_bindings { 153 post: "/v2beta1/{conversation_profile=projects/*/locations/*/conversationProfiles/*}:setSuggestionFeatureConfig" 154 body: "*" 155 } 156 }; 157 option (google.api.method_signature) = "conversation_profile"; 158 option (google.api.method_signature) = 159 "conversation_profile,participant_role,suggestion_feature_config"; 160 option (google.longrunning.operation_info) = { 161 response_type: "ConversationProfile" 162 metadata_type: "SetSuggestionFeatureConfigOperationMetadata" 163 }; 164 } 165 166 // Clears a suggestion feature from a conversation profile for the given 167 // participant role. 168 // 169 // This method is a [long-running 170 // operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). 171 // The returned `Operation` type has the following method-specific fields: 172 // 173 // - `metadata`: 174 // [ClearSuggestionFeatureConfigOperationMetadata][google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata] 175 // - `response`: 176 // [ConversationProfile][google.cloud.dialogflow.v2beta1.ConversationProfile] 177 rpc ClearSuggestionFeatureConfig(ClearSuggestionFeatureConfigRequest) 178 returns (google.longrunning.Operation) { 179 option (google.api.http) = { 180 post: "/v2beta1/{conversation_profile=projects/*/conversationProfiles/*}:clearSuggestionFeatureConfig" 181 body: "*" 182 additional_bindings { 183 post: "/v2beta1/{conversation_profile=projects/*/locations/*/conversationProfiles/*}:clearSuggestionFeatureConfig" 184 body: "*" 185 } 186 }; 187 option (google.api.method_signature) = "conversation_profile"; 188 option (google.api.method_signature) = 189 "conversation_profile,participant_role,suggestion_feature_type"; 190 option (google.longrunning.operation_info) = { 191 response_type: "ConversationProfile" 192 metadata_type: "ClearSuggestionFeatureConfigOperationMetadata" 193 }; 194 } 195} 196 197// Defines the services to connect to incoming Dialogflow conversations. 198message ConversationProfile { 199 option (google.api.resource) = { 200 type: "dialogflow.googleapis.com/ConversationProfile" 201 pattern: "projects/{project}/conversationProfiles/{conversation_profile}" 202 pattern: "projects/{project}/locations/{location}/conversationProfiles/{conversation_profile}" 203 }; 204 205 // The unique identifier of this conversation profile. 206 // Format: `projects/<Project ID>/locations/<Location 207 // ID>/conversationProfiles/<Conversation Profile ID>`. 208 string name = 1; 209 210 // Required. Human readable name for this profile. Max length 1024 bytes. 211 string display_name = 2 [(google.api.field_behavior) = REQUIRED]; 212 213 // Output only. Create time of the conversation profile. 214 google.protobuf.Timestamp create_time = 11 215 [(google.api.field_behavior) = OUTPUT_ONLY]; 216 217 // Output only. Update time of the conversation profile. 218 google.protobuf.Timestamp update_time = 12 219 [(google.api.field_behavior) = OUTPUT_ONLY]; 220 221 // Configuration for an automated agent to use with this profile. 222 AutomatedAgentConfig automated_agent_config = 3; 223 224 // Configuration for agent assistance to use with this profile. 225 HumanAgentAssistantConfig human_agent_assistant_config = 4; 226 227 // Configuration for connecting to a live agent. 228 // 229 // Currently, this feature is not general available, please contact Google 230 // to get access. 231 HumanAgentHandoffConfig human_agent_handoff_config = 5; 232 233 // Configuration for publishing conversation lifecycle events. 234 NotificationConfig notification_config = 6; 235 236 // Configuration for logging conversation lifecycle events. 237 LoggingConfig logging_config = 7; 238 239 // Configuration for publishing new message events. Event will be sent in 240 // format of 241 // [ConversationEvent][google.cloud.dialogflow.v2beta1.ConversationEvent] 242 NotificationConfig new_message_event_notification_config = 8; 243 244 // Settings for speech transcription. 245 SpeechToTextConfig stt_config = 9; 246 247 // Language code for the conversation profile. If not specified, the language 248 // is en-US. Language at ConversationProfile should be set for all non en-us 249 // languages. 250 // This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) 251 // language tag. Example: "en-US". 252 string language_code = 10; 253 254 // The time zone of this conversational profile from the 255 // [time zone database](https://www.iana.org/time-zones), e.g., 256 // America/New_York, Europe/Paris. Defaults to America/New_York. 257 string time_zone = 14; 258 259 // Name of the CX SecuritySettings reference for the agent. 260 // Format: `projects/<Project ID>/locations/<Location 261 // ID>/securitySettings/<Security Settings ID>`. 262 string security_settings = 13 [(google.api.resource_reference) = { 263 type: "dialogflow.googleapis.com/CXSecuritySettings" 264 }]; 265 266 // Configuration for Text-to-Speech synthesization. 267 // 268 // Used by Phone Gateway to specify synthesization options. If agent defines 269 // synthesization options as well, agent settings overrides the option here. 270 SynthesizeSpeechConfig tts_config = 18; 271} 272 273// Defines the Automated Agent to connect to a conversation. 274message AutomatedAgentConfig { 275 // Required. ID of the Dialogflow agent environment to use. 276 // 277 // This project needs to either be the same project as the conversation or you 278 // need to grant `service-<Conversation Project 279 // Number>@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow API 280 // Service Agent` role in this project. 281 // 282 // - For ES agents, use format: `projects/<Project ID>/locations/<Location 283 // ID>/agent/environments/<Environment ID or '-'>`. If environment is not 284 // specified, the default `draft` environment is used. Refer to 285 // [DetectIntentRequest](/dialogflow/docs/reference/rpc/google.cloud.dialogflow.v2beta1#google.cloud.dialogflow.v2beta1.DetectIntentRequest) 286 // for more details. 287 // 288 // - For CX agents, use format `projects/<Project ID>/locations/<Location 289 // ID>/agents/<Agent ID>/environments/<Environment ID 290 // or '-'>`. If environment is not specified, the default `draft` environment 291 // is used. 292 string agent = 1 [ 293 (google.api.field_behavior) = REQUIRED, 294 (google.api.resource_reference) = { 295 type: "dialogflow.googleapis.com/Agent" 296 } 297 ]; 298 299 // Optional. Configure lifetime of the Dialogflow session. 300 // By default, a Dialogflow CX session remains active and its data is stored 301 // for 30 minutes after the last request is sent for the session. 302 // This value should be no longer than 1 day. 303 google.protobuf.Duration session_ttl = 3 304 [(google.api.field_behavior) = OPTIONAL]; 305} 306 307// Defines the Human Agent Assistant to connect to a conversation. 308message HumanAgentAssistantConfig { 309 // Settings of suggestion trigger. 310 message SuggestionTriggerSettings { 311 // Do not trigger if last utterance is small talk. 312 bool no_small_talk = 1; 313 314 // Only trigger suggestion if participant role of last utterance is 315 // END_USER. 316 bool only_end_user = 2; 317 } 318 319 // Config for suggestion features. 320 message SuggestionFeatureConfig { 321 // The suggestion feature. 322 SuggestionFeature suggestion_feature = 5; 323 324 // Automatically iterates all participants and tries to compile 325 // suggestions. 326 // 327 // Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST, 328 // ENTITY_EXTRACTION, KNOWLEDGE_ASSIST. 329 bool enable_event_based_suggestion = 3; 330 331 // Optional. Disable the logging of search queries sent by human agents. It 332 // can prevent those queries from being stored at answer records. 333 // 334 // Supported features: KNOWLEDGE_SEARCH. 335 bool disable_agent_query_logging = 14 336 [(google.api.field_behavior) = OPTIONAL]; 337 338 // Optional. Enable including conversation context during query answer 339 // generation. Supported features: KNOWLEDGE_SEARCH. 340 bool enable_conversation_augmented_query = 16 341 [(google.api.field_behavior) = OPTIONAL]; 342 343 // Settings of suggestion trigger. 344 // 345 // Currently, only ARTICLE_SUGGESTION, FAQ, and DIALOGFLOW_ASSIST will use 346 // this field. 347 SuggestionTriggerSettings suggestion_trigger_settings = 10; 348 349 // Configs of query. 350 SuggestionQueryConfig query_config = 6; 351 352 // Configs of custom conversation model. 353 ConversationModelConfig conversation_model_config = 7; 354 355 // Configs for processing conversation. 356 ConversationProcessConfig conversation_process_config = 8; 357 } 358 359 // Detail human agent assistant config. 360 message SuggestionConfig { 361 // Configuration of different suggestion features. One feature can have only 362 // one config. 363 repeated SuggestionFeatureConfig feature_configs = 2; 364 365 // If `group_suggestion_responses` is false, and there are multiple 366 // `feature_configs` in `event based suggestion` or 367 // StreamingAnalyzeContent, we will try to deliver suggestions to customers 368 // as soon as we get new suggestion. Different type of suggestions based on 369 // the same context will be in separate Pub/Sub event or 370 // `StreamingAnalyzeContentResponse`. 371 // 372 // If `group_suggestion_responses` set to true. All the suggestions to the 373 // same participant based on the same context will be grouped into a single 374 // Pub/Sub event or StreamingAnalyzeContentResponse. 375 bool group_suggestion_responses = 3; 376 } 377 378 // Config for suggestion query. 379 message SuggestionQueryConfig { 380 // Knowledge base source settings. 381 // 382 // Supported features: ARTICLE_SUGGESTION, FAQ. 383 message KnowledgeBaseQuerySource { 384 // Required. Knowledge bases to query. Format: 385 // `projects/<Project ID>/locations/<Location 386 // ID>/knowledgeBases/<Knowledge Base ID>`. Currently, only one knowledge 387 // base is supported. 388 repeated string knowledge_bases = 1 [ 389 (google.api.field_behavior) = REQUIRED, 390 (google.api.resource_reference) = { 391 type: "dialogflow.googleapis.com/KnowledgeBase" 392 } 393 ]; 394 } 395 396 // Document source settings. 397 // 398 // Supported features: SMART_REPLY, SMART_COMPOSE. 399 message DocumentQuerySource { 400 // Required. Knowledge documents to query from. Format: 401 // `projects/<Project ID>/locations/<Location 402 // ID>/knowledgeBases/<KnowledgeBase ID>/documents/<Document ID>`. 403 // Currently, only one document is supported. 404 repeated string documents = 1 [ 405 (google.api.field_behavior) = REQUIRED, 406 (google.api.resource_reference) = { 407 type: "dialogflow.googleapis.com/Document" 408 } 409 ]; 410 } 411 412 // Dialogflow source setting. 413 // 414 // Supported feature: DIALOGFLOW_ASSIST, ENTITY_EXTRACTION. 415 message DialogflowQuerySource { 416 // The configuration used for human agent side Dialogflow assist 417 // suggestion. 418 message HumanAgentSideConfig { 419 // Optional. The name of a dialogflow virtual agent used for intent 420 // detection and suggestion triggered by human agent. 421 // Format: `projects/<Project ID>/locations/<Location ID>/agent`. 422 string agent = 1 [ 423 (google.api.field_behavior) = OPTIONAL, 424 (google.api.resource_reference) = { 425 type: "dialogflow.googleapis.com/Agent" 426 } 427 ]; 428 } 429 430 // Required. The name of a dialogflow virtual agent used for end user side 431 // intent detection and suggestion. Format: `projects/<Project 432 // ID>/locations/<Location ID>/agent`. When multiple agents are allowed in 433 // the same Dialogflow project. 434 string agent = 1 [ 435 (google.api.field_behavior) = REQUIRED, 436 (google.api.resource_reference) = { 437 type: "dialogflow.googleapis.com/Agent" 438 } 439 ]; 440 441 // The Dialogflow assist configuration for human agent. 442 HumanAgentSideConfig human_agent_side_config = 3; 443 } 444 445 // Settings that determine how to filter recent conversation context when 446 // generating suggestions. 447 message ContextFilterSettings { 448 // If set to true, the last message from virtual agent (hand off message) 449 // and the message before it (trigger message of hand off) are dropped. 450 bool drop_handoff_messages = 1; 451 452 // If set to true, all messages from virtual agent are dropped. 453 bool drop_virtual_agent_messages = 2; 454 455 // If set to true, all messages from ivr stage are dropped. 456 bool drop_ivr_messages = 3; 457 } 458 459 // Custom sections to return when requesting a summary of a conversation. 460 // This is only supported when `baseline_model_version` == '2.0'. 461 // 462 // Supported features: CONVERSATION_SUMMARIZATION, 463 // CONVERSATION_SUMMARIZATION_VOICE. 464 message Sections { 465 // Selectable sections to return when requesting a summary of a 466 // conversation. 467 enum SectionType { 468 // Undefined section type, does not return anything. 469 SECTION_TYPE_UNSPECIFIED = 0; 470 471 // What the customer needs help with or has question about. 472 // Section name: "situation". 473 SITUATION = 1; 474 475 // What the agent does to help the customer. 476 // Section name: "action". 477 ACTION = 2; 478 479 // Result of the customer service. A single word describing the result 480 // of the conversation. 481 // Section name: "resolution". 482 RESOLUTION = 3; 483 484 // Reason for cancellation if the customer requests for a cancellation. 485 // "N/A" otherwise. 486 // Section name: "reason_for_cancellation". 487 REASON_FOR_CANCELLATION = 4; 488 489 // "Unsatisfied" or "Satisfied" depending on the customer's feelings at 490 // the end of the conversation. 491 // Section name: "customer_satisfaction". 492 CUSTOMER_SATISFACTION = 5; 493 494 // Key entities extracted from the conversation, such as ticket number, 495 // order number, dollar amount, etc. 496 // Section names are prefixed by "entities/". 497 ENTITIES = 6; 498 } 499 500 // The selected sections chosen to return when requesting a summary of a 501 // conversation. A duplicate selected section will be treated as a single 502 // selected section. If section types are not provided, the default will 503 // be {SITUATION, ACTION, RESULT}. 504 repeated SectionType section_types = 1; 505 } 506 507 // Source of query. 508 oneof query_source { 509 // Query from knowledgebase. It is used by: 510 // ARTICLE_SUGGESTION, FAQ. 511 KnowledgeBaseQuerySource knowledge_base_query_source = 1; 512 513 // Query from knowledge base document. It is used by: 514 // SMART_REPLY, SMART_COMPOSE. 515 DocumentQuerySource document_query_source = 2; 516 517 // Query from Dialogflow agent. It is used by DIALOGFLOW_ASSIST, 518 // ENTITY_EXTRACTION. 519 DialogflowQuerySource dialogflow_query_source = 3; 520 } 521 522 // Maximum number of results to return. Currently, if unset, defaults to 10. 523 // And the max number is 20. 524 int32 max_results = 4; 525 526 // Confidence threshold of query result. 527 // 528 // Agent Assist gives each suggestion a score in the range [0.0, 1.0], based 529 // on the relevance between the suggestion and the current conversation 530 // context. A score of 0.0 has no relevance, while a score of 1.0 has high 531 // relevance. Only suggestions with a score greater than or equal to the 532 // value of this field are included in the results. 533 // 534 // For a baseline model (the default), the recommended value is in the range 535 // [0.05, 0.1]. 536 // 537 // For a custom model, there is no recommended value. Tune this value by 538 // starting from a very low value and slowly increasing until you have 539 // desired results. 540 // 541 // If this field is not set, it is default to 0.0, which means that all 542 // suggestions are returned. 543 // 544 // Supported features: ARTICLE_SUGGESTION, FAQ, SMART_REPLY, SMART_COMPOSE, 545 // KNOWLEDGE_SEARCH, KNOWLEDGE_ASSIST, ENTITY_EXTRACTION. 546 float confidence_threshold = 5; 547 548 // Determines how recent conversation context is filtered when generating 549 // suggestions. If unspecified, no messages will be dropped. 550 ContextFilterSettings context_filter_settings = 7; 551 552 // Optional. The customized sections chosen to return when requesting a 553 // summary of a conversation. 554 Sections sections = 8 [(google.api.field_behavior) = OPTIONAL]; 555 } 556 557 // Custom conversation models used in agent assist feature. 558 // 559 // Supported feature: ARTICLE_SUGGESTION, SMART_COMPOSE, SMART_REPLY, 560 // CONVERSATION_SUMMARIZATION. 561 message ConversationModelConfig { 562 // Conversation model resource name. Format: `projects/<Project 563 // ID>/conversationModels/<Model ID>`. 564 string model = 1 [(google.api.resource_reference) = { 565 type: "dialogflow.googleapis.com/ConversationModel" 566 }]; 567 568 // Version of current baseline model. It will be ignored if 569 // [model][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig.model] 570 // is set. Valid versions are: 571 // Article Suggestion baseline model: 572 // - 0.9 573 // - 1.0 (default) 574 // Summarization baseline model: 575 // - 1.0 576 string baseline_model_version = 8; 577 } 578 579 // Config to process conversation. 580 message ConversationProcessConfig { 581 // Number of recent non-small-talk sentences to use as context for article 582 // and FAQ suggestion 583 int32 recent_sentences_count = 2; 584 } 585 586 // Configuration for analyses to run on each conversation message. 587 message MessageAnalysisConfig { 588 // Enable entity extraction in conversation messages on [agent assist 589 // stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages). 590 // If unspecified, defaults to false. 591 // 592 // Currently, this feature is not general available, please contact Google 593 // to get access. 594 bool enable_entity_extraction = 2; 595 596 // Enable sentiment analysis in conversation messages on [agent assist 597 // stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages). 598 // If unspecified, defaults to false. Sentiment analysis inspects user input 599 // and identifies the prevailing subjective opinion, especially to determine 600 // a user's attitude as positive, negative, or neutral: 601 // https://cloud.google.com/natural-language/docs/basics#sentiment_analysis 602 // For 603 // [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.StreamingAnalyzeContent] 604 // method, result will be in 605 // [StreamingAnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse.message]. 606 // For 607 // [Participants.AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent] 608 // method, result will be in 609 // [AnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2beta1.AnalyzeContentResponse.message] 610 // For 611 // [Conversations.ListMessages][google.cloud.dialogflow.v2beta1.Conversations.ListMessages] 612 // method, result will be in 613 // [ListMessagesResponse.messages.SentimentAnalysisResult][google.cloud.dialogflow.v2beta1.ListMessagesResponse.messages] 614 // If Pub/Sub notification is configured, result will be in 615 // [ConversationEvent.new_message_payload.SentimentAnalysisResult][google.cloud.dialogflow.v2beta1.ConversationEvent.new_message_payload]. 616 bool enable_sentiment_analysis = 3; 617 } 618 619 // Pub/Sub topic on which to publish new agent assistant events. 620 NotificationConfig notification_config = 2; 621 622 // Configuration for agent assistance of human agent participant. 623 SuggestionConfig human_agent_suggestion_config = 3; 624 625 // Configuration for agent assistance of end user participant. 626 // 627 // Currently, this feature is not general available, please contact Google 628 // to get access. 629 SuggestionConfig end_user_suggestion_config = 4; 630 631 // Configuration for message analysis. 632 MessageAnalysisConfig message_analysis_config = 5; 633} 634 635// Defines the hand off to a live agent, typically on which external agent 636// service provider to connect to a conversation. 637// 638// Currently, this feature is not general available, please contact Google 639// to get access. 640message HumanAgentHandoffConfig { 641 // Configuration specific to LivePerson (https://www.liveperson.com). 642 message LivePersonConfig { 643 // Required. Account number of the LivePerson account to connect. This is 644 // the account number you input at the login page. 645 string account_number = 1 [(google.api.field_behavior) = REQUIRED]; 646 } 647 648 // Configuration specific to Salesforce Live Agent. 649 message SalesforceLiveAgentConfig { 650 // Required. The organization ID of the Salesforce account. 651 string organization_id = 1 [(google.api.field_behavior) = REQUIRED]; 652 653 // Required. Live Agent deployment ID. 654 string deployment_id = 2 [(google.api.field_behavior) = REQUIRED]; 655 656 // Required. Live Agent chat button ID. 657 string button_id = 3 [(google.api.field_behavior) = REQUIRED]; 658 659 // Required. Domain of the Live Agent endpoint for this agent. You can find 660 // the endpoint URL in the `Live Agent settings` page. For example if URL 661 // has the form https://d.la4-c2-phx.salesforceliveagent.com/..., 662 // you should fill in d.la4-c2-phx.salesforceliveagent.com. 663 string endpoint_domain = 4 [(google.api.field_behavior) = REQUIRED]; 664 } 665 666 // Required. Specifies which agent service to connect for human agent handoff. 667 oneof agent_service { 668 // Uses LivePerson (https://www.liveperson.com). 669 LivePersonConfig live_person_config = 1; 670 671 // Uses Salesforce Live Agent. 672 SalesforceLiveAgentConfig salesforce_live_agent_config = 2; 673 } 674} 675 676// Defines notification behavior. 677message NotificationConfig { 678 // Format of cloud pub/sub message. 679 enum MessageFormat { 680 // If it is unspecified, PROTO will be used. 681 MESSAGE_FORMAT_UNSPECIFIED = 0; 682 683 // Pub/Sub message will be serialized proto. 684 PROTO = 1; 685 686 // Pub/Sub message will be json. 687 JSON = 2; 688 } 689 690 // Name of the Pub/Sub topic to publish conversation 691 // events like 692 // [CONVERSATION_STARTED][google.cloud.dialogflow.v2beta1.ConversationEvent.Type.CONVERSATION_STARTED] 693 // as serialized 694 // [ConversationEvent][google.cloud.dialogflow.v2beta1.ConversationEvent] 695 // protos. 696 // 697 // For telephony integration to receive notification, make sure either this 698 // topic is in the same project as the conversation or you grant 699 // `service-<Conversation Project 700 // Number>@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow Service 701 // Agent` role in the topic project. 702 // 703 // For chat integration to receive notification, make sure API caller has been 704 // granted the `Dialogflow Service Agent` role for the topic. 705 // 706 // Format: `projects/<Project ID>/locations/<Location ID>/topics/<Topic ID>`. 707 string topic = 1; 708 709 // Format of message. 710 MessageFormat message_format = 2; 711} 712 713// Defines logging behavior for conversation lifecycle events. 714message LoggingConfig { 715 // Whether to log conversation events like 716 // [CONVERSATION_STARTED][google.cloud.dialogflow.v2beta1.ConversationEvent.Type.CONVERSATION_STARTED] 717 // to Stackdriver in the conversation project as JSON format 718 // [ConversationEvent][google.cloud.dialogflow.v2beta1.ConversationEvent] 719 // protos. 720 bool enable_stackdriver_logging = 3; 721} 722 723// The request message for 724// [ConversationProfiles.ListConversationProfiles][google.cloud.dialogflow.v2beta1.ConversationProfiles.ListConversationProfiles]. 725message ListConversationProfilesRequest { 726 // Required. The project to list all conversation profiles from. 727 // Format: `projects/<Project ID>/locations/<Location ID>`. 728 string parent = 1 [ 729 (google.api.field_behavior) = REQUIRED, 730 (google.api.resource_reference) = { 731 child_type: "dialogflow.googleapis.com/ConversationProfile" 732 } 733 ]; 734 735 // The maximum number of items to return in a single page. By 736 // default 100 and at most 1000. 737 int32 page_size = 2; 738 739 // The next_page_token value returned from a previous list request. 740 string page_token = 3; 741} 742 743// The response message for 744// [ConversationProfiles.ListConversationProfiles][google.cloud.dialogflow.v2beta1.ConversationProfiles.ListConversationProfiles]. 745message ListConversationProfilesResponse { 746 // The list of project conversation profiles. There is a maximum number 747 // of items returned based on the page_size field in the request. 748 repeated ConversationProfile conversation_profiles = 1; 749 750 // Token to retrieve the next page of results, or empty if there are no 751 // more results in the list. 752 string next_page_token = 2; 753} 754 755// The request message for 756// [ConversationProfiles.GetConversationProfile][google.cloud.dialogflow.v2beta1.ConversationProfiles.GetConversationProfile]. 757message GetConversationProfileRequest { 758 // Required. The resource name of the conversation profile. 759 // Format: `projects/<Project ID>/locations/<Location 760 // ID>/conversationProfiles/<Conversation Profile ID>`. 761 string name = 1 [ 762 (google.api.field_behavior) = REQUIRED, 763 (google.api.resource_reference) = { 764 type: "dialogflow.googleapis.com/ConversationProfile" 765 } 766 ]; 767} 768 769// The request message for 770// [ConversationProfiles.CreateConversationProfile][google.cloud.dialogflow.v2beta1.ConversationProfiles.CreateConversationProfile]. 771message CreateConversationProfileRequest { 772 // Required. The project to create a conversation profile for. 773 // Format: `projects/<Project ID>/locations/<Location ID>`. 774 string parent = 1 [ 775 (google.api.field_behavior) = REQUIRED, 776 (google.api.resource_reference) = { 777 child_type: "dialogflow.googleapis.com/ConversationProfile" 778 } 779 ]; 780 781 // Required. The conversation profile to create. 782 ConversationProfile conversation_profile = 2 783 [(google.api.field_behavior) = REQUIRED]; 784} 785 786// The request message for 787// [ConversationProfiles.UpdateConversationProfile][google.cloud.dialogflow.v2beta1.ConversationProfiles.UpdateConversationProfile]. 788message UpdateConversationProfileRequest { 789 // Required. The conversation profile to update. 790 ConversationProfile conversation_profile = 1 791 [(google.api.field_behavior) = REQUIRED]; 792 793 // Required. The mask to control which fields to update. 794 google.protobuf.FieldMask update_mask = 2 795 [(google.api.field_behavior) = REQUIRED]; 796} 797 798// The request message for 799// [ConversationProfiles.DeleteConversationProfile][google.cloud.dialogflow.v2beta1.ConversationProfiles.DeleteConversationProfile]. 800// 801// This operation fails if the conversation profile is still referenced from 802// a phone number. 803message DeleteConversationProfileRequest { 804 // Required. The name of the conversation profile to delete. 805 // Format: `projects/<Project ID>/locations/<Location 806 // ID>/conversationProfiles/<Conversation Profile ID>`. 807 string name = 1 [ 808 (google.api.field_behavior) = REQUIRED, 809 (google.api.resource_reference) = { 810 type: "dialogflow.googleapis.com/ConversationProfile" 811 } 812 ]; 813} 814 815// The request message for 816// [ConversationProfiles.SetSuggestionFeature][]. 817message SetSuggestionFeatureConfigRequest { 818 // Required. The Conversation Profile to add or update the suggestion feature 819 // config. Format: `projects/<Project ID>/locations/<Location 820 // ID>/conversationProfiles/<Conversation Profile ID>`. 821 string conversation_profile = 1 [(google.api.field_behavior) = REQUIRED]; 822 823 // Required. The participant role to add or update the suggestion feature 824 // config. Only HUMAN_AGENT or END_USER can be used. 825 Participant.Role participant_role = 2 826 [(google.api.field_behavior) = REQUIRED]; 827 828 // Required. The suggestion feature config to add or update. 829 HumanAgentAssistantConfig.SuggestionFeatureConfig suggestion_feature_config = 830 3 [(google.api.field_behavior) = REQUIRED]; 831} 832 833// The request message for [ConversationProfiles.ClearFeature][]. 834message ClearSuggestionFeatureConfigRequest { 835 // Required. The Conversation Profile to add or update the suggestion feature 836 // config. Format: `projects/<Project ID>/locations/<Location 837 // ID>/conversationProfiles/<Conversation Profile ID>`. 838 string conversation_profile = 1 [(google.api.field_behavior) = REQUIRED]; 839 840 // Required. The participant role to remove the suggestion feature 841 // config. Only HUMAN_AGENT or END_USER can be used. 842 Participant.Role participant_role = 2 843 [(google.api.field_behavior) = REQUIRED]; 844 845 // Required. The type of the suggestion feature to remove. 846 SuggestionFeature.Type suggestion_feature_type = 3 847 [(google.api.field_behavior) = REQUIRED]; 848} 849 850// Metadata for a [ConversationProfile.SetSuggestionFeatureConfig][] 851// operation. 852message SetSuggestionFeatureConfigOperationMetadata { 853 // The resource name of the conversation profile. Format: 854 // `projects/<Project ID>/locations/<Location 855 // ID>/conversationProfiles/<Conversation Profile ID>` 856 string conversation_profile = 1; 857 858 // Required. The participant role to add or update the suggestion feature 859 // config. Only HUMAN_AGENT or END_USER can be used. 860 Participant.Role participant_role = 2 861 [(google.api.field_behavior) = REQUIRED]; 862 863 // Required. The type of the suggestion feature to add or update. 864 SuggestionFeature.Type suggestion_feature_type = 3 865 [(google.api.field_behavior) = REQUIRED]; 866 867 // Timestamp whe the request was created. The time is measured on server side. 868 google.protobuf.Timestamp create_time = 4; 869} 870 871// Metadata for a [ConversationProfile.ClearSuggestionFeatureConfig][] 872// operation. 873message ClearSuggestionFeatureConfigOperationMetadata { 874 // The resource name of the conversation profile. Format: 875 // `projects/<Project ID>/locations/<Location 876 // ID>/conversationProfiles/<Conversation Profile ID>` 877 string conversation_profile = 1; 878 879 // Required. The participant role to remove the suggestion feature 880 // config. Only HUMAN_AGENT or END_USER can be used. 881 Participant.Role participant_role = 2 882 [(google.api.field_behavior) = REQUIRED]; 883 884 // Required. The type of the suggestion feature to remove. 885 SuggestionFeature.Type suggestion_feature_type = 3 886 [(google.api.field_behavior) = REQUIRED]; 887 888 // Timestamp whe the request was created. The time is measured on server side. 889 google.protobuf.Timestamp create_time = 4; 890} 891