Skip to content

Commit 26ab5dd

Browse files
Google APIscopybara-github
authored andcommitted
feat: added support for custom content types
docs: reformat comments PiperOrigin-RevId: 414026488
1 parent ae8950f commit 26ab5dd

5 files changed

Lines changed: 167 additions & 206 deletions

File tree

google/cloud/dialogflow/cx/v3/audio_config.proto

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -31,31 +31,6 @@ option java_package = "com.google.cloud.dialogflow.cx.v3";
3131
option objc_class_prefix = "DF";
3232
option ruby_package = "Google::Cloud::Dialogflow::CX::V3";
3333

34-
// Information for a word recognized by the speech recognizer.
35-
message SpeechWordInfo {
36-
// The word this info is for.
37-
string word = 3;
38-
39-
// Time offset relative to the beginning of the audio that corresponds to the
40-
// start of the spoken word. This is an experimental feature and the accuracy
41-
// of the time offset can vary.
42-
google.protobuf.Duration start_offset = 1;
43-
44-
// Time offset relative to the beginning of the audio that corresponds to the
45-
// end of the spoken word. This is an experimental feature and the accuracy of
46-
// the time offset can vary.
47-
google.protobuf.Duration end_offset = 2;
48-
49-
// The Speech confidence between 0.0 and 1.0 for this word. A higher number
50-
// indicates an estimated greater likelihood that the recognized word is
51-
// correct. The default of 0.0 is a sentinel value indicating that confidence
52-
// was not set.
53-
//
54-
// This field is not guaranteed to be fully stable over time for the same
55-
// audio input. Users should also not rely on it to always be provided.
56-
float confidence = 4;
57-
}
58-
5934
// Audio encoding of the audio content sent in the conversational query request.
6035
// Refer to the
6136
// [Cloud Speech API
@@ -105,6 +80,31 @@ enum AudioEncoding {
10580
AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7;
10681
}
10782

83+
// Information for a word recognized by the speech recognizer.
84+
message SpeechWordInfo {
85+
// The word this info is for.
86+
string word = 3;
87+
88+
// Time offset relative to the beginning of the audio that corresponds to the
89+
// start of the spoken word. This is an experimental feature and the accuracy
90+
// of the time offset can vary.
91+
google.protobuf.Duration start_offset = 1;
92+
93+
// Time offset relative to the beginning of the audio that corresponds to the
94+
// end of the spoken word. This is an experimental feature and the accuracy of
95+
// the time offset can vary.
96+
google.protobuf.Duration end_offset = 2;
97+
98+
// The Speech confidence between 0.0 and 1.0 for this word. A higher number
99+
// indicates an estimated greater likelihood that the recognized word is
100+
// correct. The default of 0.0 is a sentinel value indicating that confidence
101+
// was not set.
102+
//
103+
// This field is not guaranteed to be fully stable over time for the same
104+
// audio input. Users should also not rely on it to always be provided.
105+
float confidence = 4;
106+
}
107+
108108
// Instructs the speech recognizer on how to process the audio content.
109109
message InputAudioConfig {
110110
// Required. Audio encoding of the audio content to process.

google/cloud/dialogflow/cx/v3/environment.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import "google/api/client.proto";
2121
import "google/api/field_behavior.proto";
2222
import "google/api/resource.proto";
2323
import "google/cloud/dialogflow/cx/v3/test_case.proto";
24+
import "google/cloud/dialogflow/cx/v3/webhook.proto";
2425
import "google/longrunning/operations.proto";
2526
import "google/protobuf/empty.proto";
2627
import "google/protobuf/field_mask.proto";

google/cloud/dialogflow/cx/v3/response_message.proto

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,17 @@ message ResponseMessage {
164164
repeated Segment segments = 1;
165165
}
166166

167+
// Represents the signal that telles the client to transfer the phone call
168+
// connected to the agent to a third-party endpoint.
169+
message TelephonyTransferCall {
170+
// Endpoint to transfer the call to.
171+
oneof endpoint {
172+
// Transfer the call to a phone number
173+
// in [E.164 format](https://en.wikipedia.org/wiki/E.164).
174+
string phone_number = 1;
175+
}
176+
}
177+
167178
// Required. The rich response message.
168179
oneof message {
169180
// Returns a text response.
@@ -202,5 +213,9 @@ message ResponseMessage {
202213
// This message is generated by Dialogflow only and not supposed to be
203214
// defined by the user.
204215
MixedAudio mixed_audio = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
216+
217+
// A signal that the client should transfer the phone call connected to
218+
// this agent to a third-party endpoint.
219+
TelephonyTransferCall telephony_transfer_call = 18;
205220
}
206221
}

google/cloud/dialogflow/cx/v3/version.proto

Lines changed: 47 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ service Versions {
4747
"https://www.googleapis.com/auth/cloud-platform,"
4848
"https://www.googleapis.com/auth/dialogflow";
4949

50-
// Returns the list of all versions in the specified
51-
// [Flow][google.cloud.dialogflow.cx.v3.Flow].
50+
// Returns the list of all versions in the specified [Flow][google.cloud.dialogflow.cx.v3.Flow].
5251
rpc ListVersions(ListVersionsRequest) returns (ListVersionsResponse) {
5352
option (google.api.http) = {
5453
get: "/v3/{parent=projects/*/locations/*/agents/*/flows/*}/versions"
@@ -64,18 +63,15 @@ service Versions {
6463
option (google.api.method_signature) = "name";
6564
}
6665

67-
// Creates a [Version][google.cloud.dialogflow.cx.v3.Version] in the specified
68-
// [Flow][google.cloud.dialogflow.cx.v3.Flow].
66+
// Creates a [Version][google.cloud.dialogflow.cx.v3.Version] in the specified [Flow][google.cloud.dialogflow.cx.v3.Flow].
6967
//
7068
// This method is a [long-running
7169
// operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
7270
// The returned `Operation` type has the following method-specific fields:
7371
//
74-
// - `metadata`:
75-
// [CreateVersionOperationMetadata][google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata]
72+
// - `metadata`: [CreateVersionOperationMetadata][google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata]
7673
// - `response`: [Version][google.cloud.dialogflow.cx.v3.Version]
77-
rpc CreateVersion(CreateVersionRequest)
78-
returns (google.longrunning.Operation) {
74+
rpc CreateVersion(CreateVersionRequest) returns (google.longrunning.Operation) {
7975
option (google.api.http) = {
8076
post: "/v3/{parent=projects/*/locations/*/agents/*/flows/*}/versions"
8177
body: "version"
@@ -127,8 +123,7 @@ service Versions {
127123
}
128124

129125
// Compares the specified base version with target version.
130-
rpc CompareVersions(CompareVersionsRequest)
131-
returns (CompareVersionsResponse) {
126+
rpc CompareVersions(CompareVersionsRequest) returns (CompareVersionsResponse) {
132127
option (google.api.http) = {
133128
post: "/v3/{base_version=projects/*/locations/*/agents/*/flows/*/versions/*}:compareVersions"
134129
body: "*"
@@ -141,11 +136,11 @@ service Versions {
141136
// [Versions.CreateVersion][google.cloud.dialogflow.cx.v3.Versions.CreateVersion].
142137
message CreateVersionOperationMetadata {
143138
// Name of the created version.
144-
// Format:
145-
// `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/versions/<VersionID>`.
139+
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
140+
// ID>/flows/<Flow ID>/versions/<Version ID>`.
146141
string version = 1 [(google.api.resource_reference) = {
147-
type: "dialogflow.googleapis.com/Version"
148-
}];
142+
type: "dialogflow.googleapis.com/Version"
143+
}];
149144
}
150145

151146
// Represents a version of a flow.
@@ -170,10 +165,9 @@ message Version {
170165
FAILED = 3;
171166
}
172167

173-
// Format:
174-
// `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/versions/<VersionID>`.
175-
// Version ID is a self-increasing number generated by Dialogflow upon version
176-
// creation.
168+
// Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
169+
// ID>/flows/<Flow ID>/versions/<Version ID>. Version ID is a self-increasing
170+
// number generated by Dialogflow upon version creation.
177171
string name = 1;
178172

179173
// Required. The human-readable name of the version. Limit of 64 characters.
@@ -187,20 +181,18 @@ message Version {
187181
NluSettings nlu_settings = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
188182

189183
// Output only. Create time of the version.
190-
google.protobuf.Timestamp create_time = 5
191-
[(google.api.field_behavior) = OUTPUT_ONLY];
184+
google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
192185

193-
// Output only. The state of this version. This field is read-only and cannot
194-
// be set by create and update methods.
186+
// Output only. The state of this version. This field is read-only and cannot be set by
187+
// create and update methods.
195188
State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
196189
}
197190

198-
// The request message for
199-
// [Versions.ListVersions][google.cloud.dialogflow.cx.v3.Versions.ListVersions].
191+
// The request message for [Versions.ListVersions][google.cloud.dialogflow.cx.v3.Versions.ListVersions].
200192
message ListVersionsRequest {
201-
// Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to list all
202-
// versions for. Format:
203-
// `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.
193+
// Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to list all versions for.
194+
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
195+
// ID>/flows/<Flow ID>`.
204196
string parent = 1 [
205197
(google.api.field_behavior) = REQUIRED,
206198
(google.api.resource_reference) = {
@@ -216,8 +208,7 @@ message ListVersionsRequest {
216208
string page_token = 3;
217209
}
218210

219-
// The response message for
220-
// [Versions.ListVersions][google.cloud.dialogflow.cx.v3.Versions.ListVersions].
211+
// The response message for [Versions.ListVersions][google.cloud.dialogflow.cx.v3.Versions.ListVersions].
221212
message ListVersionsResponse {
222213
// A list of versions. There will be a maximum number of items returned based
223214
// on the page_size field in the request. The list may in some cases be empty
@@ -229,12 +220,11 @@ message ListVersionsResponse {
229220
string next_page_token = 2;
230221
}
231222

232-
// The request message for
233-
// [Versions.GetVersion][google.cloud.dialogflow.cx.v3.Versions.GetVersion].
223+
// The request message for [Versions.GetVersion][google.cloud.dialogflow.cx.v3.Versions.GetVersion].
234224
message GetVersionRequest {
235225
// Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version].
236-
// Format:
237-
// `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/versions/<VersionID>`.
226+
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
227+
// ID>/flows/<Flow ID>/versions/<Version ID>`.
238228
string name = 1 [
239229
(google.api.field_behavior) = REQUIRED,
240230
(google.api.resource_reference) = {
@@ -243,12 +233,11 @@ message GetVersionRequest {
243233
];
244234
}
245235

246-
// The request message for
247-
// [Versions.CreateVersion][google.cloud.dialogflow.cx.v3.Versions.CreateVersion].
236+
// The request message for [Versions.CreateVersion][google.cloud.dialogflow.cx.v3.Versions.CreateVersion].
248237
message CreateVersionRequest {
249-
// Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to create an
250-
// [Version][google.cloud.dialogflow.cx.v3.Version] for. Format:
251-
// `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.
238+
// Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to create an [Version][google.cloud.dialogflow.cx.v3.Version] for.
239+
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
240+
// ID>/flows/<Flow ID>`.
252241
string parent = 1 [
253242
(google.api.field_behavior) = REQUIRED,
254243
(google.api.resource_reference) = {
@@ -260,24 +249,21 @@ message CreateVersionRequest {
260249
Version version = 2 [(google.api.field_behavior) = REQUIRED];
261250
}
262251

263-
// The request message for
264-
// [Versions.UpdateVersion][google.cloud.dialogflow.cx.v3.Versions.UpdateVersion].
252+
// The request message for [Versions.UpdateVersion][google.cloud.dialogflow.cx.v3.Versions.UpdateVersion].
265253
message UpdateVersionRequest {
266254
// Required. The version to update.
267255
Version version = 1 [(google.api.field_behavior) = REQUIRED];
268256

269-
// Required. The mask to control which fields get updated. Currently only
270-
// `description` and `display_name` can be updated.
271-
google.protobuf.FieldMask update_mask = 2
272-
[(google.api.field_behavior) = REQUIRED];
257+
// Required. The mask to control which fields get updated. Currently only `description`
258+
// and `display_name` can be updated.
259+
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
273260
}
274261

275-
// The request message for
276-
// [Versions.DeleteVersion][google.cloud.dialogflow.cx.v3.Versions.DeleteVersion].
262+
// The request message for [Versions.DeleteVersion][google.cloud.dialogflow.cx.v3.Versions.DeleteVersion].
277263
message DeleteVersionRequest {
278-
// Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version]
279-
// to delete. Format:
280-
// `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/versions/<VersionID>`.
264+
// Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version] to delete.
265+
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
266+
// ID>/flows/<Flow ID>/versions/<Version ID>`.
281267
string name = 1 [
282268
(google.api.field_behavior) = REQUIRED,
283269
(google.api.resource_reference) = {
@@ -286,12 +272,11 @@ message DeleteVersionRequest {
286272
];
287273
}
288274

289-
// The request message for
290-
// [Versions.LoadVersion][google.cloud.dialogflow.cx.v3.Versions.LoadVersion].
275+
// The request message for [Versions.LoadVersion][google.cloud.dialogflow.cx.v3.Versions.LoadVersion].
291276
message LoadVersionRequest {
292-
// Required. The [Version][google.cloud.dialogflow.cx.v3.Version] to be loaded
293-
// to draft flow. Format:
294-
// `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/versions/<VersionID>`.
277+
// Required. The [Version][google.cloud.dialogflow.cx.v3.Version] to be loaded to draft flow.
278+
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
279+
// ID>/flows/<Flow ID>/versions/<Version ID>`.
295280
string name = 1 [
296281
(google.api.field_behavior) = REQUIRED,
297282
(google.api.resource_reference) = {
@@ -306,14 +291,13 @@ message LoadVersionRequest {
306291
bool allow_override_agent_resources = 2;
307292
}
308293

309-
// The request message for
310-
// [Versions.CompareVersions][google.cloud.dialogflow.cx.v3.Versions.CompareVersions].
294+
// The request message for [Versions.CompareVersions][google.cloud.dialogflow.cx.v3.Versions.CompareVersions].
311295
message CompareVersionsRequest {
312-
// Required. Name of the base flow version to compare with the target version.
313-
// Use version ID `0` to indicate the draft version of the specified flow.
296+
// Required. Name of the base flow version to compare with the target version. Use
297+
// version ID `0` to indicate the draft version of the specified flow.
314298
//
315-
// Format:
316-
// `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/versions/<VersionID>`.
299+
// Format: `projects/<Project ID>/locations/<Location ID>/agents/
300+
// <Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
317301
string base_version = 1 [
318302
(google.api.field_behavior) = REQUIRED,
319303
(google.api.resource_reference) = {
@@ -323,8 +307,8 @@ message CompareVersionsRequest {
323307

324308
// Required. Name of the target flow version to compare with the
325309
// base version. Use version ID `0` to indicate the draft version of the
326-
// specified flow. Format:
327-
// `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/versions/<VersionID>`.
310+
// specified flow. Format: `projects/<Project ID>/locations/<Location
311+
// ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
328312
string target_version = 2 [
329313
(google.api.field_behavior) = REQUIRED,
330314
(google.api.resource_reference) = {
@@ -342,8 +326,7 @@ message CompareVersionsRequest {
342326
string language_code = 3;
343327
}
344328

345-
// The response message for
346-
// [Versions.CompareVersions][google.cloud.dialogflow.cx.v3.Versions.CompareVersions].
329+
// The response message for [Versions.CompareVersions][google.cloud.dialogflow.cx.v3.Versions.CompareVersions].
347330
message CompareVersionsResponse {
348331
// JSON representation of the base version content.
349332
string base_version_content_json = 1;

0 commit comments

Comments
 (0)