Skip to content

Commit 4a4ec6d

Browse files
Google APIscopybara-github
authored andcommitted
feat: allow setting custom CA for generic webhooks and release CompareVersions API
docs: clarify DLP template reader usage PiperOrigin-RevId: 410299375
1 parent dfa9d62 commit 4a4ec6d

4 files changed

Lines changed: 265 additions & 131 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,6 +31,31 @@ 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+
3459
// Audio encoding of the audio content sent in the conversational query request.
3560
// Refer to the
3661
// [Cloud Speech API
@@ -80,31 +105,6 @@ enum AudioEncoding {
80105
AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7;
81106
}
82107

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/security_settings.proto

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,11 @@ message SecuritySettings {
245245
// [DLP](https://cloud.google.com/dlp/docs) inspect template name. Use this
246246
// template to define inspect base settings.
247247
//
248+
// The `DLP Inspect Templates Reader` role is needed on the Dialogflow
249+
// service identity service account (has the form
250+
251+
// for your agent's project.
252+
//
248253
// If empty, we use the default DLP inspect config.
249254
//
250255
// The template name will have one of the following formats:
@@ -261,6 +266,11 @@ message SecuritySettings {
261266
// [DLP](https://cloud.google.com/dlp/docs) deidentify template name. Use this
262267
// template to define de-identification configuration for the content.
263268
//
269+
// The `DLP De-identify Templates Reader` role is needed on the Dialogflow
270+
// service identity service account (has the form
271+
272+
// for your agent's project.
273+
//
264274
// If empty, Dialogflow replaces sensitive info with `[redacted]` text.
265275
//
266276
// The template name will have one of the following formats:
@@ -281,7 +291,7 @@ message SecuritySettings {
281291
// Retains data in interaction logging for the specified number of days.
282292
// This does not apply to Cloud logging, which is owned by the user - not
283293
// Dialogflow.
284-
// User must Set a value lower than Dialogflow's default 30d TTL. Setting a
294+
// User must set a value lower than Dialogflow's default 365d TTL. Setting a
285295
// value higher than that has no effect.
286296
// A missing value or setting to 0 also means we use Dialogflow's default
287297
// TTL.

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

Lines changed: 111 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ 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 [Flow][google.cloud.dialogflow.cx.v3.Flow].
50+
// Returns the list of all versions in the specified
51+
// [Flow][google.cloud.dialogflow.cx.v3.Flow].
5152
rpc ListVersions(ListVersionsRequest) returns (ListVersionsResponse) {
5253
option (google.api.http) = {
5354
get: "/v3/{parent=projects/*/locations/*/agents/*/flows/*}/versions"
@@ -63,15 +64,18 @@ service Versions {
6364
option (google.api.method_signature) = "name";
6465
}
6566

66-
// Creates a [Version][google.cloud.dialogflow.cx.v3.Version] in the specified [Flow][google.cloud.dialogflow.cx.v3.Flow].
67+
// Creates a [Version][google.cloud.dialogflow.cx.v3.Version] in the specified
68+
// [Flow][google.cloud.dialogflow.cx.v3.Flow].
6769
//
6870
// This method is a [long-running
6971
// operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
7072
// The returned `Operation` type has the following method-specific fields:
7173
//
72-
// - `metadata`: [CreateVersionOperationMetadata][google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata]
74+
// - `metadata`:
75+
// [CreateVersionOperationMetadata][google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata]
7376
// - `response`: [Version][google.cloud.dialogflow.cx.v3.Version]
74-
rpc CreateVersion(CreateVersionRequest) returns (google.longrunning.Operation) {
77+
rpc CreateVersion(CreateVersionRequest)
78+
returns (google.longrunning.Operation) {
7579
option (google.api.http) = {
7680
post: "/v3/{parent=projects/*/locations/*/agents/*/flows/*}/versions"
7781
body: "version"
@@ -121,17 +125,27 @@ service Versions {
121125
metadata_type: "google.protobuf.Struct"
122126
};
123127
}
128+
129+
// Compares the specified base version with target version.
130+
rpc CompareVersions(CompareVersionsRequest)
131+
returns (CompareVersionsResponse) {
132+
option (google.api.http) = {
133+
post: "/v3/{base_version=projects/*/locations/*/agents/*/flows/*/versions/*}:compareVersions"
134+
body: "*"
135+
};
136+
option (google.api.method_signature) = "base_version";
137+
}
124138
}
125139

126140
// Metadata associated with the long running operation for
127141
// [Versions.CreateVersion][google.cloud.dialogflow.cx.v3.Versions.CreateVersion].
128142
message CreateVersionOperationMetadata {
129143
// Name of the created version.
130-
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
131-
// ID>/flows/<Flow ID>/versions/<Version ID>`.
144+
// Format:
145+
// `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/versions/<VersionID>`.
132146
string version = 1 [(google.api.resource_reference) = {
133-
type: "dialogflow.googleapis.com/Version"
134-
}];
147+
type: "dialogflow.googleapis.com/Version"
148+
}];
135149
}
136150

137151
// Represents a version of a flow.
@@ -156,9 +170,10 @@ message Version {
156170
FAILED = 3;
157171
}
158172

159-
// Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
160-
// ID>/flows/<Flow ID>/versions/<Version ID>. Version ID is a self-increasing
161-
// number generated by Dialogflow upon version creation.
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.
162177
string name = 1;
163178

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

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

177-
// Output only. The state of this version. This field is read-only and cannot be set by
178-
// create and update methods.
193+
// Output only. The state of this version. This field is read-only and cannot
194+
// be set by create and update methods.
179195
State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
180196
}
181197

182-
// The request message for [Versions.ListVersions][google.cloud.dialogflow.cx.v3.Versions.ListVersions].
198+
// The request message for
199+
// [Versions.ListVersions][google.cloud.dialogflow.cx.v3.Versions.ListVersions].
183200
message ListVersionsRequest {
184-
// Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to list all versions for.
185-
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
186-
// ID>/flows/<Flow ID>`.
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>`.
187204
string parent = 1 [
188205
(google.api.field_behavior) = REQUIRED,
189206
(google.api.resource_reference) = {
@@ -199,7 +216,8 @@ message ListVersionsRequest {
199216
string page_token = 3;
200217
}
201218

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

214-
// The request message for [Versions.GetVersion][google.cloud.dialogflow.cx.v3.Versions.GetVersion].
232+
// The request message for
233+
// [Versions.GetVersion][google.cloud.dialogflow.cx.v3.Versions.GetVersion].
215234
message GetVersionRequest {
216235
// Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version].
217-
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
218-
// ID>/flows/<Flow ID>/versions/<Version ID>`.
236+
// Format:
237+
// `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/versions/<VersionID>`.
219238
string name = 1 [
220239
(google.api.field_behavior) = REQUIRED,
221240
(google.api.resource_reference) = {
@@ -224,11 +243,12 @@ message GetVersionRequest {
224243
];
225244
}
226245

227-
// The request message for [Versions.CreateVersion][google.cloud.dialogflow.cx.v3.Versions.CreateVersion].
246+
// The request message for
247+
// [Versions.CreateVersion][google.cloud.dialogflow.cx.v3.Versions.CreateVersion].
228248
message CreateVersionRequest {
229-
// Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to create an [Version][google.cloud.dialogflow.cx.v3.Version] for.
230-
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
231-
// ID>/flows/<Flow ID>`.
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>`.
232252
string parent = 1 [
233253
(google.api.field_behavior) = REQUIRED,
234254
(google.api.resource_reference) = {
@@ -240,21 +260,24 @@ message CreateVersionRequest {
240260
Version version = 2 [(google.api.field_behavior) = REQUIRED];
241261
}
242262

243-
// The request message for [Versions.UpdateVersion][google.cloud.dialogflow.cx.v3.Versions.UpdateVersion].
263+
// The request message for
264+
// [Versions.UpdateVersion][google.cloud.dialogflow.cx.v3.Versions.UpdateVersion].
244265
message UpdateVersionRequest {
245266
// Required. The version to update.
246267
Version version = 1 [(google.api.field_behavior) = REQUIRED];
247268

248-
// Required. The mask to control which fields get updated. Currently only `description`
249-
// and `display_name` can be updated.
250-
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
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];
251273
}
252274

253-
// The request message for [Versions.DeleteVersion][google.cloud.dialogflow.cx.v3.Versions.DeleteVersion].
275+
// The request message for
276+
// [Versions.DeleteVersion][google.cloud.dialogflow.cx.v3.Versions.DeleteVersion].
254277
message DeleteVersionRequest {
255-
// Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version] to delete.
256-
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
257-
// ID>/flows/<Flow ID>/versions/<Version ID>`.
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>`.
258281
string name = 1 [
259282
(google.api.field_behavior) = REQUIRED,
260283
(google.api.resource_reference) = {
@@ -263,11 +286,12 @@ message DeleteVersionRequest {
263286
];
264287
}
265288

266-
// The request message for [Versions.LoadVersion][google.cloud.dialogflow.cx.v3.Versions.LoadVersion].
289+
// The request message for
290+
// [Versions.LoadVersion][google.cloud.dialogflow.cx.v3.Versions.LoadVersion].
267291
message LoadVersionRequest {
268-
// Required. The [Version][google.cloud.dialogflow.cx.v3.Version] to be loaded to draft flow.
269-
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
270-
// ID>/flows/<Flow ID>/versions/<Version ID>`.
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>`.
271295
string name = 1 [
272296
(google.api.field_behavior) = REQUIRED,
273297
(google.api.resource_reference) = {
@@ -281,3 +305,52 @@ message LoadVersionRequest {
281305
// will not be overridden (i.e. intents, entities, webhooks).
282306
bool allow_override_agent_resources = 2;
283307
}
308+
309+
// The request message for
310+
// [Versions.CompareVersions][google.cloud.dialogflow.cx.v3.Versions.CompareVersions].
311+
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.
314+
//
315+
// Format:
316+
// `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/versions/<VersionID>`.
317+
string base_version = 1 [
318+
(google.api.field_behavior) = REQUIRED,
319+
(google.api.resource_reference) = {
320+
type: "dialogflow.googleapis.com/Version"
321+
}
322+
];
323+
324+
// Required. Name of the target flow version to compare with the
325+
// 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>`.
328+
string target_version = 2 [
329+
(google.api.field_behavior) = REQUIRED,
330+
(google.api.resource_reference) = {
331+
type: "dialogflow.googleapis.com/Version"
332+
}
333+
];
334+
335+
// The language to compare the flow versions for.
336+
//
337+
// If not specified, the agent's default language is used.
338+
// [Many
339+
// languages](https://cloud.google.com/dialogflow/docs/reference/language) are
340+
// supported. Note: languages must be enabled in the agent before they can be
341+
// used.
342+
string language_code = 3;
343+
}
344+
345+
// The response message for
346+
// [Versions.CompareVersions][google.cloud.dialogflow.cx.v3.Versions.CompareVersions].
347+
message CompareVersionsResponse {
348+
// JSON representation of the base version content.
349+
string base_version_content_json = 1;
350+
351+
// JSON representation of the target version content.
352+
string target_version_content_json = 2;
353+
354+
// The timestamp when the two version compares.
355+
google.protobuf.Timestamp compare_time = 3;
356+
}

0 commit comments

Comments
 (0)