1- // Copyright 2021 Google LLC
1+ // Copyright 2022 Google LLC
22//
33// Licensed under the Apache License, Version 2.0 (the "License");
44// you may not use this file except in compliance with the License.
@@ -21,10 +21,8 @@ import "google/api/client.proto";
2121import "google/api/field_behavior.proto" ;
2222import "google/api/resource.proto" ;
2323import "google/cloud/dialogflow/v2beta1/audio_config.proto" ;
24- import "google/cloud/dialogflow/v2beta1/document.proto" ;
2524import "google/cloud/dialogflow/v2beta1/participant.proto" ;
2625import "google/longrunning/operations.proto" ;
27- import "google/protobuf/duration.proto" ;
2826import "google/protobuf/empty.proto" ;
2927import "google/protobuf/field_mask.proto" ;
3028import "google/protobuf/timestamp.proto" ;
@@ -118,6 +116,63 @@ service ConversationProfiles {
118116 };
119117 option (google.api.method_signature ) = "name" ;
120118 }
119+
120+ // Adds or updates a suggestion feature in a conversation profile.
121+ // If the conversation profile contains the type of suggestion feature for
122+ // the participant role, it will update it. Otherwise it will insert the
123+ // suggestion feature.
124+ //
125+ // This method is a [long-running
126+ // operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
127+ // The returned `Operation` type has the following method-specific fields:
128+ //
129+ // - `metadata`: [SetSuggestionFeatureConfigOperationMetadata][google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata]
130+ // - `response`: [ConversationProfile][google.cloud.dialogflow.v2beta1.ConversationProfile]
131+ //
132+ // If a long running operation to add or update suggestion feature
133+ // config for the same conversation profile, participant role and suggestion
134+ // feature type exists, please cancel the existing long running operation
135+ // before sending such request, otherwise the request will be rejected.
136+ rpc SetSuggestionFeatureConfig (SetSuggestionFeatureConfigRequest ) returns (google.longrunning.Operation ) {
137+ option (google.api.http ) = {
138+ post : "/v2beta1/{conversation_profile=projects/*/conversationProfiles/*}:setSuggestionFeatureConfig"
139+ body : "*"
140+ additional_bindings {
141+ post : "/v2beta1/{conversation_profile=projects/*/locations/*/conversationProfiles/*}:setSuggestionFeatureConfig"
142+ body : "*"
143+ }
144+ };
145+ option (google.api.method_signature ) = "conversation_profile" ;
146+ option (google.longrunning.operation_info ) = {
147+ response_type : "ConversationProfile"
148+ metadata_type : "SetSuggestionFeatureConfigOperationMetadata"
149+ };
150+ }
151+
152+ // Clears a suggestion feature from a conversation profile for the given
153+ // participant role.
154+ //
155+ // This method is a [long-running
156+ // operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
157+ // The returned `Operation` type has the following method-specific fields:
158+ //
159+ // - `metadata`: [ClearSuggestionFeatureConfigOperationMetadata][google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata]
160+ // - `response`: [ConversationProfile][google.cloud.dialogflow.v2beta1.ConversationProfile]
161+ rpc ClearSuggestionFeatureConfig (ClearSuggestionFeatureConfigRequest ) returns (google.longrunning.Operation ) {
162+ option (google.api.http ) = {
163+ post : "/v2beta1/{conversation_profile=projects/*/conversationProfiles/*}:clearSuggestionFeatureConfig"
164+ body : "*"
165+ additional_bindings {
166+ post : "/v2beta1/{conversation_profile=projects/*/locations/*/conversationProfiles/*}:clearSuggestionFeatureConfig"
167+ body : "*"
168+ }
169+ };
170+ option (google.api.method_signature ) = "conversation_profile" ;
171+ option (google.longrunning.operation_info ) = {
172+ response_type : "ConversationProfile"
173+ metadata_type : "ClearSuggestionFeatureConfigOperationMetadata"
174+ };
175+ }
121176}
122177
123178// Defines the services to connect to incoming Dialogflow conversations.
@@ -501,11 +556,15 @@ message NotificationConfig {
501556 // [CONVERSATION_STARTED][google.cloud.dialogflow.v2beta1.ConversationEvent.Type.CONVERSATION_STARTED] as
502557 // serialized [ConversationEvent][google.cloud.dialogflow.v2beta1.ConversationEvent] protos.
503558 //
504- // Notification works for phone calls, if this topic either is in the same
505- // project as the conversation or you grant `service-<Conversation Project
559+ // For telephony integration to receive notification, make sure either this
560+ // topic is in the same project as the conversation or you grant
561+ // `service-<Conversation Project
506562 // Number>@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow Service
507563 // Agent` role in the topic project.
508564 //
565+ // For chat integration to receive notification, make sure API caller has been
566+ // granted the `Dialogflow Service Agent` role for the topic.
567+ //
509568 // Format: `projects/<Project ID>/locations/<Location ID>/topics/<Topic ID>`.
510569 string topic = 1 ;
511570
@@ -604,3 +663,72 @@ message DeleteConversationProfileRequest {
604663 }
605664 ];
606665}
666+
667+ // The request message for
668+ // [ConversationProfiles.SetSuggestionFeature][].
669+ message SetSuggestionFeatureConfigRequest {
670+ // Required. The Conversation Profile to add or update the suggestion feature
671+ // config. Format: `projects/<Project ID>/locations/<Location
672+ // ID>/conversationProfiles/<Conversation Profile ID>`.
673+ string conversation_profile = 1 [(google.api.field_behavior ) = REQUIRED ];
674+
675+ // Required. The participant role to add or update the suggestion feature
676+ // config. Only HUMAN_AGENT or END_USER can be used.
677+ Participant.Role participant_role = 2 [(google.api.field_behavior ) = REQUIRED ];
678+
679+ // Required. The suggestion feature config to add or update.
680+ HumanAgentAssistantConfig.SuggestionFeatureConfig suggestion_feature_config = 3 [(google.api.field_behavior ) = REQUIRED ];
681+ }
682+
683+ // The request message for [ConversationProfiles.ClearFeature][].
684+ message ClearSuggestionFeatureConfigRequest {
685+ // Required. The Conversation Profile to add or update the suggestion feature
686+ // config. Format: `projects/<Project ID>/locations/<Location
687+ // ID>/conversationProfiles/<Conversation Profile ID>`.
688+ string conversation_profile = 1 [(google.api.field_behavior ) = REQUIRED ];
689+
690+ // Required. The participant role to remove the suggestion feature
691+ // config. Only HUMAN_AGENT or END_USER can be used.
692+ Participant.Role participant_role = 2 [(google.api.field_behavior ) = REQUIRED ];
693+
694+ // Required. The type of the suggestion feature to remove.
695+ SuggestionFeature.Type suggestion_feature_type = 3 [(google.api.field_behavior ) = REQUIRED ];
696+ }
697+
698+ // Metadata for a [ConversationProfile.SetSuggestionFeatureConfig][]
699+ // operation.
700+ message SetSuggestionFeatureConfigOperationMetadata {
701+ // The resource name of the conversation profile. Format:
702+ // `projects/<Project ID>/locations/<Location
703+ // ID>/conversationProfiles/<Conversation Profile ID>`
704+ string conversation_profile = 1 ;
705+
706+ // Required. The participant role to add or update the suggestion feature
707+ // config. Only HUMAN_AGENT or END_USER can be used.
708+ Participant.Role participant_role = 2 [(google.api.field_behavior ) = REQUIRED ];
709+
710+ // Required. The type of the suggestion feature to add or update.
711+ SuggestionFeature.Type suggestion_feature_type = 3 [(google.api.field_behavior ) = REQUIRED ];
712+
713+ // Timestamp whe the request was created. The time is measured on server side.
714+ google.protobuf.Timestamp create_time = 4 ;
715+ }
716+
717+ // Metadata for a [ConversationProfile.ClearSuggestionFeatureConfig][]
718+ // operation.
719+ message ClearSuggestionFeatureConfigOperationMetadata {
720+ // The resource name of the conversation profile. Format:
721+ // `projects/<Project ID>/locations/<Location
722+ // ID>/conversationProfiles/<Conversation Profile ID>`
723+ string conversation_profile = 1 ;
724+
725+ // Required. The participant role to remove the suggestion feature
726+ // config. Only HUMAN_AGENT or END_USER can be used.
727+ Participant.Role participant_role = 2 [(google.api.field_behavior ) = REQUIRED ];
728+
729+ // Required. The type of the suggestion feature to remove.
730+ SuggestionFeature.Type suggestion_feature_type = 3 [(google.api.field_behavior ) = REQUIRED ];
731+
732+ // Timestamp whe the request was created. The time is measured on server side.
733+ google.protobuf.Timestamp create_time = 4 ;
734+ }
0 commit comments