Skip to content

Commit dabc235

Browse files
Google APIscopybara-github
authored andcommitted
feat: Launch UploadConversation endpoint
PiperOrigin-RevId: 522129764
1 parent 7610d7c commit dabc235

3 files changed

Lines changed: 82 additions & 7 deletions

File tree

google/cloud/contactcenterinsights/v1/contact_center_insights.proto

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,21 @@ service ContactCenterInsights {
5252
"parent,conversation,conversation_id";
5353
}
5454

55+
// Create a longrunning conversation upload operation. This method differs
56+
// from CreateConversation by allowing audio transcription and optional DLP
57+
// redaction.
58+
rpc UploadConversation(UploadConversationRequest)
59+
returns (google.longrunning.Operation) {
60+
option (google.api.http) = {
61+
post: "/v1/{parent=projects/*/locations/*}/conversations:upload"
62+
body: "*"
63+
};
64+
option (google.longrunning.operation_info) = {
65+
response_type: "Conversation"
66+
metadata_type: "UploadConversationMetadata"
67+
};
68+
}
69+
5570
// Updates a conversation.
5671
rpc UpdateConversation(UpdateConversationRequest) returns (Conversation) {
5772
option (google.api.http) = {
@@ -537,6 +552,55 @@ message CreateConversationRequest {
537552
string conversation_id = 3;
538553
}
539554

555+
// Request to upload a conversation.
556+
message UploadConversationRequest {
557+
// Required. The parent resource of the conversation.
558+
string parent = 1 [
559+
(google.api.field_behavior) = REQUIRED,
560+
(google.api.resource_reference) = {
561+
type: "locations.googleapis.com/Location"
562+
}
563+
];
564+
565+
// Required. The conversation resource to create.
566+
Conversation conversation = 2 [(google.api.field_behavior) = REQUIRED];
567+
568+
// Optional. A unique ID for the new conversation. This ID will become the
569+
// final component of the conversation's resource name. If no ID is specified,
570+
// a server-generated ID will be used.
571+
//
572+
// This value should be 4-64 characters and must match the regular
573+
// expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-`
574+
string conversation_id = 3 [(google.api.field_behavior) = OPTIONAL];
575+
576+
// Optional. DLP settings for transcript redaction. Optional, will default to
577+
// the config specified in Settings.
578+
RedactionConfig redaction_config = 4 [(google.api.field_behavior) = OPTIONAL];
579+
}
580+
581+
// The metadata for an UploadConversation operation.
582+
message UploadConversationMetadata {
583+
// Output only. The time the operation was created.
584+
google.protobuf.Timestamp create_time = 1
585+
[(google.api.field_behavior) = OUTPUT_ONLY];
586+
587+
// Output only. The time the operation finished running.
588+
google.protobuf.Timestamp end_time = 2
589+
[(google.api.field_behavior) = OUTPUT_ONLY];
590+
591+
// Output only. The original request.
592+
UploadConversationRequest request = 3
593+
[(google.api.field_behavior) = OUTPUT_ONLY];
594+
595+
// Output only. The operation name for a successfully created analysis
596+
// operation, if any.
597+
string analysis_operation = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
598+
599+
// Output only. The redaction config applied to the uploaded conversation.
600+
RedactionConfig applied_redaction_config = 5
601+
[(google.api.field_behavior) = OUTPUT_ONLY];
602+
}
603+
540604
// Request to list conversations.
541605
message ListConversationsRequest {
542606
// Required. The parent resource of the conversation.

google/cloud/contactcenterinsights/v1/contactcenterinsights_v1.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,7 @@ types:
2121
- name: google.cloud.contactcenterinsights.v1.IngestConversationsResponse
2222
- name: google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata
2323
- name: google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse
24-
25-
documentation:
26-
rules:
27-
- selector: google.longrunning.Operations.ListOperations
28-
description: |-
29-
Lists operations that match the specified filter in the request. If
30-
the server doesn't support this method, it returns `UNIMPLEMENTED`.
24+
- name: google.cloud.contactcenterinsights.v1.UploadConversationMetadata
3125

3226
http:
3327
rules:

google/cloud/contactcenterinsights/v1/resources.proto

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -917,6 +917,23 @@ message Settings {
917917

918918
// Default analysis settings.
919919
AnalysisConfig analysis_config = 7;
920+
921+
// Default DLP redaction resources to be applied while ingesting
922+
// conversations.
923+
RedactionConfig redaction_config = 10;
924+
}
925+
926+
// DLP resources used for redaction while ingesting conversations.
927+
message RedactionConfig {
928+
// The fully-qualified DLP deidentify template resource name.
929+
// Format:
930+
// `projects/{project}/deidentifyTemplates/{template}`
931+
string deidentify_template = 1;
932+
933+
// The fully-qualified DLP inspect template resource name.
934+
// Format:
935+
// `projects/{project}/inspectTemplates/{template}`
936+
string inspect_template = 2;
920937
}
921938

922939
// An annotation that was generated during the customer and agent interaction.

0 commit comments

Comments
 (0)