Skip to content

Commit d9ca515

Browse files
Google APIscopybara-github
authored andcommitted
feat: added HUMAN_INTERVENTION_NEEDED type in ConversationEvent
feat: added SetSuggestionFeatureConfig and ClearSuggestionFeatureConfig apis feat: added AGENT_FACING_SMART_REPLY type in KnowledgeType feat: added GcsDestination. docs: added explanation for uri fields in resources docs: added explanation for SuggestionResult docs: added explanation for language code in session PiperOrigin-RevId: 435479473
1 parent 4dd75c2 commit d9ca515

24 files changed

Lines changed: 247 additions & 54 deletions

google/cloud/dialogflow/v2beta1/BUILD.bazel

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ proto_library(
5151
"//google/longrunning:operations_proto",
5252
"//google/rpc:status_proto",
5353
"//google/type:latlng_proto",
54-
"@com_google_protobuf//:any_proto",
5554
"@com_google_protobuf//:duration_proto",
5655
"@com_google_protobuf//:empty_proto",
5756
"@com_google_protobuf//:field_mask_proto",
@@ -175,7 +174,6 @@ go_gapic_library(
175174
"//google/longrunning:longrunning_go_proto",
176175
"@com_google_cloud_go//longrunning:go_default_library",
177176
"@com_google_cloud_go//longrunning/autogen:go_default_library",
178-
"@io_bazel_rules_go//proto/wkt:any_go_proto",
179177
"@io_bazel_rules_go//proto/wkt:duration_go_proto",
180178
"@io_bazel_rules_go//proto/wkt:struct_go_proto",
181179
],

google/cloud/dialogflow/v2beta1/agent.proto

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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.
@@ -20,7 +20,6 @@ import "google/api/annotations.proto";
2020
import "google/api/client.proto";
2121
import "google/api/field_behavior.proto";
2222
import "google/api/resource.proto";
23-
import "google/cloud/dialogflow/v2beta1/environment.proto";
2423
import "google/cloud/dialogflow/v2beta1/validation_result.proto";
2524
import "google/longrunning/operations.proto";
2625
import "google/protobuf/empty.proto";
@@ -478,6 +477,12 @@ message ExportAgentRequest {
478477
// URI to export the agent to.
479478
// The format of this URI must be `gs://<bucket-name>/<object-name>`.
480479
// If left unspecified, the serialized agent is returned inline.
480+
//
481+
// Dialogflow performs a write operation for the Cloud Storage object
482+
// on the caller's behalf, so your request authentication must
483+
// have write permissions for the object. For more information, see
484+
// [Dialogflow access
485+
// control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
481486
string agent_uri = 2;
482487
}
483488

@@ -510,6 +515,12 @@ message ImportAgentRequest {
510515
oneof agent {
511516
// The URI to a Google Cloud Storage file containing the agent to import.
512517
// Note: The URI must start with "gs://".
518+
//
519+
// Dialogflow performs a read operation for the Cloud Storage object
520+
// on the caller's behalf, so your request authentication must
521+
// have read permissions for the object. For more information, see
522+
// [Dialogflow access
523+
// control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
513524
string agent_uri = 2;
514525

515526
// Zip compressed raw byte content for agent.
@@ -533,6 +544,12 @@ message RestoreAgentRequest {
533544
oneof agent {
534545
// The URI to a Google Cloud Storage file containing the agent to restore.
535546
// Note: The URI must start with "gs://".
547+
//
548+
// Dialogflow performs a read operation for the Cloud Storage object
549+
// on the caller's behalf, so your request authentication must
550+
// have read permissions for the object. For more information, see
551+
// [Dialogflow access
552+
// control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
536553
string agent_uri = 2;
537554

538555
// Zip compressed raw byte content for agent.

google/cloud/dialogflow/v2beta1/answer_record.proto

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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,7 +21,6 @@ import "google/api/client.proto";
2121
import "google/api/field_behavior.proto";
2222
import "google/api/resource.proto";
2323
import "google/cloud/dialogflow/v2beta1/participant.proto";
24-
import "google/protobuf/empty.proto";
2524
import "google/protobuf/field_mask.proto";
2625
import "google/protobuf/timestamp.proto";
2726

google/cloud/dialogflow/v2beta1/audio_config.proto

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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.
@@ -16,12 +16,9 @@ syntax = "proto3";
1616

1717
package google.cloud.dialogflow.v2beta1;
1818

19-
import "google/api/annotations.proto";
2019
import "google/api/field_behavior.proto";
2120
import "google/api/resource.proto";
2221
import "google/protobuf/duration.proto";
23-
import "google/protobuf/field_mask.proto";
24-
import "google/protobuf/timestamp.proto";
2522

2623
option cc_enable_arenas = true;
2724
option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1";

google/cloud/dialogflow/v2beta1/context.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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.

google/cloud/dialogflow/v2beta1/conversation.proto

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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.
@@ -20,16 +20,8 @@ import "google/api/annotations.proto";
2020
import "google/api/client.proto";
2121
import "google/api/field_behavior.proto";
2222
import "google/api/resource.proto";
23-
import "google/cloud/dialogflow/v2beta1/audio_config.proto";
24-
import "google/cloud/dialogflow/v2beta1/conversation_profile.proto";
25-
import "google/cloud/dialogflow/v2beta1/gcs.proto";
2623
import "google/cloud/dialogflow/v2beta1/participant.proto";
27-
import "google/cloud/dialogflow/v2beta1/session.proto";
28-
import "google/longrunning/operations.proto";
29-
import "google/protobuf/empty.proto";
30-
import "google/protobuf/field_mask.proto";
3124
import "google/protobuf/timestamp.proto";
32-
import "google/rpc/status.proto";
3325

3426
option cc_enable_arenas = true;
3527
option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1";

google/cloud/dialogflow/v2beta1/conversation_event.proto

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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.
@@ -16,7 +16,6 @@ syntax = "proto3";
1616

1717
package google.cloud.dialogflow.v2beta1;
1818

19-
import "google/api/annotations.proto";
2019
import "google/cloud/dialogflow/v2beta1/participant.proto";
2120
import "google/rpc/status.proto";
2221

@@ -44,6 +43,10 @@ message ConversationEvent {
4443
// is terminated, or a conversation is closed via the API.
4544
CONVERSATION_FINISHED = 2;
4645

46+
// An existing conversation has received notification from Dialogflow that
47+
// human intervention is required.
48+
HUMAN_INTERVENTION_NEEDED = 3;
49+
4750
// An existing conversation has received a new message, either from API or
4851
// telephony. It is configured in
4952
// [ConversationProfile.new_message_event_notification_config][google.cloud.dialogflow.v2beta1.ConversationProfile.new_message_event_notification_config]

google/cloud/dialogflow/v2beta1/conversation_profile.proto

Lines changed: 133 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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";
2121
import "google/api/field_behavior.proto";
2222
import "google/api/resource.proto";
2323
import "google/cloud/dialogflow/v2beta1/audio_config.proto";
24-
import "google/cloud/dialogflow/v2beta1/document.proto";
2524
import "google/cloud/dialogflow/v2beta1/participant.proto";
2625
import "google/longrunning/operations.proto";
27-
import "google/protobuf/duration.proto";
2826
import "google/protobuf/empty.proto";
2927
import "google/protobuf/field_mask.proto";
3028
import "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+
}

google/cloud/dialogflow/v2beta1/dialogflow_grpc_service_config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
{
2727
"service": "google.cloud.dialogflow.aam.v2beta1.AamTasks"
2828
},
29+
{
30+
"service": "google.cloud.dialogflow.aam.v2beta1.AamTopicClusters"
31+
},
2932
{
3033
"service": "google.cloud.dialogflow.aam.v2beta1.AamTrainingRuns"
3134
},

google/cloud/dialogflow/v2beta1/dialogflow_v2beta1.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@ apis:
2323
types:
2424
- name: google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse
2525
- name: google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse
26+
- name: google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata
2627
- name: google.cloud.dialogflow.v2beta1.ConversationEvent
2728
- name: google.cloud.dialogflow.v2beta1.ExportAgentResponse
2829
- name: google.cloud.dialogflow.v2beta1.HumanAgentAssistantEvent
2930
- name: google.cloud.dialogflow.v2beta1.ImportDocumentsResponse
3031
- name: google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata
3132
- name: google.cloud.dialogflow.v2beta1.OriginalDetectIntentRequest
33+
- name: google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata
3234
- name: google.cloud.dialogflow.v2beta1.WebhookRequest
3335
- name: google.cloud.dialogflow.v2beta1.WebhookResponse
3436

0 commit comments

Comments
 (0)