File tree

8 files changed

+133
-28
lines changed

8 files changed

+133
-28
lines changed
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ proto_library(
3232
"flow.proto",
3333
"fulfillment.proto",
3434
"gcs.proto",
35+
"import_strategy.proto",
3536
"intent.proto",
3637
"page.proto",
3738
"response_message.proto",
@@ -245,16 +246,15 @@ py_gapic_library(
245246
],
246247
)
247248

248-
# Uncomment once https://.com/googleapis/gapic-generator-python/issues/1376 is fixed
249-
# py_test(
250-
# name = "cx_py_gapic_test",
251-
# srcs = [
252-
# "cx_py_gapic_pytest.py",
253-
# "cx_py_gapic_test.py",
254-
# ],
255-
# legacy_create_init = False,
256-
# deps = [":cx_py_gapic"],
257-
# )
249+
py_test(
250+
name = "cx_py_gapic_test",
251+
srcs = [
252+
"cx_py_gapic_pytest.py",
253+
"cx_py_gapic_test.py",
254+
],
255+
legacy_create_init = False,
256+
deps = [":cx_py_gapic"],
257+
)
258258

259259
# Open Source Packages
260260
py_gapic_assembly_pkg(
@@ -399,7 +399,6 @@ load(
399399

400400
csharp_proto_library(
401401
name = "cx_csharp_proto",
402-
extra_opts = [""],
403402
deps = [":cx_proto"],
404403
)
405404

Original file line numberDiff line numberDiff line change
@@ -180,8 +180,9 @@ message SpeechToTextSettings {
180180
// Types][google.cloud.dialogflow.cx.v3beta1.EntityType],
181181
// [Flows][google.cloud.dialogflow.cx.v3beta1.Flow],
182182
// [Fulfillments][google.cloud.dialogflow.cx.v3beta1.Fulfillment],
183-
// [Webhooks][google.cloud.dialogflow.cx.v3beta1.Webhook], and so on to manage
184-
// the conversation flows..
183+
// [Webhooks][google.cloud.dialogflow.cx.v3beta1.Webhook],
184+
// [TransitionRouteGroups][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]
185+
// and so on to manage the conversation flows.
185186
message Agent {
186187
option (google.api.resource) = {
187188
type: "dialogflow.googleapis.com/Agent"
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ 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/cx/v3beta1/import_strategy.proto";
2324
import "google/cloud/dialogflow/cx/v3beta1/page.proto";
2425
import "google/cloud/dialogflow/cx/v3beta1/validation_message.proto";
2526
import "google/longrunning/operations.proto";
@@ -308,7 +309,10 @@ message Flow {
308309
// defined in the page have higher priority than those defined in the flow.
309310
//
310311
// Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
311-
// ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
312+
// ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
313+
// or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
314+
// ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
315+
// groups.
312316
repeated string transition_route_groups = 15
313317
[(google.api.resource_reference) = {
314318
type: "dialogflow.googleapis.com/TransitionRouteGroup"
@@ -582,6 +586,24 @@ message ImportFlowRequest {
582586

583587
// Flow import mode. If not specified, `KEEP` is assumed.
584588
ImportOption import_option = 4;
589+
590+
// Optional. Specifies the import strategy used when resolving resource
591+
// conflicts.
592+
FlowImportStrategy flow_import_strategy = 5
593+
[(google.api.field_behavior) = OPTIONAL];
594+
}
595+
596+
// The flow import strategy used for resource conflict resolution associated
597+
// with an
598+
// [ImportFlowRequest][google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest].
599+
message FlowImportStrategy {
600+
// Optional. Global flow import strategy for resource conflict resolution. The
601+
// import Import strategy for resource conflict resolution, applied globally
602+
// throughout the flow. It will be applied for all
603+
// display name conflicts in the imported content. If not specified,
604+
// 'CREATE_NEW' is assumed.
605+
ImportStrategy global_import_strategy = 1
606+
[(google.api.field_behavior) = OPTIONAL];
585607
}
586608

587609
// The response message for
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// Copyright 2023 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.cloud.dialogflow.cx.v3beta1;
18+
19+
option cc_enable_arenas = true;
20+
option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1";
21+
option go_package = "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb;cxpb";
22+
option java_multiple_files = true;
23+
option java_outer_classname = "ImportStrategyProto";
24+
option java_package = "com.google.cloud.dialogflow.cx.v3beta1";
25+
option objc_class_prefix = "DF";
26+
27+
// Import strategies for the conflict resolution of resources (i.e. intents,
28+
// entities, and webhooks) with identical display names during import
29+
// operations.
30+
enum ImportStrategy {
31+
// Unspecified. Treated as 'CREATE_NEW'.
32+
IMPORT_STRATEGY_UNSPECIFIED = 0;
33+
34+
// Create a new resource with a numeric suffix appended to the end of the
35+
// existing display name.
36+
IMPORT_STRATEGY_CREATE_NEW = 1;
37+
38+
// Replace existing resource with incoming resource in the content to be
39+
// imported.
40+
IMPORT_STRATEGY_REPLACE = 2;
41+
42+
// Keep existing resource and discard incoming resource in the content to be
43+
// imported.
44+
IMPORT_STRATEGY_KEEP = 3;
45+
46+
// Combine existing and incoming resources when a conflict is encountered.
47+
IMPORT_STRATEGY_MERGE = 4;
48+
49+
// Throw error if a conflict is encountered.
50+
IMPORT_STRATEGY_THROW_ERROR = 5;
51+
}
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,10 @@ message Page {
139139
// intent, then the first group in the ordered list takes precedence.
140140
//
141141
// Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
142-
// ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
142+
// ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
143+
// or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
144+
// ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
145+
// groups.
143146
repeated string transition_route_groups = 11
144147
[(google.api.resource_reference) = {
145148
type: "dialogflow.googleapis.com/TransitionRouteGroup"
Original file line numberDiff line numberDiff line change
@@ -609,15 +609,15 @@ message QueryParameters {
609609

610610
// Represents the query input. It can contain one of:
611611
//
612-
// 1. A conversational query in the form of text.
612+
// 1. A conversational query in the form of text.
613613
//
614-
// 2. An intent query that specifies which intent to trigger.
614+
// 2. An intent query that specifies which intent to trigger.
615615
//
616-
// 3. Natural language speech audio to be processed.
616+
// 3. Natural language speech audio to be processed.
617617
//
618-
// 4. An event to be triggered.
618+
// 4. An event to be triggered.
619619
//
620-
// 5. DTMF digits to invoke an intent and fill in parameter value.
620+
// 5. DTMF digits to invoke an intent and fill in parameter value.
621621
message QueryInput {
622622
// Required. The input specification.
623623
oneof input {
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ service TransitionRouteGroups {
4646
returns (ListTransitionRouteGroupsResponse) {
4747
option (google.api.http) = {
4848
get: "/v3beta1/{parent=projects/*/locations/*/agents/*/flows/*}/transitionRouteGroups"
49+
additional_bindings {
50+
get: "/v3beta1/{parent=projects/*/locations/*/agents/*}/transitionRouteGroups"
51+
}
4952
};
5053
option (google.api.method_signature) = "parent";
5154
}
@@ -56,6 +59,9 @@ service TransitionRouteGroups {
5659
returns (TransitionRouteGroup) {
5760
option (google.api.http) = {
5861
get: "/v3beta1/{name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}"
62+
additional_bindings {
63+
get: "/v3beta1/{name=projects/*/locations/*/agents/*/transitionRouteGroups/*}"
64+
}
5965
};
6066
option (google.api.method_signature) = "name";
6167
}
@@ -72,6 +78,10 @@ service TransitionRouteGroups {
7278
option (google.api.http) = {
7379
post: "/v3beta1/{parent=projects/*/locations/*/agents/*/flows/*}/transitionRouteGroups"
7480
body: "transition_route_group"
81+
additional_bindings {
82+
post: "/v3beta1/{parent=projects/*/locations/*/agents/*}/transitionRouteGroups"
83+
body: "transition_route_group"
84+
}
7585
};
7686
option (google.api.method_signature) = "parent,transition_route_group";
7787
}
@@ -87,6 +97,10 @@ service TransitionRouteGroups {
8797
option (google.api.http) = {
8898
: "/v3beta1/{transition_route_group.name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}"
8999
body: "transition_route_group"
100+
additional_bindings {
101+
: "/v3beta1/{transition_route_group.name=projects/*/locations/*/agents/*/transitionRouteGroups/*}"
102+
body: "transition_route_group"
103+
}
90104
};
91105
option (google.api.method_signature) = "transition_route_group,update_mask";
92106
}
@@ -101,25 +115,34 @@ service TransitionRouteGroups {
101115
returns (google.protobuf.Empty) {
102116
option (google.api.http) = {
103117
delete: "/v3beta1/{name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}"
118+
additional_bindings {
119+
delete: "/v3beta1/{name=projects/*/locations/*/agents/*/transitionRouteGroups/*}"
120+
}
104121
};
105122
option (google.api.method_signature) = "name";
106123
}
107124
}
108125

109-
// An TransitionRouteGroup represents a group of
126+
// A TransitionRouteGroup represents a group of
110127
// [`TransitionRoutes`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute] to
111128
// be used by a [Page][google.cloud.dialogflow.cx.v3beta1.Page].
112129
message TransitionRouteGroup {
113130
option (google.api.resource) = {
114131
type: "dialogflow.googleapis.com/TransitionRouteGroup"
115132
pattern: "projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}"
133+
pattern: "projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group}"
134+
plural: "transitionRouteGroups"
135+
singular: "transitionRouteGroup"
116136
};
117137

118138
// The unique identifier of the transition route group.
119139
// [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroups.CreateTransitionRouteGroup]
120140
// populates the name automatically. Format: `projects/<Project
121141
// ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow
122-
// ID>/transitionRouteGroups/<Transition Route Group ID>`.
142+
// ID>/transitionRouteGroups/<Transition Route Group ID>` or
143+
// `projects/<Project ID>/locations/<Location ID>/agents/<Agent
144+
// ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
145+
// groups.
123146
string name = 1;
124147

125148
// Required. The human-readable name of the transition route group, unique
@@ -136,7 +159,8 @@ message TransitionRouteGroup {
136159
message ListTransitionRouteGroupsRequest {
137160
// Required. The flow to list all transition route groups for.
138161
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
139-
// ID>/flows/<Flow ID>`.
162+
// ID>/flows/<Flow ID>`
163+
// or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.
140164
string parent = 1 [
141165
(google.api.field_behavior) = REQUIRED,
142166
(google.api.resource_reference) = {
@@ -186,7 +210,9 @@ message GetTransitionRouteGroupRequest {
186210
// Required. The name of the
187211
// [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup].
188212
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
189-
// ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`.
213+
// ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`
214+
// or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
215+
// ID>/transitionRouteGroups/<Transition Route Group ID>`.
190216
string name = 1 [
191217
(google.api.field_behavior) = REQUIRED,
192218
(google.api.resource_reference) = {
@@ -215,7 +241,9 @@ message CreateTransitionRouteGroupRequest {
215241
// Required. The flow to create an
216242
// [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]
217243
// for. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
218-
// ID>/flows/<Flow ID>`.
244+
// ID>/flows/<Flow ID>`
245+
// or `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`
246+
// for agent-level groups.
219247
string parent = 1 [
220248
(google.api.field_behavior) = REQUIRED,
221249
(google.api.resource_reference) = {
@@ -272,7 +300,8 @@ message DeleteTransitionRouteGroupRequest {
272300
// [TransitionRouteGroup][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]
273301
// to delete. Format: `projects/<Project ID>/locations/<Location
274302
// ID>/agents/<Agent ID>/flows/<Flow ID>/transitionRouteGroups/<Transition
275-
// Route Group ID>`.
303+
// Route Group ID>` or `projects/<Project ID>/locations/<Location
304+
// ID>/agents/<Agent ID>/transitionRouteGroups/<Transition Route Group ID>`.
276305
string name = 1 [
277306
(google.api.field_behavior) = REQUIRED,
278307
(google.api.resource_reference) = {
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ message Webhook {
182182

183183
// Optional. Maps the values extracted from specific fields of the flexible
184184
// webhook response into session parameters.
185-
// - Key: session parameter name
186-
// - Value: field path in the webhook response
185+
// - Key: session parameter name
186+
// - Value: field path in the webhook response
187187
map<string, string> parameter_mapping = 9
188188
[(google.api.field_behavior) = OPTIONAL];
189189
}

0 commit comments

Comments
 (0)