google-cloud-dialogflow-cx-v3 0.14.0 → 0.15.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/dialogflow/cx/v3/agents/client.rb +2 -2
- data/lib/google/cloud/dialogflow/cx/v3/agents/operations.rb +2 -2
- data/lib/google/cloud/dialogflow/cx/v3/agents/rest/client.rb +1032 -0
- data/lib/google/cloud/dialogflow/cx/v3/agents/rest/operations.rb +815 -0
- data/lib/google/cloud/dialogflow/cx/v3/agents/rest/service_stub.rb +586 -0
- data/lib/google/cloud/dialogflow/cx/v3/agents/rest.rb +56 -0
- data/lib/google/cloud/dialogflow/cx/v3/agents.rb +6 -0
- data/lib/google/cloud/dialogflow/cx/v3/bindings_override.rb +104 -0
- data/lib/google/cloud/dialogflow/cx/v3/changelogs/client.rb +2 -2
- data/lib/google/cloud/dialogflow/cx/v3/changelogs/rest/client.rb +472 -0
- data/lib/google/cloud/dialogflow/cx/v3/changelogs/rest/service_stub.rb +168 -0
- data/lib/google/cloud/dialogflow/cx/v3/changelogs/rest.rb +55 -0
- data/lib/google/cloud/dialogflow/cx/v3/changelogs.rb +6 -0
- data/lib/google/cloud/dialogflow/cx/v3/deployments/client.rb +2 -2
- data/lib/google/cloud/dialogflow/cx/v3/deployments/rest/client.rb +456 -0
- data/lib/google/cloud/dialogflow/cx/v3/deployments/rest/service_stub.rb +168 -0
- data/lib/google/cloud/dialogflow/cx/v3/deployments/rest.rb +55 -0
- data/lib/google/cloud/dialogflow/cx/v3/deployments.rb +6 -0
- data/lib/google/cloud/dialogflow/cx/v3/entity_types/client.rb +2 -2
- data/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/client.rb +740 -0
- data/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/service_stub.rb +347 -0
- data/lib/google/cloud/dialogflow/cx/v3/entity_types/rest.rb +55 -0
- data/lib/google/cloud/dialogflow/cx/v3/entity_types.rb +6 -0
- data/lib/google/cloud/dialogflow/cx/v3/environments/client.rb +2 -2
- data/lib/google/cloud/dialogflow/cx/v3/environments/operations.rb +2 -2
- data/lib/google/cloud/dialogflow/cx/v3/environments/rest/client.rb +1028 -0
- data/lib/google/cloud/dialogflow/cx/v3/environments/rest/operations.rb +815 -0
- data/lib/google/cloud/dialogflow/cx/v3/environments/rest/service_stub.rb +585 -0
- data/lib/google/cloud/dialogflow/cx/v3/environments/rest.rb +57 -0
- data/lib/google/cloud/dialogflow/cx/v3/environments.rb +6 -0
- data/lib/google/cloud/dialogflow/cx/v3/experiments/client.rb +2 -2
- data/lib/google/cloud/dialogflow/cx/v3/experiments/rest/client.rb +821 -0
- data/lib/google/cloud/dialogflow/cx/v3/experiments/rest/service_stub.rb +467 -0
- data/lib/google/cloud/dialogflow/cx/v3/experiments/rest.rb +55 -0
- data/lib/google/cloud/dialogflow/cx/v3/experiments.rb +6 -0
- data/lib/google/cloud/dialogflow/cx/v3/flows/client.rb +2 -2
- data/lib/google/cloud/dialogflow/cx/v3/flows/operations.rb +2 -2
- data/lib/google/cloud/dialogflow/cx/v3/flows/rest/client.rb +1182 -0
- data/lib/google/cloud/dialogflow/cx/v3/flows/rest/operations.rb +815 -0
- data/lib/google/cloud/dialogflow/cx/v3/flows/rest/service_stub.rb +646 -0
- data/lib/google/cloud/dialogflow/cx/v3/flows/rest.rb +56 -0
- data/lib/google/cloud/dialogflow/cx/v3/flows.rb +6 -0
- data/lib/google/cloud/dialogflow/cx/v3/intents/client.rb +2 -2
- data/lib/google/cloud/dialogflow/cx/v3/intents/rest/client.rb +722 -0
- data/lib/google/cloud/dialogflow/cx/v3/intents/rest/service_stub.rb +347 -0
- data/lib/google/cloud/dialogflow/cx/v3/intents/rest.rb +55 -0
- data/lib/google/cloud/dialogflow/cx/v3/intents.rb +6 -0
- data/lib/google/cloud/dialogflow/cx/v3/pages/client.rb +2 -2
- data/lib/google/cloud/dialogflow/cx/v3/pages/rest/client.rb +777 -0
- data/lib/google/cloud/dialogflow/cx/v3/pages/rest/service_stub.rb +347 -0
- data/lib/google/cloud/dialogflow/cx/v3/pages/rest.rb +55 -0
- data/lib/google/cloud/dialogflow/cx/v3/pages.rb +6 -0
- data/lib/google/cloud/dialogflow/cx/v3/rest.rb +55 -0
- data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/client.rb +2 -2
- data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/rest/client.rb +673 -0
- data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/rest/service_stub.rb +347 -0
- data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/rest.rb +55 -0
- data/lib/google/cloud/dialogflow/cx/v3/security_settings_service.rb +6 -0
- data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/client.rb +2 -2
- data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/rest/client.rb +688 -0
- data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/rest/service_stub.rb +384 -0
- data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/rest.rb +56 -0
- data/lib/google/cloud/dialogflow/cx/v3/session_entity_types.rb +6 -0
- data/lib/google/cloud/dialogflow/cx/v3/sessions/client.rb +2 -2
- data/lib/google/cloud/dialogflow/cx/v3/sessions/rest/client.rb +576 -0
- data/lib/google/cloud/dialogflow/cx/v3/sessions/rest/service_stub.rb +254 -0
- data/lib/google/cloud/dialogflow/cx/v3/sessions/rest.rb +58 -0
- data/lib/google/cloud/dialogflow/cx/v3/sessions.rb +6 -0
- data/lib/google/cloud/dialogflow/cx/v3/test_cases/client.rb +2 -2
- data/lib/google/cloud/dialogflow/cx/v3/test_cases/operations.rb +2 -2
- data/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/client.rb +1304 -0
- data/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/operations.rb +815 -0
- data/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/service_stub.rb +765 -0
- data/lib/google/cloud/dialogflow/cx/v3/test_cases/rest.rb +57 -0
- data/lib/google/cloud/dialogflow/cx/v3/test_cases.rb +6 -0
- data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/client.rb +2 -2
- data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/rest/client.rb +748 -0
- data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/rest/service_stub.rb +347 -0
- data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/rest.rb +56 -0
- data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups.rb +6 -0
- data/lib/google/cloud/dialogflow/cx/v3/version.rb +1 -1
- data/lib/google/cloud/dialogflow/cx/v3/versions/client.rb +2 -2
- data/lib/google/cloud/dialogflow/cx/v3/versions/operations.rb +2 -2
- data/lib/google/cloud/dialogflow/cx/v3/versions/rest/client.rb +865 -0
- data/lib/google/cloud/dialogflow/cx/v3/versions/rest/operations.rb +815 -0
- data/lib/google/cloud/dialogflow/cx/v3/versions/rest/service_stub.rb +467 -0
- data/lib/google/cloud/dialogflow/cx/v3/versions/rest.rb +56 -0
- data/lib/google/cloud/dialogflow/cx/v3/versions.rb +6 -0
- data/lib/google/cloud/dialogflow/cx/v3/webhooks/client.rb +2 -2
- data/lib/google/cloud/dialogflow/cx/v3/webhooks/rest/client.rb +677 -0
- data/lib/google/cloud/dialogflow/cx/v3/webhooks/rest/service_stub.rb +347 -0
- data/lib/google/cloud/dialogflow/cx/v3/webhooks/rest.rb +55 -0
- data/lib/google/cloud/dialogflow/cx/v3/webhooks.rb +6 -0
- data/lib/google/cloud/dialogflow/cx/v3.rb +5 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/deployment.rb +1 -1
- data/proto_docs/google/cloud/dialogflow/cx/v3/session.rb +1 -1
- metadata +57 -2
@@ -0,0 +1,467 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 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/dialogflow/cx/v3/version_pb"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module Dialogflow
|
24
|
+
module CX
|
25
|
+
module V3
|
26
|
+
module Versions
|
27
|
+
module Rest
|
28
|
+
##
|
29
|
+
# REST service stub for the Versions service.
|
30
|
+
# Service stub contains baseline method implementations
|
31
|
+
# including transcoding, making the REST call, and deserialing the response.
|
32
|
+
#
|
33
|
+
class ServiceStub
|
34
|
+
def initialize endpoint:, credentials:
|
35
|
+
# These require statements are intentionally placed here to initialize
|
36
|
+
# the REST modules only when it's required.
|
37
|
+
require "gapic/rest"
|
38
|
+
|
39
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
|
40
|
+
numeric_enums: true,
|
41
|
+
raise_faraday_errors: false
|
42
|
+
end
|
43
|
+
|
44
|
+
##
|
45
|
+
# Baseline implementation for the list_versions REST call
|
46
|
+
#
|
47
|
+
# @param request_pb [::Google::Cloud::Dialogflow::CX::V3::ListVersionsRequest]
|
48
|
+
# A request object representing the call parameters. Required.
|
49
|
+
# @param options [::Gapic::CallOptions]
|
50
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
51
|
+
#
|
52
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
53
|
+
# @yieldparam result [::Google::Cloud::Dialogflow::CX::V3::ListVersionsResponse]
|
54
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
55
|
+
#
|
56
|
+
# @return [::Google::Cloud::Dialogflow::CX::V3::ListVersionsResponse]
|
57
|
+
# A result object deserialized from the server's reply
|
58
|
+
def list_versions request_pb, options = nil
|
59
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
60
|
+
|
61
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_list_versions_request request_pb
|
62
|
+
query_string_params = if query_string_params.any?
|
63
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
64
|
+
else
|
65
|
+
{}
|
66
|
+
end
|
67
|
+
|
68
|
+
response = @client_stub.make_http_request(
|
69
|
+
verb,
|
70
|
+
uri: uri,
|
71
|
+
body: body || "",
|
72
|
+
params: query_string_params,
|
73
|
+
options: options
|
74
|
+
)
|
75
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
76
|
+
result = ::Google::Cloud::Dialogflow::CX::V3::ListVersionsResponse.decode_json response.body, ignore_unknown_fields: true
|
77
|
+
|
78
|
+
yield result, operation if block_given?
|
79
|
+
result
|
80
|
+
end
|
81
|
+
|
82
|
+
##
|
83
|
+
# Baseline implementation for the get_version REST call
|
84
|
+
#
|
85
|
+
# @param request_pb [::Google::Cloud::Dialogflow::CX::V3::GetVersionRequest]
|
86
|
+
# A request object representing the call parameters. Required.
|
87
|
+
# @param options [::Gapic::CallOptions]
|
88
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
89
|
+
#
|
90
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
91
|
+
# @yieldparam result [::Google::Cloud::Dialogflow::CX::V3::Version]
|
92
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
93
|
+
#
|
94
|
+
# @return [::Google::Cloud::Dialogflow::CX::V3::Version]
|
95
|
+
# A result object deserialized from the server's reply
|
96
|
+
def get_version request_pb, options = nil
|
97
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
98
|
+
|
99
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_version_request request_pb
|
100
|
+
query_string_params = if query_string_params.any?
|
101
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
102
|
+
else
|
103
|
+
{}
|
104
|
+
end
|
105
|
+
|
106
|
+
response = @client_stub.make_http_request(
|
107
|
+
verb,
|
108
|
+
uri: uri,
|
109
|
+
body: body || "",
|
110
|
+
params: query_string_params,
|
111
|
+
options: options
|
112
|
+
)
|
113
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
114
|
+
result = ::Google::Cloud::Dialogflow::CX::V3::Version.decode_json response.body, ignore_unknown_fields: true
|
115
|
+
|
116
|
+
yield result, operation if block_given?
|
117
|
+
result
|
118
|
+
end
|
119
|
+
|
120
|
+
##
|
121
|
+
# Baseline implementation for the create_version REST call
|
122
|
+
#
|
123
|
+
# @param request_pb [::Google::Cloud::Dialogflow::CX::V3::CreateVersionRequest]
|
124
|
+
# A request object representing the call parameters. Required.
|
125
|
+
# @param options [::Gapic::CallOptions]
|
126
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
127
|
+
#
|
128
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
129
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
130
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
131
|
+
#
|
132
|
+
# @return [::Google::Longrunning::Operation]
|
133
|
+
# A result object deserialized from the server's reply
|
134
|
+
def create_version request_pb, options = nil
|
135
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
136
|
+
|
137
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_create_version_request request_pb
|
138
|
+
query_string_params = if query_string_params.any?
|
139
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
140
|
+
else
|
141
|
+
{}
|
142
|
+
end
|
143
|
+
|
144
|
+
response = @client_stub.make_http_request(
|
145
|
+
verb,
|
146
|
+
uri: uri,
|
147
|
+
body: body || "",
|
148
|
+
params: query_string_params,
|
149
|
+
options: options
|
150
|
+
)
|
151
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
152
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
153
|
+
|
154
|
+
yield result, operation if block_given?
|
155
|
+
result
|
156
|
+
end
|
157
|
+
|
158
|
+
##
|
159
|
+
# Baseline implementation for the update_version REST call
|
160
|
+
#
|
161
|
+
# @param request_pb [::Google::Cloud::Dialogflow::CX::V3::UpdateVersionRequest]
|
162
|
+
# A request object representing the call parameters. Required.
|
163
|
+
# @param options [::Gapic::CallOptions]
|
164
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
165
|
+
#
|
166
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
167
|
+
# @yieldparam result [::Google::Cloud::Dialogflow::CX::V3::Version]
|
168
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
169
|
+
#
|
170
|
+
# @return [::Google::Cloud::Dialogflow::CX::V3::Version]
|
171
|
+
# A result object deserialized from the server's reply
|
172
|
+
def update_version request_pb, options = nil
|
173
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
174
|
+
|
175
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_update_version_request request_pb
|
176
|
+
query_string_params = if query_string_params.any?
|
177
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
178
|
+
else
|
179
|
+
{}
|
180
|
+
end
|
181
|
+
|
182
|
+
response = @client_stub.make_http_request(
|
183
|
+
verb,
|
184
|
+
uri: uri,
|
185
|
+
body: body || "",
|
186
|
+
params: query_string_params,
|
187
|
+
options: options
|
188
|
+
)
|
189
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
190
|
+
result = ::Google::Cloud::Dialogflow::CX::V3::Version.decode_json response.body, ignore_unknown_fields: true
|
191
|
+
|
192
|
+
yield result, operation if block_given?
|
193
|
+
result
|
194
|
+
end
|
195
|
+
|
196
|
+
##
|
197
|
+
# Baseline implementation for the delete_version REST call
|
198
|
+
#
|
199
|
+
# @param request_pb [::Google::Cloud::Dialogflow::CX::V3::DeleteVersionRequest]
|
200
|
+
# A request object representing the call parameters. Required.
|
201
|
+
# @param options [::Gapic::CallOptions]
|
202
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
203
|
+
#
|
204
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
205
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
206
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
207
|
+
#
|
208
|
+
# @return [::Google::Protobuf::Empty]
|
209
|
+
# A result object deserialized from the server's reply
|
210
|
+
def delete_version request_pb, options = nil
|
211
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
212
|
+
|
213
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_delete_version_request request_pb
|
214
|
+
query_string_params = if query_string_params.any?
|
215
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
216
|
+
else
|
217
|
+
{}
|
218
|
+
end
|
219
|
+
|
220
|
+
response = @client_stub.make_http_request(
|
221
|
+
verb,
|
222
|
+
uri: uri,
|
223
|
+
body: body || "",
|
224
|
+
params: query_string_params,
|
225
|
+
options: options
|
226
|
+
)
|
227
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
228
|
+
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
229
|
+
|
230
|
+
yield result, operation if block_given?
|
231
|
+
result
|
232
|
+
end
|
233
|
+
|
234
|
+
##
|
235
|
+
# Baseline implementation for the load_version REST call
|
236
|
+
#
|
237
|
+
# @param request_pb [::Google::Cloud::Dialogflow::CX::V3::LoadVersionRequest]
|
238
|
+
# A request object representing the call parameters. Required.
|
239
|
+
# @param options [::Gapic::CallOptions]
|
240
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
241
|
+
#
|
242
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
243
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
244
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
245
|
+
#
|
246
|
+
# @return [::Google::Longrunning::Operation]
|
247
|
+
# A result object deserialized from the server's reply
|
248
|
+
def load_version request_pb, options = nil
|
249
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
250
|
+
|
251
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_load_version_request request_pb
|
252
|
+
query_string_params = if query_string_params.any?
|
253
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
254
|
+
else
|
255
|
+
{}
|
256
|
+
end
|
257
|
+
|
258
|
+
response = @client_stub.make_http_request(
|
259
|
+
verb,
|
260
|
+
uri: uri,
|
261
|
+
body: body || "",
|
262
|
+
params: query_string_params,
|
263
|
+
options: options
|
264
|
+
)
|
265
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
266
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
267
|
+
|
268
|
+
yield result, operation if block_given?
|
269
|
+
result
|
270
|
+
end
|
271
|
+
|
272
|
+
##
|
273
|
+
# Baseline implementation for the compare_versions REST call
|
274
|
+
#
|
275
|
+
# @param request_pb [::Google::Cloud::Dialogflow::CX::V3::CompareVersionsRequest]
|
276
|
+
# A request object representing the call parameters. Required.
|
277
|
+
# @param options [::Gapic::CallOptions]
|
278
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
279
|
+
#
|
280
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
281
|
+
# @yieldparam result [::Google::Cloud::Dialogflow::CX::V3::CompareVersionsResponse]
|
282
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
283
|
+
#
|
284
|
+
# @return [::Google::Cloud::Dialogflow::CX::V3::CompareVersionsResponse]
|
285
|
+
# A result object deserialized from the server's reply
|
286
|
+
def compare_versions request_pb, options = nil
|
287
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
288
|
+
|
289
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_compare_versions_request request_pb
|
290
|
+
query_string_params = if query_string_params.any?
|
291
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
292
|
+
else
|
293
|
+
{}
|
294
|
+
end
|
295
|
+
|
296
|
+
response = @client_stub.make_http_request(
|
297
|
+
verb,
|
298
|
+
uri: uri,
|
299
|
+
body: body || "",
|
300
|
+
params: query_string_params,
|
301
|
+
options: options
|
302
|
+
)
|
303
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
304
|
+
result = ::Google::Cloud::Dialogflow::CX::V3::CompareVersionsResponse.decode_json response.body, ignore_unknown_fields: true
|
305
|
+
|
306
|
+
yield result, operation if block_given?
|
307
|
+
result
|
308
|
+
end
|
309
|
+
|
310
|
+
##
|
311
|
+
# @private
|
312
|
+
#
|
313
|
+
# GRPC transcoding helper method for the list_versions REST call
|
314
|
+
#
|
315
|
+
# @param request_pb [::Google::Cloud::Dialogflow::CX::V3::ListVersionsRequest]
|
316
|
+
# A request object representing the call parameters. Required.
|
317
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
318
|
+
# Uri, Body, Query string parameters
|
319
|
+
def self.transcode_list_versions_request request_pb
|
320
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
321
|
+
.with_bindings(
|
322
|
+
uri_method: :get,
|
323
|
+
uri_template: "/v3/{parent}/versions",
|
324
|
+
matches: [
|
325
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/agents/[^/]+/flows/[^/]+/?$}, false]
|
326
|
+
]
|
327
|
+
)
|
328
|
+
transcoder.transcode request_pb
|
329
|
+
end
|
330
|
+
|
331
|
+
##
|
332
|
+
# @private
|
333
|
+
#
|
334
|
+
# GRPC transcoding helper method for the get_version REST call
|
335
|
+
#
|
336
|
+
# @param request_pb [::Google::Cloud::Dialogflow::CX::V3::GetVersionRequest]
|
337
|
+
# A request object representing the call parameters. Required.
|
338
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
339
|
+
# Uri, Body, Query string parameters
|
340
|
+
def self.transcode_get_version_request request_pb
|
341
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
342
|
+
.with_bindings(
|
343
|
+
uri_method: :get,
|
344
|
+
uri_template: "/v3/{name}",
|
345
|
+
matches: [
|
346
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/agents/[^/]+/flows/[^/]+/versions/[^/]+/?$}, false]
|
347
|
+
]
|
348
|
+
)
|
349
|
+
transcoder.transcode request_pb
|
350
|
+
end
|
351
|
+
|
352
|
+
##
|
353
|
+
# @private
|
354
|
+
#
|
355
|
+
# GRPC transcoding helper method for the create_version REST call
|
356
|
+
#
|
357
|
+
# @param request_pb [::Google::Cloud::Dialogflow::CX::V3::CreateVersionRequest]
|
358
|
+
# A request object representing the call parameters. Required.
|
359
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
360
|
+
# Uri, Body, Query string parameters
|
361
|
+
def self.transcode_create_version_request request_pb
|
362
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
363
|
+
.with_bindings(
|
364
|
+
uri_method: :post,
|
365
|
+
uri_template: "/v3/{parent}/versions",
|
366
|
+
body: "version",
|
367
|
+
matches: [
|
368
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/agents/[^/]+/flows/[^/]+/?$}, false]
|
369
|
+
]
|
370
|
+
)
|
371
|
+
transcoder.transcode request_pb
|
372
|
+
end
|
373
|
+
|
374
|
+
##
|
375
|
+
# @private
|
376
|
+
#
|
377
|
+
# GRPC transcoding helper method for the update_version REST call
|
378
|
+
#
|
379
|
+
# @param request_pb [::Google::Cloud::Dialogflow::CX::V3::UpdateVersionRequest]
|
380
|
+
# A request object representing the call parameters. Required.
|
381
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
382
|
+
# Uri, Body, Query string parameters
|
383
|
+
def self.transcode_update_version_request request_pb
|
384
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
385
|
+
.with_bindings(
|
386
|
+
uri_method: :patch,
|
387
|
+
uri_template: "/v3/{version.name}",
|
388
|
+
body: "version",
|
389
|
+
matches: [
|
390
|
+
["version.name", %r{^projects/[^/]+/locations/[^/]+/agents/[^/]+/flows/[^/]+/versions/[^/]+/?$}, false]
|
391
|
+
]
|
392
|
+
)
|
393
|
+
transcoder.transcode request_pb
|
394
|
+
end
|
395
|
+
|
396
|
+
##
|
397
|
+
# @private
|
398
|
+
#
|
399
|
+
# GRPC transcoding helper method for the delete_version REST call
|
400
|
+
#
|
401
|
+
# @param request_pb [::Google::Cloud::Dialogflow::CX::V3::DeleteVersionRequest]
|
402
|
+
# A request object representing the call parameters. Required.
|
403
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
404
|
+
# Uri, Body, Query string parameters
|
405
|
+
def self.transcode_delete_version_request request_pb
|
406
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
407
|
+
.with_bindings(
|
408
|
+
uri_method: :delete,
|
409
|
+
uri_template: "/v3/{name}",
|
410
|
+
matches: [
|
411
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/agents/[^/]+/flows/[^/]+/versions/[^/]+/?$}, false]
|
412
|
+
]
|
413
|
+
)
|
414
|
+
transcoder.transcode request_pb
|
415
|
+
end
|
416
|
+
|
417
|
+
##
|
418
|
+
# @private
|
419
|
+
#
|
420
|
+
# GRPC transcoding helper method for the load_version REST call
|
421
|
+
#
|
422
|
+
# @param request_pb [::Google::Cloud::Dialogflow::CX::V3::LoadVersionRequest]
|
423
|
+
# A request object representing the call parameters. Required.
|
424
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
425
|
+
# Uri, Body, Query string parameters
|
426
|
+
def self.transcode_load_version_request request_pb
|
427
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
428
|
+
.with_bindings(
|
429
|
+
uri_method: :post,
|
430
|
+
uri_template: "/v3/{name}:load",
|
431
|
+
body: "*",
|
432
|
+
matches: [
|
433
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/agents/[^/]+/flows/[^/]+/versions/[^/]+/?$}, false]
|
434
|
+
]
|
435
|
+
)
|
436
|
+
transcoder.transcode request_pb
|
437
|
+
end
|
438
|
+
|
439
|
+
##
|
440
|
+
# @private
|
441
|
+
#
|
442
|
+
# GRPC transcoding helper method for the compare_versions REST call
|
443
|
+
#
|
444
|
+
# @param request_pb [::Google::Cloud::Dialogflow::CX::V3::CompareVersionsRequest]
|
445
|
+
# A request object representing the call parameters. Required.
|
446
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
447
|
+
# Uri, Body, Query string parameters
|
448
|
+
def self.transcode_compare_versions_request request_pb
|
449
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
450
|
+
.with_bindings(
|
451
|
+
uri_method: :post,
|
452
|
+
uri_template: "/v3/{base_version}:compareVersions",
|
453
|
+
body: "*",
|
454
|
+
matches: [
|
455
|
+
["base_version", %r{^projects/[^/]+/locations/[^/]+/agents/[^/]+/flows/[^/]+/versions/[^/]+/?$}, false]
|
456
|
+
]
|
457
|
+
)
|
458
|
+
transcoder.transcode request_pb
|
459
|
+
end
|
460
|
+
end
|
461
|
+
end
|
462
|
+
end
|
463
|
+
end
|
464
|
+
end
|
465
|
+
end
|
466
|
+
end
|
467
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 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/rest"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/dialogflow/cx/v3/version"
|
24
|
+
require "google/cloud/dialogflow/cx/v3/bindings_override"
|
25
|
+
|
26
|
+
require "google/cloud/dialogflow/cx/v3/versions/credentials"
|
27
|
+
require "google/cloud/dialogflow/cx/v3/versions/paths"
|
28
|
+
require "google/cloud/dialogflow/cx/v3/versions/rest/operations"
|
29
|
+
require "google/cloud/dialogflow/cx/v3/versions/rest/client"
|
30
|
+
|
31
|
+
module Google
|
32
|
+
module Cloud
|
33
|
+
module Dialogflow
|
34
|
+
module CX
|
35
|
+
module V3
|
36
|
+
##
|
37
|
+
# Service for managing {::Google::Cloud::Dialogflow::CX::V3::Version Versions}.
|
38
|
+
#
|
39
|
+
# To load this service and instantiate a REST client:
|
40
|
+
#
|
41
|
+
# require "google/cloud/dialogflow/cx/v3/versions/rest"
|
42
|
+
# client = ::Google::Cloud::Dialogflow::CX::V3::Versions::Rest::Client.new
|
43
|
+
#
|
44
|
+
module Versions
|
45
|
+
# Client for the REST transport
|
46
|
+
module Rest
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
helper_path = ::File.join __dir__, "rest", "helpers.rb"
|
56
|
+
require "google/cloud/dialogflow/cx/v3/versions/rest/helpers" if ::File.file? helper_path
|
@@ -26,6 +26,7 @@ require "google/cloud/dialogflow/cx/v3/versions/credentials"
|
|
26
26
|
require "google/cloud/dialogflow/cx/v3/versions/paths"
|
27
27
|
require "google/cloud/dialogflow/cx/v3/versions/operations"
|
28
28
|
require "google/cloud/dialogflow/cx/v3/versions/client"
|
29
|
+
require "google/cloud/dialogflow/cx/v3/versions/rest"
|
29
30
|
|
30
31
|
module Google
|
31
32
|
module Cloud
|
@@ -40,6 +41,11 @@ module Google
|
|
40
41
|
# require "google/cloud/dialogflow/cx/v3/versions"
|
41
42
|
# client = ::Google::Cloud::Dialogflow::CX::V3::Versions::Client.new
|
42
43
|
#
|
44
|
+
# @example Load this service and instantiate a REST client
|
45
|
+
#
|
46
|
+
# require "google/cloud/dialogflow/cx/v3/versions/rest"
|
47
|
+
# client = ::Google::Cloud::Dialogflow::CX::V3::Versions::Rest::Client.new
|
48
|
+
#
|
43
49
|
module Versions
|
44
50
|
end
|
45
51
|
end
|
@@ -659,9 +659,9 @@ module Google
|
|
659
659
|
# * (`String`) The path to a service account key file in JSON format
|
660
660
|
# * (`Hash`) A service account key as a Hash
|
661
661
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
662
|
-
# (see the [googleauth docs](https://
|
662
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
663
663
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
664
|
-
# (see the [signet docs](https://
|
664
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
665
665
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
666
666
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
667
667
|
# * (`nil`) indicating no credentials
|