google-cloud-dialogflow-cx-v3 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +169 -0
  4. data/LICENSE.md +201 -0
  5. data/README.md +139 -0
  6. data/lib/google/cloud/dialogflow/cx/v3/advanced_settings_pb.rb +32 -0
  7. data/lib/google/cloud/dialogflow/cx/v3/agent_pb.rb +122 -0
  8. data/lib/google/cloud/dialogflow/cx/v3/agent_services_pb.rb +82 -0
  9. data/lib/google/cloud/dialogflow/cx/v3/agents/client.rb +1051 -0
  10. data/lib/google/cloud/dialogflow/cx/v3/agents/credentials.rb +54 -0
  11. data/lib/google/cloud/dialogflow/cx/v3/agents/operations.rb +666 -0
  12. data/lib/google/cloud/dialogflow/cx/v3/agents/paths.rb +151 -0
  13. data/lib/google/cloud/dialogflow/cx/v3/agents.rb +52 -0
  14. data/lib/google/cloud/dialogflow/cx/v3/audio_config_pb.rb +94 -0
  15. data/lib/google/cloud/dialogflow/cx/v3/entity_type_pb.rb +92 -0
  16. data/lib/google/cloud/dialogflow/cx/v3/entity_type_services_pb.rb +67 -0
  17. data/lib/google/cloud/dialogflow/cx/v3/entity_types/client.rb +766 -0
  18. data/lib/google/cloud/dialogflow/cx/v3/entity_types/credentials.rb +54 -0
  19. data/lib/google/cloud/dialogflow/cx/v3/entity_types/paths.rb +75 -0
  20. data/lib/google/cloud/dialogflow/cx/v3/entity_types.rb +51 -0
  21. data/lib/google/cloud/dialogflow/cx/v3/environment_pb.rb +117 -0
  22. data/lib/google/cloud/dialogflow/cx/v3/environment_services_pb.rb +61 -0
  23. data/lib/google/cloud/dialogflow/cx/v3/environments/client.rb +950 -0
  24. data/lib/google/cloud/dialogflow/cx/v3/environments/credentials.rb +54 -0
  25. data/lib/google/cloud/dialogflow/cx/v3/environments/operations.rb +666 -0
  26. data/lib/google/cloud/dialogflow/cx/v3/environments/paths.rb +98 -0
  27. data/lib/google/cloud/dialogflow/cx/v3/environments.rb +52 -0
  28. data/lib/google/cloud/dialogflow/cx/v3/experiment_pb.rb +177 -0
  29. data/lib/google/cloud/dialogflow/cx/v3/experiment_services_pb.rb +61 -0
  30. data/lib/google/cloud/dialogflow/cx/v3/experiments/client.rb +851 -0
  31. data/lib/google/cloud/dialogflow/cx/v3/experiments/credentials.rb +54 -0
  32. data/lib/google/cloud/dialogflow/cx/v3/experiments/paths.rb +102 -0
  33. data/lib/google/cloud/dialogflow/cx/v3/experiments.rb +51 -0
  34. data/lib/google/cloud/dialogflow/cx/v3/flow_pb.rb +145 -0
  35. data/lib/google/cloud/dialogflow/cx/v3/flow_services_pb.rb +88 -0
  36. data/lib/google/cloud/dialogflow/cx/v3/flows/client.rb +1200 -0
  37. data/lib/google/cloud/dialogflow/cx/v3/flows/credentials.rb +54 -0
  38. data/lib/google/cloud/dialogflow/cx/v3/flows/operations.rb +666 -0
  39. data/lib/google/cloud/dialogflow/cx/v3/flows/paths.rb +184 -0
  40. data/lib/google/cloud/dialogflow/cx/v3/flows.rb +52 -0
  41. data/lib/google/cloud/dialogflow/cx/v3/fulfillment_pb.rb +55 -0
  42. data/lib/google/cloud/dialogflow/cx/v3/intent_pb.rb +97 -0
  43. data/lib/google/cloud/dialogflow/cx/v3/intent_services_pb.rb +67 -0
  44. data/lib/google/cloud/dialogflow/cx/v3/intents/client.rb +750 -0
  45. data/lib/google/cloud/dialogflow/cx/v3/intents/credentials.rb +54 -0
  46. data/lib/google/cloud/dialogflow/cx/v3/intents/paths.rb +96 -0
  47. data/lib/google/cloud/dialogflow/cx/v3/intents.rb +51 -0
  48. data/lib/google/cloud/dialogflow/cx/v3/page_pb.rb +113 -0
  49. data/lib/google/cloud/dialogflow/cx/v3/page_services_pb.rb +67 -0
  50. data/lib/google/cloud/dialogflow/cx/v3/pages/client.rb +805 -0
  51. data/lib/google/cloud/dialogflow/cx/v3/pages/credentials.rb +54 -0
  52. data/lib/google/cloud/dialogflow/cx/v3/pages/paths.rb +165 -0
  53. data/lib/google/cloud/dialogflow/cx/v3/pages.rb +51 -0
  54. data/lib/google/cloud/dialogflow/cx/v3/response_message_pb.rb +77 -0
  55. data/lib/google/cloud/dialogflow/cx/v3/security_settings_pb.rb +89 -0
  56. data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/client.rb +696 -0
  57. data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/credentials.rb +54 -0
  58. data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/paths.rb +157 -0
  59. data/lib/google/cloud/dialogflow/cx/v3/security_settings_service.rb +51 -0
  60. data/lib/google/cloud/dialogflow/cx/v3/security_settings_services_pb.rb +56 -0
  61. data/lib/google/cloud/dialogflow/cx/v3/session_entity_type_pb.rb +68 -0
  62. data/lib/google/cloud/dialogflow/cx/v3/session_entity_type_services_pb.rb +55 -0
  63. data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/client.rb +715 -0
  64. data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/credentials.rb +54 -0
  65. data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/paths.rb +137 -0
  66. data/lib/google/cloud/dialogflow/cx/v3/session_entity_types.rb +51 -0
  67. data/lib/google/cloud/dialogflow/cx/v3/session_pb.rb +209 -0
  68. data/lib/google/cloud/dialogflow/cx/v3/session_services_pb.rb +71 -0
  69. data/lib/google/cloud/dialogflow/cx/v3/sessions/client.rb +654 -0
  70. data/lib/google/cloud/dialogflow/cx/v3/sessions/credentials.rb +54 -0
  71. data/lib/google/cloud/dialogflow/cx/v3/sessions/paths.rb +225 -0
  72. data/lib/google/cloud/dialogflow/cx/v3/sessions.rb +53 -0
  73. data/lib/google/cloud/dialogflow/cx/v3/test_case_pb.rb +302 -0
  74. data/lib/google/cloud/dialogflow/cx/v3/test_case_services_pb.rb +73 -0
  75. data/lib/google/cloud/dialogflow/cx/v3/test_cases/client.rb +1324 -0
  76. data/lib/google/cloud/dialogflow/cx/v3/test_cases/credentials.rb +54 -0
  77. data/lib/google/cloud/dialogflow/cx/v3/test_cases/operations.rb +666 -0
  78. data/lib/google/cloud/dialogflow/cx/v3/test_cases/paths.rb +249 -0
  79. data/lib/google/cloud/dialogflow/cx/v3/test_cases.rb +53 -0
  80. data/lib/google/cloud/dialogflow/cx/v3/transition_route_group_pb.rb +67 -0
  81. data/lib/google/cloud/dialogflow/cx/v3/transition_route_group_services_pb.rb +67 -0
  82. data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/client.rb +766 -0
  83. data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/credentials.rb +54 -0
  84. data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/paths.rb +144 -0
  85. data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups.rb +51 -0
  86. data/lib/google/cloud/dialogflow/cx/v3/validation_message_pb.rb +59 -0
  87. data/lib/google/cloud/dialogflow/cx/v3/version.rb +30 -0
  88. data/lib/google/cloud/dialogflow/cx/v3/version_pb.rb +88 -0
  89. data/lib/google/cloud/dialogflow/cx/v3/version_services_pb.rb +57 -0
  90. data/lib/google/cloud/dialogflow/cx/v3/versions/client.rb +792 -0
  91. data/lib/google/cloud/dialogflow/cx/v3/versions/credentials.rb +54 -0
  92. data/lib/google/cloud/dialogflow/cx/v3/versions/operations.rb +666 -0
  93. data/lib/google/cloud/dialogflow/cx/v3/versions/paths.rb +79 -0
  94. data/lib/google/cloud/dialogflow/cx/v3/versions.rb +52 -0
  95. data/lib/google/cloud/dialogflow/cx/v3/webhook_pb.rb +172 -0
  96. data/lib/google/cloud/dialogflow/cx/v3/webhook_services_pb.rb +55 -0
  97. data/lib/google/cloud/dialogflow/cx/v3/webhooks/client.rb +704 -0
  98. data/lib/google/cloud/dialogflow/cx/v3/webhooks/credentials.rb +54 -0
  99. data/lib/google/cloud/dialogflow/cx/v3/webhooks/paths.rb +96 -0
  100. data/lib/google/cloud/dialogflow/cx/v3/webhooks.rb +51 -0
  101. data/lib/google/cloud/dialogflow/cx/v3.rb +53 -0
  102. data/lib/google-cloud-dialogflow-cx-v3.rb +21 -0
  103. data/proto_docs/README.md +4 -0
  104. data/proto_docs/google/api/field_behavior.rb +71 -0
  105. data/proto_docs/google/api/resource.rb +283 -0
  106. data/proto_docs/google/cloud/dialogflow/cx/v3/advanced_settings.rb +57 -0
  107. data/proto_docs/google/cloud/dialogflow/cx/v3/agent.rb +301 -0
  108. data/proto_docs/google/cloud/dialogflow/cx/v3/audio_config.rb +322 -0
  109. data/proto_docs/google/cloud/dialogflow/cx/v3/entity_type.rb +306 -0
  110. data/proto_docs/google/cloud/dialogflow/cx/v3/environment.rb +279 -0
  111. data/proto_docs/google/cloud/dialogflow/cx/v3/experiment.rb +438 -0
  112. data/proto_docs/google/cloud/dialogflow/cx/v3/flow.rb +438 -0
  113. data/proto_docs/google/cloud/dialogflow/cx/v3/fulfillment.rb +126 -0
  114. data/proto_docs/google/cloud/dialogflow/cx/v3/intent.rb +318 -0
  115. data/proto_docs/google/cloud/dialogflow/cx/v3/page.rb +478 -0
  116. data/proto_docs/google/cloud/dialogflow/cx/v3/response_message.rb +220 -0
  117. data/proto_docs/google/cloud/dialogflow/cx/v3/security_settings.rb +222 -0
  118. data/proto_docs/google/cloud/dialogflow/cx/v3/session.rb +798 -0
  119. data/proto_docs/google/cloud/dialogflow/cx/v3/session_entity_type.rb +184 -0
  120. data/proto_docs/google/cloud/dialogflow/cx/v3/test_case.rb +757 -0
  121. data/proto_docs/google/cloud/dialogflow/cx/v3/transition_route_group.rb +195 -0
  122. data/proto_docs/google/cloud/dialogflow/cx/v3/validation_message.rb +121 -0
  123. data/proto_docs/google/cloud/dialogflow/cx/v3/version.rb +182 -0
  124. data/proto_docs/google/cloud/dialogflow/cx/v3/webhook.rb +496 -0
  125. data/proto_docs/google/longrunning/operations.rb +164 -0
  126. data/proto_docs/google/protobuf/any.rb +141 -0
  127. data/proto_docs/google/protobuf/duration.rb +98 -0
  128. data/proto_docs/google/protobuf/empty.rb +36 -0
  129. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  130. data/proto_docs/google/protobuf/struct.rb +96 -0
  131. data/proto_docs/google/protobuf/timestamp.rb +129 -0
  132. data/proto_docs/google/rpc/status.rb +46 -0
  133. data/proto_docs/google/type/latlng.rb +38 -0
  134. metadata +326 -0
@@ -0,0 +1,249 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Dialogflow
23
+ module CX
24
+ module V3
25
+ module TestCases
26
+ # Path helper methods for the TestCases API.
27
+ module Paths
28
+ ##
29
+ # Create a fully-qualified Agent resource string.
30
+ #
31
+ # The resource will be in the following format:
32
+ #
33
+ # `projects/{project}/locations/{location}/agents/{agent}`
34
+ #
35
+ # @param project [String]
36
+ # @param location [String]
37
+ # @param agent [String]
38
+ #
39
+ # @return [::String]
40
+ def agent_path project:, location:, agent:
41
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
42
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
43
+
44
+ "projects/#{project}/locations/#{location}/agents/#{agent}"
45
+ end
46
+
47
+ ##
48
+ # Create a fully-qualified EntityType resource string.
49
+ #
50
+ # The resource will be in the following format:
51
+ #
52
+ # `projects/{project}/locations/{location}/agents/{agent}/entityTypes/{entity_type}`
53
+ #
54
+ # @param project [String]
55
+ # @param location [String]
56
+ # @param agent [String]
57
+ # @param entity_type [String]
58
+ #
59
+ # @return [::String]
60
+ def entity_type_path project:, location:, agent:, entity_type:
61
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
62
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
63
+ raise ::ArgumentError, "agent cannot contain /" if agent.to_s.include? "/"
64
+
65
+ "projects/#{project}/locations/#{location}/agents/#{agent}/entityTypes/#{entity_type}"
66
+ end
67
+
68
+ ##
69
+ # Create a fully-qualified Environment resource string.
70
+ #
71
+ # The resource will be in the following format:
72
+ #
73
+ # `projects/{project}/locations/{location}/agents/{agent}/environments/{environment}`
74
+ #
75
+ # @param project [String]
76
+ # @param location [String]
77
+ # @param agent [String]
78
+ # @param environment [String]
79
+ #
80
+ # @return [::String]
81
+ def environment_path project:, location:, agent:, environment:
82
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
83
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
84
+ raise ::ArgumentError, "agent cannot contain /" if agent.to_s.include? "/"
85
+
86
+ "projects/#{project}/locations/#{location}/agents/#{agent}/environments/#{environment}"
87
+ end
88
+
89
+ ##
90
+ # Create a fully-qualified Flow resource string.
91
+ #
92
+ # The resource will be in the following format:
93
+ #
94
+ # `projects/{project}/locations/{location}/agents/{agent}/flows/{flow}`
95
+ #
96
+ # @param project [String]
97
+ # @param location [String]
98
+ # @param agent [String]
99
+ # @param flow [String]
100
+ #
101
+ # @return [::String]
102
+ def flow_path project:, location:, agent:, flow:
103
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
104
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
105
+ raise ::ArgumentError, "agent cannot contain /" if agent.to_s.include? "/"
106
+
107
+ "projects/#{project}/locations/#{location}/agents/#{agent}/flows/#{flow}"
108
+ end
109
+
110
+ ##
111
+ # Create a fully-qualified Intent resource string.
112
+ #
113
+ # The resource will be in the following format:
114
+ #
115
+ # `projects/{project}/locations/{location}/agents/{agent}/intents/{intent}`
116
+ #
117
+ # @param project [String]
118
+ # @param location [String]
119
+ # @param agent [String]
120
+ # @param intent [String]
121
+ #
122
+ # @return [::String]
123
+ def intent_path project:, location:, agent:, intent:
124
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
125
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
126
+ raise ::ArgumentError, "agent cannot contain /" if agent.to_s.include? "/"
127
+
128
+ "projects/#{project}/locations/#{location}/agents/#{agent}/intents/#{intent}"
129
+ end
130
+
131
+ ##
132
+ # Create a fully-qualified Page resource string.
133
+ #
134
+ # The resource will be in the following format:
135
+ #
136
+ # `projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}`
137
+ #
138
+ # @param project [String]
139
+ # @param location [String]
140
+ # @param agent [String]
141
+ # @param flow [String]
142
+ # @param page [String]
143
+ #
144
+ # @return [::String]
145
+ def page_path project:, location:, agent:, flow:, page:
146
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
147
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
148
+ raise ::ArgumentError, "agent cannot contain /" if agent.to_s.include? "/"
149
+ raise ::ArgumentError, "flow cannot contain /" if flow.to_s.include? "/"
150
+
151
+ "projects/#{project}/locations/#{location}/agents/#{agent}/flows/#{flow}/pages/#{page}"
152
+ end
153
+
154
+ ##
155
+ # Create a fully-qualified TestCase resource string.
156
+ #
157
+ # The resource will be in the following format:
158
+ #
159
+ # `projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}`
160
+ #
161
+ # @param project [String]
162
+ # @param location [String]
163
+ # @param agent [String]
164
+ # @param test_case [String]
165
+ #
166
+ # @return [::String]
167
+ def test_case_path project:, location:, agent:, test_case:
168
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
169
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
170
+ raise ::ArgumentError, "agent cannot contain /" if agent.to_s.include? "/"
171
+
172
+ "projects/#{project}/locations/#{location}/agents/#{agent}/testCases/#{test_case}"
173
+ end
174
+
175
+ ##
176
+ # Create a fully-qualified TestCaseResult resource string.
177
+ #
178
+ # The resource will be in the following format:
179
+ #
180
+ # `projects/{project}/locations/{location}/agents/{agent}/testCases/{test_case}/results/{result}`
181
+ #
182
+ # @param project [String]
183
+ # @param location [String]
184
+ # @param agent [String]
185
+ # @param test_case [String]
186
+ # @param result [String]
187
+ #
188
+ # @return [::String]
189
+ def test_case_result_path project:, location:, agent:, test_case:, result:
190
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
191
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
192
+ raise ::ArgumentError, "agent cannot contain /" if agent.to_s.include? "/"
193
+ raise ::ArgumentError, "test_case cannot contain /" if test_case.to_s.include? "/"
194
+
195
+ "projects/#{project}/locations/#{location}/agents/#{agent}/testCases/#{test_case}/results/#{result}"
196
+ end
197
+
198
+ ##
199
+ # Create a fully-qualified TransitionRouteGroup resource string.
200
+ #
201
+ # The resource will be in the following format:
202
+ #
203
+ # `projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}`
204
+ #
205
+ # @param project [String]
206
+ # @param location [String]
207
+ # @param agent [String]
208
+ # @param flow [String]
209
+ # @param transition_route_group [String]
210
+ #
211
+ # @return [::String]
212
+ def transition_route_group_path project:, location:, agent:, flow:, transition_route_group:
213
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
214
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
215
+ raise ::ArgumentError, "agent cannot contain /" if agent.to_s.include? "/"
216
+ raise ::ArgumentError, "flow cannot contain /" if flow.to_s.include? "/"
217
+
218
+ "projects/#{project}/locations/#{location}/agents/#{agent}/flows/#{flow}/transitionRouteGroups/#{transition_route_group}"
219
+ end
220
+
221
+ ##
222
+ # Create a fully-qualified Webhook resource string.
223
+ #
224
+ # The resource will be in the following format:
225
+ #
226
+ # `projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook}`
227
+ #
228
+ # @param project [String]
229
+ # @param location [String]
230
+ # @param agent [String]
231
+ # @param webhook [String]
232
+ #
233
+ # @return [::String]
234
+ def webhook_path project:, location:, agent:, webhook:
235
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
236
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
237
+ raise ::ArgumentError, "agent cannot contain /" if agent.to_s.include? "/"
238
+
239
+ "projects/#{project}/locations/#{location}/agents/#{agent}/webhooks/#{webhook}"
240
+ end
241
+
242
+ extend self
243
+ end
244
+ end
245
+ end
246
+ end
247
+ end
248
+ end
249
+ end
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/dialogflow/cx/v3/version"
24
+
25
+ require "google/cloud/dialogflow/cx/v3/test_cases/credentials"
26
+ require "google/cloud/dialogflow/cx/v3/test_cases/paths"
27
+ require "google/cloud/dialogflow/cx/v3/test_cases/operations"
28
+ require "google/cloud/dialogflow/cx/v3/test_cases/client"
29
+
30
+ module Google
31
+ module Cloud
32
+ module Dialogflow
33
+ module CX
34
+ module V3
35
+ ##
36
+ # Service for managing {::Google::Cloud::Dialogflow::CX::V3::TestCase Test Cases} and
37
+ # {::Google::Cloud::Dialogflow::CX::V3::TestCaseResult Test Case Results}.
38
+ #
39
+ # To load this service and instantiate a client:
40
+ #
41
+ # require "google/cloud/dialogflow/cx/v3/test_cases"
42
+ # client = ::Google::Cloud::Dialogflow::CX::V3::TestCases::Client.new
43
+ #
44
+ module TestCases
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+
52
+ helper_path = ::File.join __dir__, "test_cases", "helpers.rb"
53
+ require "google/cloud/dialogflow/cx/v3/test_cases/helpers" if ::File.file? helper_path
@@ -0,0 +1,67 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/dialogflow/cx/v3/transition_route_group.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/api/annotations_pb'
7
+ require 'google/api/client_pb'
8
+ require 'google/api/field_behavior_pb'
9
+ require 'google/api/resource_pb'
10
+ require 'google/cloud/dialogflow/cx/v3/page_pb'
11
+ require 'google/protobuf/empty_pb'
12
+ require 'google/protobuf/field_mask_pb'
13
+ Google::Protobuf::DescriptorPool.generated_pool.build do
14
+ add_file("google/cloud/dialogflow/cx/v3/transition_route_group.proto", :syntax => :proto3) do
15
+ add_message "google.cloud.dialogflow.cx.v3.TransitionRouteGroup" do
16
+ optional :name, :string, 1
17
+ optional :display_name, :string, 2
18
+ repeated :transition_routes, :message, 5, "google.cloud.dialogflow.cx.v3.TransitionRoute"
19
+ end
20
+ add_message "google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest" do
21
+ optional :parent, :string, 1
22
+ optional :page_size, :int32, 2
23
+ optional :page_token, :string, 3
24
+ optional :language_code, :string, 4
25
+ end
26
+ add_message "google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse" do
27
+ repeated :transition_route_groups, :message, 1, "google.cloud.dialogflow.cx.v3.TransitionRouteGroup"
28
+ optional :next_page_token, :string, 2
29
+ end
30
+ add_message "google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest" do
31
+ optional :name, :string, 1
32
+ optional :language_code, :string, 2
33
+ end
34
+ add_message "google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest" do
35
+ optional :parent, :string, 1
36
+ optional :transition_route_group, :message, 2, "google.cloud.dialogflow.cx.v3.TransitionRouteGroup"
37
+ optional :language_code, :string, 3
38
+ end
39
+ add_message "google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest" do
40
+ optional :transition_route_group, :message, 1, "google.cloud.dialogflow.cx.v3.TransitionRouteGroup"
41
+ optional :update_mask, :message, 2, "google.protobuf.FieldMask"
42
+ optional :language_code, :string, 3
43
+ end
44
+ add_message "google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest" do
45
+ optional :name, :string, 1
46
+ optional :force, :bool, 2
47
+ end
48
+ end
49
+ end
50
+
51
+ module Google
52
+ module Cloud
53
+ module Dialogflow
54
+ module CX
55
+ module V3
56
+ TransitionRouteGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.TransitionRouteGroup").msgclass
57
+ ListTransitionRouteGroupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest").msgclass
58
+ ListTransitionRouteGroupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsResponse").msgclass
59
+ GetTransitionRouteGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest").msgclass
60
+ CreateTransitionRouteGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest").msgclass
61
+ UpdateTransitionRouteGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest").msgclass
62
+ DeleteTransitionRouteGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest").msgclass
63
+ end
64
+ end
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,67 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/cloud/dialogflow/cx/v3/transition_route_group.proto for package 'Google.Cloud.Dialogflow.CX.V3'
3
+ # Original file comments:
4
+ # Copyright 2021 Google LLC
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
19
+ require 'grpc'
20
+ require 'google/cloud/dialogflow/cx/v3/transition_route_group_pb'
21
+
22
+ module Google
23
+ module Cloud
24
+ module Dialogflow
25
+ module CX
26
+ module V3
27
+ module TransitionRouteGroups
28
+ # Service for managing [TransitionRouteGroups][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
29
+ class Service
30
+
31
+ include GRPC::GenericService
32
+
33
+ self.marshal_class_method = :encode
34
+ self.unmarshal_class_method = :decode
35
+ self.service_name = 'google.cloud.dialogflow.cx.v3.TransitionRouteGroups'
36
+
37
+ # Returns the list of all transition route groups in the specified flow.
38
+ rpc :ListTransitionRouteGroups, ::Google::Cloud::Dialogflow::CX::V3::ListTransitionRouteGroupsRequest, ::Google::Cloud::Dialogflow::CX::V3::ListTransitionRouteGroupsResponse
39
+ # Retrieves the specified [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
40
+ rpc :GetTransitionRouteGroup, ::Google::Cloud::Dialogflow::CX::V3::GetTransitionRouteGroupRequest, ::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup
41
+ # Creates an [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] in the specified flow.
42
+ #
43
+ # Note: You should always train a flow prior to sending it queries. See the
44
+ # [training
45
+ # documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
46
+ rpc :CreateTransitionRouteGroup, ::Google::Cloud::Dialogflow::CX::V3::CreateTransitionRouteGroupRequest, ::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup
47
+ # Updates the specified [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
48
+ #
49
+ # Note: You should always train a flow prior to sending it queries. See the
50
+ # [training
51
+ # documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
52
+ rpc :UpdateTransitionRouteGroup, ::Google::Cloud::Dialogflow::CX::V3::UpdateTransitionRouteGroupRequest, ::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup
53
+ # Deletes the specified [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
54
+ #
55
+ # Note: You should always train a flow prior to sending it queries. See the
56
+ # [training
57
+ # documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
58
+ rpc :DeleteTransitionRouteGroup, ::Google::Cloud::Dialogflow::CX::V3::DeleteTransitionRouteGroupRequest, ::Google::Protobuf::Empty
59
+ end
60
+
61
+ Stub = Service.rpc_stub_class
62
+ end
63
+ end
64
+ end
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,766 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/dialogflow/cx/v3/transition_route_group_pb"
21
+
22
+ module Google
23
+ module Cloud
24
+ module Dialogflow
25
+ module CX
26
+ module V3
27
+ module TransitionRouteGroups
28
+ ##
29
+ # Client for the TransitionRouteGroups service.
30
+ #
31
+ # Service for managing {::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup TransitionRouteGroups}.
32
+ #
33
+ class Client
34
+ include Paths
35
+
36
+ # @private
37
+ attr_reader :transition_route_groups_stub
38
+
39
+ ##
40
+ # Configure the TransitionRouteGroups Client class.
41
+ #
42
+ # See {::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroups::Client::Configuration}
43
+ # for a description of the configuration fields.
44
+ #
45
+ # @example
46
+ #
47
+ # # Modify the configuration for all TransitionRouteGroups clients
48
+ # ::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroups::Client.configure do |config|
49
+ # config.timeout = 10.0
50
+ # end
51
+ #
52
+ # @yield [config] Configure the Client client.
53
+ # @yieldparam config [Client::Configuration]
54
+ #
55
+ # @return [Client::Configuration]
56
+ #
57
+ def self.configure
58
+ @configure ||= begin
59
+ namespace = ["Google", "Cloud", "Dialogflow", "CX", "V3"]
60
+ parent_config = while namespace.any?
61
+ parent_name = namespace.join "::"
62
+ parent_const = const_get parent_name
63
+ break parent_const.configure if parent_const.respond_to? :configure
64
+ namespace.pop
65
+ end
66
+ default_config = Client::Configuration.new parent_config
67
+
68
+ default_config.timeout = 60.0
69
+ default_config.retry_policy = {
70
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
71
+ }
72
+
73
+ default_config
74
+ end
75
+ yield @configure if block_given?
76
+ @configure
77
+ end
78
+
79
+ ##
80
+ # Configure the TransitionRouteGroups Client instance.
81
+ #
82
+ # The configuration is set to the derived mode, meaning that values can be changed,
83
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
84
+ # should be made on {Client.configure}.
85
+ #
86
+ # See {::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroups::Client::Configuration}
87
+ # for a description of the configuration fields.
88
+ #
89
+ # @yield [config] Configure the Client client.
90
+ # @yieldparam config [Client::Configuration]
91
+ #
92
+ # @return [Client::Configuration]
93
+ #
94
+ def configure
95
+ yield @config if block_given?
96
+ @config
97
+ end
98
+
99
+ ##
100
+ # Create a new TransitionRouteGroups client object.
101
+ #
102
+ # @example
103
+ #
104
+ # # Create a client using the default configuration
105
+ # client = ::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroups::Client.new
106
+ #
107
+ # # Create a client using a custom configuration
108
+ # client = ::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroups::Client.new do |config|
109
+ # config.timeout = 10.0
110
+ # end
111
+ #
112
+ # @yield [config] Configure the TransitionRouteGroups client.
113
+ # @yieldparam config [Client::Configuration]
114
+ #
115
+ def initialize
116
+ # These require statements are intentionally placed here to initialize
117
+ # the gRPC module only when it's required.
118
+ # See https://github.com/googleapis/toolkit/issues/446
119
+ require "gapic/grpc"
120
+ require "google/cloud/dialogflow/cx/v3/transition_route_group_services_pb"
121
+
122
+ # Create the configuration object
123
+ @config = Configuration.new Client.configure
124
+
125
+ # Yield the configuration if needed
126
+ yield @config if block_given?
127
+
128
+ # Create credentials
129
+ credentials = @config.credentials
130
+ # Use self-signed JWT if the endpoint is unchanged from default,
131
+ # but only if the default endpoint does not have a region prefix.
132
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
133
+ !@config.endpoint.split(".").first.include?("-")
134
+ credentials ||= Credentials.default scope: @config.scope,
135
+ enable_self_signed_jwt: enable_self_signed_jwt
136
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
137
+ credentials = Credentials.new credentials, scope: @config.scope
138
+ end
139
+ @quota_project_id = @config.quota_project
140
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
141
+
142
+ @transition_route_groups_stub = ::Gapic::ServiceStub.new(
143
+ ::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroups::Stub,
144
+ credentials: credentials,
145
+ endpoint: @config.endpoint,
146
+ channel_args: @config.channel_args,
147
+ interceptors: @config.interceptors
148
+ )
149
+ end
150
+
151
+ # Service calls
152
+
153
+ ##
154
+ # Returns the list of all transition route groups in the specified flow.
155
+ #
156
+ # @overload list_transition_route_groups(request, options = nil)
157
+ # Pass arguments to `list_transition_route_groups` via a request object, either of type
158
+ # {::Google::Cloud::Dialogflow::CX::V3::ListTransitionRouteGroupsRequest} or an equivalent Hash.
159
+ #
160
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::ListTransitionRouteGroupsRequest, ::Hash]
161
+ # A request object representing the call parameters. Required. To specify no
162
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
163
+ # @param options [::Gapic::CallOptions, ::Hash]
164
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
165
+ #
166
+ # @overload list_transition_route_groups(parent: nil, page_size: nil, page_token: nil, language_code: nil)
167
+ # Pass arguments to `list_transition_route_groups` via keyword arguments. Note that at
168
+ # least one keyword argument is required. To specify no parameters, or to keep all
169
+ # the default parameter values, pass an empty Hash as a request object (see above).
170
+ #
171
+ # @param parent [::String]
172
+ # Required. The flow to list all transition route groups for.
173
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
174
+ # ID>/flows/<Flow ID>`.
175
+ # @param page_size [::Integer]
176
+ # The maximum number of items to return in a single page. By default 100 and
177
+ # at most 1000.
178
+ # @param page_token [::String]
179
+ # The next_page_token value returned from a previous list request.
180
+ # @param language_code [::String]
181
+ # The language to list transition route groups for. The following fields are
182
+ # language dependent:
183
+ #
184
+ # * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages`
185
+ # *
186
+ # `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases`
187
+ #
188
+ #
189
+ # If not specified, the agent's default language is used.
190
+ # [Many
191
+ # languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
192
+ # are supported.
193
+ # Note: languages must be enabled in the agent before they can be used.
194
+ #
195
+ # @yield [response, operation] Access the result along with the RPC operation
196
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup>]
197
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
198
+ #
199
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup>]
200
+ #
201
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
202
+ #
203
+ def list_transition_route_groups request, options = nil
204
+ raise ::ArgumentError, "request must be provided" if request.nil?
205
+
206
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::ListTransitionRouteGroupsRequest
207
+
208
+ # Converts hash and nil to an options object
209
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
210
+
211
+ # Customize the options with defaults
212
+ metadata = @config.rpcs.list_transition_route_groups.metadata.to_h
213
+
214
+ # Set x-goog-api-client and x-goog-user-project headers
215
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
216
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
217
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
218
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
219
+
220
+ header_params = {
221
+ "parent" => request.parent
222
+ }
223
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
224
+ metadata[:"x-goog-request-params"] ||= request_params_header
225
+
226
+ options.apply_defaults timeout: @config.rpcs.list_transition_route_groups.timeout,
227
+ metadata: metadata,
228
+ retry_policy: @config.rpcs.list_transition_route_groups.retry_policy
229
+
230
+ options.apply_defaults timeout: @config.timeout,
231
+ metadata: @config.metadata,
232
+ retry_policy: @config.retry_policy
233
+
234
+ @transition_route_groups_stub.call_rpc :list_transition_route_groups, request, options: options do |response, operation|
235
+ response = ::Gapic::PagedEnumerable.new @transition_route_groups_stub, :list_transition_route_groups, request, response, operation, options
236
+ yield response, operation if block_given?
237
+ return response
238
+ end
239
+ rescue ::GRPC::BadStatus => e
240
+ raise ::Google::Cloud::Error.from_error(e)
241
+ end
242
+
243
+ ##
244
+ # Retrieves the specified {::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup TransitionRouteGroup}.
245
+ #
246
+ # @overload get_transition_route_group(request, options = nil)
247
+ # Pass arguments to `get_transition_route_group` via a request object, either of type
248
+ # {::Google::Cloud::Dialogflow::CX::V3::GetTransitionRouteGroupRequest} or an equivalent Hash.
249
+ #
250
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::GetTransitionRouteGroupRequest, ::Hash]
251
+ # A request object representing the call parameters. Required. To specify no
252
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
253
+ # @param options [::Gapic::CallOptions, ::Hash]
254
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
255
+ #
256
+ # @overload get_transition_route_group(name: nil, language_code: nil)
257
+ # Pass arguments to `get_transition_route_group` via keyword arguments. Note that at
258
+ # least one keyword argument is required. To specify no parameters, or to keep all
259
+ # the default parameter values, pass an empty Hash as a request object (see above).
260
+ #
261
+ # @param name [::String]
262
+ # Required. The name of the {::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup TransitionRouteGroup}.
263
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
264
+ # ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`.
265
+ # @param language_code [::String]
266
+ # The language to retrieve the transition route group for. The following
267
+ # fields are language dependent:
268
+ #
269
+ # * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages`
270
+ # *
271
+ # `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases`
272
+ #
273
+ # If not specified, the agent's default language is used.
274
+ # [Many
275
+ # languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
276
+ # are supported.
277
+ # Note: languages must be enabled in the agent before they can be used.
278
+ #
279
+ # @yield [response, operation] Access the result along with the RPC operation
280
+ # @yieldparam response [::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup]
281
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
282
+ #
283
+ # @return [::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup]
284
+ #
285
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
286
+ #
287
+ def get_transition_route_group request, options = nil
288
+ raise ::ArgumentError, "request must be provided" if request.nil?
289
+
290
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::GetTransitionRouteGroupRequest
291
+
292
+ # Converts hash and nil to an options object
293
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
294
+
295
+ # Customize the options with defaults
296
+ metadata = @config.rpcs.get_transition_route_group.metadata.to_h
297
+
298
+ # Set x-goog-api-client and x-goog-user-project headers
299
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
300
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
301
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
302
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
303
+
304
+ header_params = {
305
+ "name" => request.name
306
+ }
307
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
308
+ metadata[:"x-goog-request-params"] ||= request_params_header
309
+
310
+ options.apply_defaults timeout: @config.rpcs.get_transition_route_group.timeout,
311
+ metadata: metadata,
312
+ retry_policy: @config.rpcs.get_transition_route_group.retry_policy
313
+
314
+ options.apply_defaults timeout: @config.timeout,
315
+ metadata: @config.metadata,
316
+ retry_policy: @config.retry_policy
317
+
318
+ @transition_route_groups_stub.call_rpc :get_transition_route_group, request, options: options do |response, operation|
319
+ yield response, operation if block_given?
320
+ return response
321
+ end
322
+ rescue ::GRPC::BadStatus => e
323
+ raise ::Google::Cloud::Error.from_error(e)
324
+ end
325
+
326
+ ##
327
+ # Creates an {::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup TransitionRouteGroup} in the specified flow.
328
+ #
329
+ # Note: You should always train a flow prior to sending it queries. See the
330
+ # [training
331
+ # documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
332
+ #
333
+ # @overload create_transition_route_group(request, options = nil)
334
+ # Pass arguments to `create_transition_route_group` via a request object, either of type
335
+ # {::Google::Cloud::Dialogflow::CX::V3::CreateTransitionRouteGroupRequest} or an equivalent Hash.
336
+ #
337
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::CreateTransitionRouteGroupRequest, ::Hash]
338
+ # A request object representing the call parameters. Required. To specify no
339
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
340
+ # @param options [::Gapic::CallOptions, ::Hash]
341
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
342
+ #
343
+ # @overload create_transition_route_group(parent: nil, transition_route_group: nil, language_code: nil)
344
+ # Pass arguments to `create_transition_route_group` via keyword arguments. Note that at
345
+ # least one keyword argument is required. To specify no parameters, or to keep all
346
+ # the default parameter values, pass an empty Hash as a request object (see above).
347
+ #
348
+ # @param parent [::String]
349
+ # Required. The flow to create an {::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup TransitionRouteGroup} for.
350
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
351
+ # ID>/flows/<Flow ID>`.
352
+ # @param transition_route_group [::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup, ::Hash]
353
+ # Required. The transition route group to create.
354
+ # @param language_code [::String]
355
+ # The language of the following fields in `TransitionRouteGroup`:
356
+ #
357
+ # * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages`
358
+ # *
359
+ # `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases`
360
+ #
361
+ # If not specified, the agent's default language is used.
362
+ # [Many
363
+ # languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
364
+ # are supported.
365
+ # Note: languages must be enabled in the agent before they can be used.
366
+ #
367
+ # @yield [response, operation] Access the result along with the RPC operation
368
+ # @yieldparam response [::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup]
369
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
370
+ #
371
+ # @return [::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup]
372
+ #
373
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
374
+ #
375
+ def create_transition_route_group request, options = nil
376
+ raise ::ArgumentError, "request must be provided" if request.nil?
377
+
378
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::CreateTransitionRouteGroupRequest
379
+
380
+ # Converts hash and nil to an options object
381
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
382
+
383
+ # Customize the options with defaults
384
+ metadata = @config.rpcs.create_transition_route_group.metadata.to_h
385
+
386
+ # Set x-goog-api-client and x-goog-user-project headers
387
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
388
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
389
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
390
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
391
+
392
+ header_params = {
393
+ "parent" => request.parent
394
+ }
395
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
396
+ metadata[:"x-goog-request-params"] ||= request_params_header
397
+
398
+ options.apply_defaults timeout: @config.rpcs.create_transition_route_group.timeout,
399
+ metadata: metadata,
400
+ retry_policy: @config.rpcs.create_transition_route_group.retry_policy
401
+
402
+ options.apply_defaults timeout: @config.timeout,
403
+ metadata: @config.metadata,
404
+ retry_policy: @config.retry_policy
405
+
406
+ @transition_route_groups_stub.call_rpc :create_transition_route_group, request, options: options do |response, operation|
407
+ yield response, operation if block_given?
408
+ return response
409
+ end
410
+ rescue ::GRPC::BadStatus => e
411
+ raise ::Google::Cloud::Error.from_error(e)
412
+ end
413
+
414
+ ##
415
+ # Updates the specified {::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup TransitionRouteGroup}.
416
+ #
417
+ # Note: You should always train a flow prior to sending it queries. See the
418
+ # [training
419
+ # documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
420
+ #
421
+ # @overload update_transition_route_group(request, options = nil)
422
+ # Pass arguments to `update_transition_route_group` via a request object, either of type
423
+ # {::Google::Cloud::Dialogflow::CX::V3::UpdateTransitionRouteGroupRequest} or an equivalent Hash.
424
+ #
425
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::UpdateTransitionRouteGroupRequest, ::Hash]
426
+ # A request object representing the call parameters. Required. To specify no
427
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
428
+ # @param options [::Gapic::CallOptions, ::Hash]
429
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
430
+ #
431
+ # @overload update_transition_route_group(transition_route_group: nil, update_mask: nil, language_code: nil)
432
+ # Pass arguments to `update_transition_route_group` via keyword arguments. Note that at
433
+ # least one keyword argument is required. To specify no parameters, or to keep all
434
+ # the default parameter values, pass an empty Hash as a request object (see above).
435
+ #
436
+ # @param transition_route_group [::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup, ::Hash]
437
+ # Required. The transition route group to update.
438
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
439
+ # The mask to control which fields get updated.
440
+ # @param language_code [::String]
441
+ # The language of the following fields in `TransitionRouteGroup`:
442
+ #
443
+ # * `TransitionRouteGroup.transition_routes.trigger_fulfillment.messages`
444
+ # *
445
+ # `TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases`
446
+ #
447
+ # If not specified, the agent's default language is used.
448
+ # [Many
449
+ # languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
450
+ # are supported.
451
+ # Note: languages must be enabled in the agent before they can be used.
452
+ #
453
+ # @yield [response, operation] Access the result along with the RPC operation
454
+ # @yieldparam response [::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup]
455
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
456
+ #
457
+ # @return [::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup]
458
+ #
459
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
460
+ #
461
+ def update_transition_route_group request, options = nil
462
+ raise ::ArgumentError, "request must be provided" if request.nil?
463
+
464
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::UpdateTransitionRouteGroupRequest
465
+
466
+ # Converts hash and nil to an options object
467
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
468
+
469
+ # Customize the options with defaults
470
+ metadata = @config.rpcs.update_transition_route_group.metadata.to_h
471
+
472
+ # Set x-goog-api-client and x-goog-user-project headers
473
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
474
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
475
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
476
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
477
+
478
+ header_params = {
479
+ "transition_route_group.name" => request.transition_route_group.name
480
+ }
481
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
482
+ metadata[:"x-goog-request-params"] ||= request_params_header
483
+
484
+ options.apply_defaults timeout: @config.rpcs.update_transition_route_group.timeout,
485
+ metadata: metadata,
486
+ retry_policy: @config.rpcs.update_transition_route_group.retry_policy
487
+
488
+ options.apply_defaults timeout: @config.timeout,
489
+ metadata: @config.metadata,
490
+ retry_policy: @config.retry_policy
491
+
492
+ @transition_route_groups_stub.call_rpc :update_transition_route_group, request, options: options do |response, operation|
493
+ yield response, operation if block_given?
494
+ return response
495
+ end
496
+ rescue ::GRPC::BadStatus => e
497
+ raise ::Google::Cloud::Error.from_error(e)
498
+ end
499
+
500
+ ##
501
+ # Deletes the specified {::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup TransitionRouteGroup}.
502
+ #
503
+ # Note: You should always train a flow prior to sending it queries. See the
504
+ # [training
505
+ # documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
506
+ #
507
+ # @overload delete_transition_route_group(request, options = nil)
508
+ # Pass arguments to `delete_transition_route_group` via a request object, either of type
509
+ # {::Google::Cloud::Dialogflow::CX::V3::DeleteTransitionRouteGroupRequest} or an equivalent Hash.
510
+ #
511
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::DeleteTransitionRouteGroupRequest, ::Hash]
512
+ # A request object representing the call parameters. Required. To specify no
513
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
514
+ # @param options [::Gapic::CallOptions, ::Hash]
515
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
516
+ #
517
+ # @overload delete_transition_route_group(name: nil, force: nil)
518
+ # Pass arguments to `delete_transition_route_group` via keyword arguments. Note that at
519
+ # least one keyword argument is required. To specify no parameters, or to keep all
520
+ # the default parameter values, pass an empty Hash as a request object (see above).
521
+ #
522
+ # @param name [::String]
523
+ # Required. The name of the {::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup TransitionRouteGroup} to delete.
524
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
525
+ # ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`.
526
+ # @param force [::Boolean]
527
+ # This field has no effect for transition route group that no page is using.
528
+ # If the transition route group is referenced by any page:
529
+ #
530
+ # * If `force` is set to false, an error will be returned with message
531
+ # indicating pages that reference the transition route group.
532
+ # * If `force` is set to true, Dialogflow will remove the transition route
533
+ # group, as well as any reference to it.
534
+ #
535
+ # @yield [response, operation] Access the result along with the RPC operation
536
+ # @yieldparam response [::Google::Protobuf::Empty]
537
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
538
+ #
539
+ # @return [::Google::Protobuf::Empty]
540
+ #
541
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
542
+ #
543
+ def delete_transition_route_group request, options = nil
544
+ raise ::ArgumentError, "request must be provided" if request.nil?
545
+
546
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::DeleteTransitionRouteGroupRequest
547
+
548
+ # Converts hash and nil to an options object
549
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
550
+
551
+ # Customize the options with defaults
552
+ metadata = @config.rpcs.delete_transition_route_group.metadata.to_h
553
+
554
+ # Set x-goog-api-client and x-goog-user-project headers
555
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
556
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
557
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
558
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
559
+
560
+ header_params = {
561
+ "name" => request.name
562
+ }
563
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
564
+ metadata[:"x-goog-request-params"] ||= request_params_header
565
+
566
+ options.apply_defaults timeout: @config.rpcs.delete_transition_route_group.timeout,
567
+ metadata: metadata,
568
+ retry_policy: @config.rpcs.delete_transition_route_group.retry_policy
569
+
570
+ options.apply_defaults timeout: @config.timeout,
571
+ metadata: @config.metadata,
572
+ retry_policy: @config.retry_policy
573
+
574
+ @transition_route_groups_stub.call_rpc :delete_transition_route_group, request, options: options do |response, operation|
575
+ yield response, operation if block_given?
576
+ return response
577
+ end
578
+ rescue ::GRPC::BadStatus => e
579
+ raise ::Google::Cloud::Error.from_error(e)
580
+ end
581
+
582
+ ##
583
+ # Configuration class for the TransitionRouteGroups API.
584
+ #
585
+ # This class represents the configuration for TransitionRouteGroups,
586
+ # providing control over timeouts, retry behavior, logging, transport
587
+ # parameters, and other low-level controls. Certain parameters can also be
588
+ # applied individually to specific RPCs. See
589
+ # {::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroups::Client::Configuration::Rpcs}
590
+ # for a list of RPCs that can be configured independently.
591
+ #
592
+ # Configuration can be applied globally to all clients, or to a single client
593
+ # on construction.
594
+ #
595
+ # @example
596
+ #
597
+ # # Modify the global config, setting the timeout for
598
+ # # list_transition_route_groups to 20 seconds,
599
+ # # and all remaining timeouts to 10 seconds.
600
+ # ::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroups::Client.configure do |config|
601
+ # config.timeout = 10.0
602
+ # config.rpcs.list_transition_route_groups.timeout = 20.0
603
+ # end
604
+ #
605
+ # # Apply the above configuration only to a new client.
606
+ # client = ::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroups::Client.new do |config|
607
+ # config.timeout = 10.0
608
+ # config.rpcs.list_transition_route_groups.timeout = 20.0
609
+ # end
610
+ #
611
+ # @!attribute [rw] endpoint
612
+ # The hostname or hostname:port of the service endpoint.
613
+ # Defaults to `"dialogflow.googleapis.com"`.
614
+ # @return [::String]
615
+ # @!attribute [rw] credentials
616
+ # Credentials to send with calls. You may provide any of the following types:
617
+ # * (`String`) The path to a service account key file in JSON format
618
+ # * (`Hash`) A service account key as a Hash
619
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
620
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
621
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
622
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
623
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
624
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
625
+ # * (`nil`) indicating no credentials
626
+ # @return [::Object]
627
+ # @!attribute [rw] scope
628
+ # The OAuth scopes
629
+ # @return [::Array<::String>]
630
+ # @!attribute [rw] lib_name
631
+ # The library name as recorded in instrumentation and logging
632
+ # @return [::String]
633
+ # @!attribute [rw] lib_version
634
+ # The library version as recorded in instrumentation and logging
635
+ # @return [::String]
636
+ # @!attribute [rw] channel_args
637
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
638
+ # `GRPC::Core::Channel` object is provided as the credential.
639
+ # @return [::Hash]
640
+ # @!attribute [rw] interceptors
641
+ # An array of interceptors that are run before calls are executed.
642
+ # @return [::Array<::GRPC::ClientInterceptor>]
643
+ # @!attribute [rw] timeout
644
+ # The call timeout in seconds.
645
+ # @return [::Numeric]
646
+ # @!attribute [rw] metadata
647
+ # Additional gRPC headers to be sent with the call.
648
+ # @return [::Hash{::Symbol=>::String}]
649
+ # @!attribute [rw] retry_policy
650
+ # The retry policy. The value is a hash with the following keys:
651
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
652
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
653
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
654
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
655
+ # trigger a retry.
656
+ # @return [::Hash]
657
+ # @!attribute [rw] quota_project
658
+ # A separate project against which to charge quota.
659
+ # @return [::String]
660
+ #
661
+ class Configuration
662
+ extend ::Gapic::Config
663
+
664
+ config_attr :endpoint, "dialogflow.googleapis.com", ::String
665
+ config_attr :credentials, nil do |value|
666
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
667
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
668
+ allowed.any? { |klass| klass === value }
669
+ end
670
+ config_attr :scope, nil, ::String, ::Array, nil
671
+ config_attr :lib_name, nil, ::String, nil
672
+ config_attr :lib_version, nil, ::String, nil
673
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
674
+ config_attr :interceptors, nil, ::Array, nil
675
+ config_attr :timeout, nil, ::Numeric, nil
676
+ config_attr :metadata, nil, ::Hash, nil
677
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
678
+ config_attr :quota_project, nil, ::String, nil
679
+
680
+ # @private
681
+ def initialize parent_config = nil
682
+ @parent_config = parent_config unless parent_config.nil?
683
+
684
+ yield self if block_given?
685
+ end
686
+
687
+ ##
688
+ # Configurations for individual RPCs
689
+ # @return [Rpcs]
690
+ #
691
+ def rpcs
692
+ @rpcs ||= begin
693
+ parent_rpcs = nil
694
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
695
+ Rpcs.new parent_rpcs
696
+ end
697
+ end
698
+
699
+ ##
700
+ # Configuration RPC class for the TransitionRouteGroups API.
701
+ #
702
+ # Includes fields providing the configuration for each RPC in this service.
703
+ # Each configuration object is of type `Gapic::Config::Method` and includes
704
+ # the following configuration fields:
705
+ #
706
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
707
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
708
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
709
+ # include the following keys:
710
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
711
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
712
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
713
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
714
+ # trigger a retry.
715
+ #
716
+ class Rpcs
717
+ ##
718
+ # RPC-specific configuration for `list_transition_route_groups`
719
+ # @return [::Gapic::Config::Method]
720
+ #
721
+ attr_reader :list_transition_route_groups
722
+ ##
723
+ # RPC-specific configuration for `get_transition_route_group`
724
+ # @return [::Gapic::Config::Method]
725
+ #
726
+ attr_reader :get_transition_route_group
727
+ ##
728
+ # RPC-specific configuration for `create_transition_route_group`
729
+ # @return [::Gapic::Config::Method]
730
+ #
731
+ attr_reader :create_transition_route_group
732
+ ##
733
+ # RPC-specific configuration for `update_transition_route_group`
734
+ # @return [::Gapic::Config::Method]
735
+ #
736
+ attr_reader :update_transition_route_group
737
+ ##
738
+ # RPC-specific configuration for `delete_transition_route_group`
739
+ # @return [::Gapic::Config::Method]
740
+ #
741
+ attr_reader :delete_transition_route_group
742
+
743
+ # @private
744
+ def initialize parent_rpcs = nil
745
+ list_transition_route_groups_config = parent_rpcs.list_transition_route_groups if parent_rpcs.respond_to? :list_transition_route_groups
746
+ @list_transition_route_groups = ::Gapic::Config::Method.new list_transition_route_groups_config
747
+ get_transition_route_group_config = parent_rpcs.get_transition_route_group if parent_rpcs.respond_to? :get_transition_route_group
748
+ @get_transition_route_group = ::Gapic::Config::Method.new get_transition_route_group_config
749
+ create_transition_route_group_config = parent_rpcs.create_transition_route_group if parent_rpcs.respond_to? :create_transition_route_group
750
+ @create_transition_route_group = ::Gapic::Config::Method.new create_transition_route_group_config
751
+ update_transition_route_group_config = parent_rpcs.update_transition_route_group if parent_rpcs.respond_to? :update_transition_route_group
752
+ @update_transition_route_group = ::Gapic::Config::Method.new update_transition_route_group_config
753
+ delete_transition_route_group_config = parent_rpcs.delete_transition_route_group if parent_rpcs.respond_to? :delete_transition_route_group
754
+ @delete_transition_route_group = ::Gapic::Config::Method.new delete_transition_route_group_config
755
+
756
+ yield self if block_given?
757
+ end
758
+ end
759
+ end
760
+ end
761
+ end
762
+ end
763
+ end
764
+ end
765
+ end
766
+ end