google-cloud-dialogflow-v2 0.4.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +6 -6
- data/README.md +1 -1
- data/lib/google/cloud/dialogflow/v2.rb +2 -1
- data/lib/google/cloud/dialogflow/v2/agents.rb +5 -5
- data/lib/google/cloud/dialogflow/v2/agents/client.rb +212 -207
- data/lib/google/cloud/dialogflow/v2/agents/credentials.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/agents/operations.rb +109 -103
- data/lib/google/cloud/dialogflow/v2/agents/paths.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/contexts.rb +3 -3
- data/lib/google/cloud/dialogflow/v2/contexts/client.rb +148 -143
- data/lib/google/cloud/dialogflow/v2/contexts/credentials.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/contexts/paths.rb +14 -14
- data/lib/google/cloud/dialogflow/v2/entity_types.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +238 -233
- data/lib/google/cloud/dialogflow/v2/entity_types/credentials.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +109 -103
- data/lib/google/cloud/dialogflow/v2/entity_types/paths.rb +3 -3
- data/lib/google/cloud/dialogflow/v2/environment_pb.rb +51 -0
- data/lib/google/cloud/dialogflow/v2/environment_services_pb.rb +45 -0
- data/lib/google/cloud/dialogflow/v2/environments.rb +49 -0
- data/lib/google/cloud/dialogflow/v2/environments/client.rb +384 -0
- data/lib/google/cloud/dialogflow/v2/environments/credentials.rb +52 -0
- data/lib/google/cloud/dialogflow/v2/environments/paths.rb +47 -0
- data/lib/google/cloud/dialogflow/v2/intents.rb +3 -3
- data/lib/google/cloud/dialogflow/v2/intents/client.rb +183 -178
- data/lib/google/cloud/dialogflow/v2/intents/credentials.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/intents/operations.rb +109 -103
- data/lib/google/cloud/dialogflow/v2/intents/paths.rb +11 -11
- data/lib/google/cloud/dialogflow/v2/session_entity_types.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +130 -125
- data/lib/google/cloud/dialogflow/v2/session_entity_types/credentials.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/session_entity_types/paths.rb +14 -14
- data/lib/google/cloud/dialogflow/v2/sessions.rb +3 -3
- data/lib/google/cloud/dialogflow/v2/sessions/client.rb +86 -81
- data/lib/google/cloud/dialogflow/v2/sessions/credentials.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/sessions/paths.rb +22 -22
- data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
- data/proto_docs/google/api/resource.rb +12 -12
- data/proto_docs/google/cloud/dialogflow/v2/agent.rb +69 -69
- data/proto_docs/google/cloud/dialogflow/v2/audio_config.rb +45 -44
- data/proto_docs/google/cloud/dialogflow/v2/context.rb +38 -38
- data/proto_docs/google/cloud/dialogflow/v2/entity_type.rb +86 -86
- data/proto_docs/google/cloud/dialogflow/v2/environment.rb +103 -0
- data/proto_docs/google/cloud/dialogflow/v2/intent.rb +251 -250
- data/proto_docs/google/cloud/dialogflow/v2/session.rb +114 -106
- data/proto_docs/google/cloud/dialogflow/v2/session_entity_type.rb +35 -35
- data/proto_docs/google/cloud/dialogflow/v2/validation_result.rb +8 -8
- data/proto_docs/google/cloud/dialogflow/v2/webhook.rb +43 -36
- data/proto_docs/google/longrunning/operations.rb +30 -30
- data/proto_docs/google/protobuf/any.rb +4 -4
- data/proto_docs/google/protobuf/duration.rb +4 -4
- data/proto_docs/google/protobuf/empty.rb +2 -2
- data/proto_docs/google/protobuf/field_mask.rb +3 -3
- data/proto_docs/google/protobuf/struct.rb +18 -18
- data/proto_docs/google/protobuf/timestamp.rb +120 -0
- data/proto_docs/google/rpc/status.rb +6 -6
- data/proto_docs/google/type/latlng.rb +4 -4
- metadata +41 -6
- data/lib/google/cloud/common_resources_pb.rb +0 -15
@@ -33,7 +33,7 @@ module Google
|
|
33
33
|
#
|
34
34
|
# @param project [String]
|
35
35
|
#
|
36
|
-
# @return [String]
|
36
|
+
# @return [::String]
|
37
37
|
def agent_path project:
|
38
38
|
"projects/#{project}/agent"
|
39
39
|
end
|
@@ -47,7 +47,7 @@ module Google
|
|
47
47
|
#
|
48
48
|
# @param project [String]
|
49
49
|
#
|
50
|
-
# @return [String]
|
50
|
+
# @return [::String]
|
51
51
|
def project_path project:
|
52
52
|
"projects/#{project}"
|
53
53
|
end
|
@@ -39,8 +39,8 @@ module Google
|
|
39
39
|
# geographic location, and so on.
|
40
40
|
#
|
41
41
|
# You can include contexts as input parameters of a
|
42
|
-
# {Google::Cloud::Dialogflow::V2::Sessions::Client#detect_intent DetectIntent} (or
|
43
|
-
# {Google::Cloud::Dialogflow::V2::Sessions::Client#streaming_detect_intent StreamingDetectIntent}) request,
|
42
|
+
# {::Google::Cloud::Dialogflow::V2::Sessions::Client#detect_intent DetectIntent} (or
|
43
|
+
# {::Google::Cloud::Dialogflow::V2::Sessions::Client#streaming_detect_intent StreamingDetectIntent}) request,
|
44
44
|
# or as output contexts included in the returned intent.
|
45
45
|
# Contexts expire when an intent is matched, after the number of `DetectIntent`
|
46
46
|
# requests specified by the `lifespan_count` parameter, or after 20 minutes
|
@@ -53,7 +53,7 @@ module Google
|
|
53
53
|
# To load this service and instantiate a client:
|
54
54
|
#
|
55
55
|
# require "google/cloud/dialogflow/v2/contexts"
|
56
|
-
# client = Google::Cloud::Dialogflow::V2::Contexts::Client.new
|
56
|
+
# client = ::Google::Cloud::Dialogflow::V2::Contexts::Client.new
|
57
57
|
#
|
58
58
|
module Contexts
|
59
59
|
end
|
@@ -35,8 +35,8 @@ module Google
|
|
35
35
|
# geographic location, and so on.
|
36
36
|
#
|
37
37
|
# You can include contexts as input parameters of a
|
38
|
-
# {Google::Cloud::Dialogflow::V2::Sessions::Client#detect_intent DetectIntent} (or
|
39
|
-
# {Google::Cloud::Dialogflow::V2::Sessions::Client#streaming_detect_intent StreamingDetectIntent}) request,
|
38
|
+
# {::Google::Cloud::Dialogflow::V2::Sessions::Client#detect_intent DetectIntent} (or
|
39
|
+
# {::Google::Cloud::Dialogflow::V2::Sessions::Client#streaming_detect_intent StreamingDetectIntent}) request,
|
40
40
|
# or as output contexts included in the returned intent.
|
41
41
|
# Contexts expire when an intent is matched, after the number of `DetectIntent`
|
42
42
|
# requests specified by the `lifespan_count` parameter, or after 20 minutes
|
@@ -55,15 +55,15 @@ module Google
|
|
55
55
|
##
|
56
56
|
# Configure the Contexts Client class.
|
57
57
|
#
|
58
|
-
# See {Google::Cloud::Dialogflow::V2::Contexts::Client::Configuration}
|
58
|
+
# See {::Google::Cloud::Dialogflow::V2::Contexts::Client::Configuration}
|
59
59
|
# for a description of the configuration fields.
|
60
60
|
#
|
61
61
|
# ## Example
|
62
62
|
#
|
63
63
|
# To modify the configuration for all Contexts clients:
|
64
64
|
#
|
65
|
-
# Google::Cloud::Dialogflow::V2::Contexts::Client.configure do |config|
|
66
|
-
# config.timeout =
|
65
|
+
# ::Google::Cloud::Dialogflow::V2::Contexts::Client.configure do |config|
|
66
|
+
# config.timeout = 10.0
|
67
67
|
# end
|
68
68
|
#
|
69
69
|
# @yield [config] Configure the Client client.
|
@@ -131,7 +131,7 @@ module Google
|
|
131
131
|
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
132
132
|
# should be made on {Client.configure}.
|
133
133
|
#
|
134
|
-
# See {Google::Cloud::Dialogflow::V2::Contexts::Client::Configuration}
|
134
|
+
# See {::Google::Cloud::Dialogflow::V2::Contexts::Client::Configuration}
|
135
135
|
# for a description of the configuration fields.
|
136
136
|
#
|
137
137
|
# @yield [config] Configure the Client client.
|
@@ -152,13 +152,13 @@ module Google
|
|
152
152
|
# To create a new Contexts client with the default
|
153
153
|
# configuration:
|
154
154
|
#
|
155
|
-
# client = Google::Cloud::Dialogflow::V2::Contexts::Client.new
|
155
|
+
# client = ::Google::Cloud::Dialogflow::V2::Contexts::Client.new
|
156
156
|
#
|
157
157
|
# To create a new Contexts client with a custom
|
158
158
|
# configuration:
|
159
159
|
#
|
160
|
-
# client = Google::Cloud::Dialogflow::V2::Contexts::Client.new do |config|
|
161
|
-
# config.timeout =
|
160
|
+
# client = ::Google::Cloud::Dialogflow::V2::Contexts::Client.new do |config|
|
161
|
+
# config.timeout = 10.0
|
162
162
|
# end
|
163
163
|
#
|
164
164
|
# @yield [config] Configure the Contexts client.
|
@@ -183,10 +183,11 @@ module Google
|
|
183
183
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
184
184
|
credentials = Credentials.new credentials, scope: @config.scope
|
185
185
|
end
|
186
|
-
@quota_project_id =
|
186
|
+
@quota_project_id = @config.quota_project
|
187
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
187
188
|
|
188
|
-
@contexts_stub = Gapic::ServiceStub.new(
|
189
|
-
Google::Cloud::Dialogflow::V2::Contexts::Stub,
|
189
|
+
@contexts_stub = ::Gapic::ServiceStub.new(
|
190
|
+
::Google::Cloud::Dialogflow::V2::Contexts::Stub,
|
190
191
|
credentials: credentials,
|
191
192
|
endpoint: @config.endpoint,
|
192
193
|
channel_args: @config.channel_args,
|
@@ -201,12 +202,12 @@ module Google
|
|
201
202
|
#
|
202
203
|
# @overload list_contexts(request, options = nil)
|
203
204
|
# Pass arguments to `list_contexts` via a request object, either of type
|
204
|
-
# {Google::Cloud::Dialogflow::V2::ListContextsRequest} or an equivalent Hash.
|
205
|
+
# {::Google::Cloud::Dialogflow::V2::ListContextsRequest} or an equivalent Hash.
|
205
206
|
#
|
206
|
-
# @param request [Google::Cloud::Dialogflow::V2::ListContextsRequest, Hash]
|
207
|
+
# @param request [::Google::Cloud::Dialogflow::V2::ListContextsRequest, ::Hash]
|
207
208
|
# A request object representing the call parameters. Required. To specify no
|
208
209
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
209
|
-
# @param options [Gapic::CallOptions, Hash]
|
210
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
210
211
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
211
212
|
#
|
212
213
|
# @overload list_contexts(parent: nil, page_size: nil, page_token: nil)
|
@@ -214,40 +215,40 @@ module Google
|
|
214
215
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
215
216
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
216
217
|
#
|
217
|
-
# @param parent [String]
|
218
|
+
# @param parent [::String]
|
218
219
|
# Required. The session to list all contexts from.
|
219
220
|
# Format: `projects/<Project ID>/agent/sessions/<Session ID>` or
|
220
221
|
# `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
|
221
222
|
# ID>/sessions/<Session ID>`.
|
222
223
|
# If `Environment ID` is not specified, we assume default 'draft'
|
223
224
|
# environment. If `User ID` is not specified, we assume default '-' user.
|
224
|
-
# @param page_size [Integer]
|
225
|
+
# @param page_size [::Integer]
|
225
226
|
# Optional. The maximum number of items to return in a single page. By
|
226
227
|
# default 100 and at most 1000.
|
227
|
-
# @param page_token [String]
|
228
|
+
# @param page_token [::String]
|
228
229
|
# Optional. The next_page_token value returned from a previous list request.
|
229
230
|
#
|
230
231
|
# @yield [response, operation] Access the result along with the RPC operation
|
231
|
-
# @yieldparam response [Gapic::PagedEnumerable
|
232
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
232
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::V2::Context>]
|
233
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
233
234
|
#
|
234
|
-
# @return [Gapic::PagedEnumerable
|
235
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::V2::Context>]
|
235
236
|
#
|
236
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
237
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
237
238
|
#
|
238
239
|
def list_contexts request, options = nil
|
239
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
240
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
240
241
|
|
241
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::ListContextsRequest
|
242
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::ListContextsRequest
|
242
243
|
|
243
244
|
# Converts hash and nil to an options object
|
244
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
245
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
245
246
|
|
246
247
|
# Customize the options with defaults
|
247
248
|
metadata = @config.rpcs.list_contexts.metadata.to_h
|
248
249
|
|
249
250
|
# Set x-goog-api-client and x-goog-user-project headers
|
250
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
251
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
251
252
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
252
253
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
253
254
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -265,12 +266,12 @@ module Google
|
|
265
266
|
retry_policy: @config.retry_policy
|
266
267
|
|
267
268
|
@contexts_stub.call_rpc :list_contexts, request, options: options do |response, operation|
|
268
|
-
response = Gapic::PagedEnumerable.new @contexts_stub, :list_contexts, request, response, operation, options
|
269
|
+
response = ::Gapic::PagedEnumerable.new @contexts_stub, :list_contexts, request, response, operation, options
|
269
270
|
yield response, operation if block_given?
|
270
271
|
return response
|
271
272
|
end
|
272
|
-
rescue GRPC::BadStatus => e
|
273
|
-
raise Google::Cloud::Error.from_error(e)
|
273
|
+
rescue ::GRPC::BadStatus => e
|
274
|
+
raise ::Google::Cloud::Error.from_error(e)
|
274
275
|
end
|
275
276
|
|
276
277
|
##
|
@@ -278,12 +279,12 @@ module Google
|
|
278
279
|
#
|
279
280
|
# @overload get_context(request, options = nil)
|
280
281
|
# Pass arguments to `get_context` via a request object, either of type
|
281
|
-
# {Google::Cloud::Dialogflow::V2::GetContextRequest} or an equivalent Hash.
|
282
|
+
# {::Google::Cloud::Dialogflow::V2::GetContextRequest} or an equivalent Hash.
|
282
283
|
#
|
283
|
-
# @param request [Google::Cloud::Dialogflow::V2::GetContextRequest, Hash]
|
284
|
+
# @param request [::Google::Cloud::Dialogflow::V2::GetContextRequest, ::Hash]
|
284
285
|
# A request object representing the call parameters. Required. To specify no
|
285
286
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
286
|
-
# @param options [Gapic::CallOptions, Hash]
|
287
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
287
288
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
288
289
|
#
|
289
290
|
# @overload get_context(name: nil)
|
@@ -291,7 +292,7 @@ module Google
|
|
291
292
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
292
293
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
293
294
|
#
|
294
|
-
# @param name [String]
|
295
|
+
# @param name [::String]
|
295
296
|
# Required. The name of the context. Format:
|
296
297
|
# `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`
|
297
298
|
# or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
|
@@ -300,26 +301,26 @@ module Google
|
|
300
301
|
# environment. If `User ID` is not specified, we assume default '-' user.
|
301
302
|
#
|
302
303
|
# @yield [response, operation] Access the result along with the RPC operation
|
303
|
-
# @yieldparam response [Google::Cloud::Dialogflow::V2::Context]
|
304
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
304
|
+
# @yieldparam response [::Google::Cloud::Dialogflow::V2::Context]
|
305
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
305
306
|
#
|
306
|
-
# @return [Google::Cloud::Dialogflow::V2::Context]
|
307
|
+
# @return [::Google::Cloud::Dialogflow::V2::Context]
|
307
308
|
#
|
308
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
309
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
309
310
|
#
|
310
311
|
def get_context request, options = nil
|
311
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
312
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
312
313
|
|
313
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::GetContextRequest
|
314
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::GetContextRequest
|
314
315
|
|
315
316
|
# Converts hash and nil to an options object
|
316
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
317
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
317
318
|
|
318
319
|
# Customize the options with defaults
|
319
320
|
metadata = @config.rpcs.get_context.metadata.to_h
|
320
321
|
|
321
322
|
# Set x-goog-api-client and x-goog-user-project headers
|
322
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
323
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
323
324
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
324
325
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
325
326
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -340,8 +341,8 @@ module Google
|
|
340
341
|
yield response, operation if block_given?
|
341
342
|
return response
|
342
343
|
end
|
343
|
-
rescue GRPC::BadStatus => e
|
344
|
-
raise Google::Cloud::Error.from_error(e)
|
344
|
+
rescue ::GRPC::BadStatus => e
|
345
|
+
raise ::Google::Cloud::Error.from_error(e)
|
345
346
|
end
|
346
347
|
|
347
348
|
##
|
@@ -351,12 +352,12 @@ module Google
|
|
351
352
|
#
|
352
353
|
# @overload create_context(request, options = nil)
|
353
354
|
# Pass arguments to `create_context` via a request object, either of type
|
354
|
-
# {Google::Cloud::Dialogflow::V2::CreateContextRequest} or an equivalent Hash.
|
355
|
+
# {::Google::Cloud::Dialogflow::V2::CreateContextRequest} or an equivalent Hash.
|
355
356
|
#
|
356
|
-
# @param request [Google::Cloud::Dialogflow::V2::CreateContextRequest, Hash]
|
357
|
+
# @param request [::Google::Cloud::Dialogflow::V2::CreateContextRequest, ::Hash]
|
357
358
|
# A request object representing the call parameters. Required. To specify no
|
358
359
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
359
|
-
# @param options [Gapic::CallOptions, Hash]
|
360
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
360
361
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
361
362
|
#
|
362
363
|
# @overload create_context(parent: nil, context: nil)
|
@@ -364,37 +365,37 @@ module Google
|
|
364
365
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
365
366
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
366
367
|
#
|
367
|
-
# @param parent [String]
|
368
|
+
# @param parent [::String]
|
368
369
|
# Required. The session to create a context for.
|
369
370
|
# Format: `projects/<Project ID>/agent/sessions/<Session ID>` or
|
370
371
|
# `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
|
371
372
|
# ID>/sessions/<Session ID>`.
|
372
373
|
# If `Environment ID` is not specified, we assume default 'draft'
|
373
374
|
# environment. If `User ID` is not specified, we assume default '-' user.
|
374
|
-
# @param context [Google::Cloud::Dialogflow::V2::Context, Hash]
|
375
|
+
# @param context [::Google::Cloud::Dialogflow::V2::Context, ::Hash]
|
375
376
|
# Required. The context to create.
|
376
377
|
#
|
377
378
|
# @yield [response, operation] Access the result along with the RPC operation
|
378
|
-
# @yieldparam response [Google::Cloud::Dialogflow::V2::Context]
|
379
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
379
|
+
# @yieldparam response [::Google::Cloud::Dialogflow::V2::Context]
|
380
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
380
381
|
#
|
381
|
-
# @return [Google::Cloud::Dialogflow::V2::Context]
|
382
|
+
# @return [::Google::Cloud::Dialogflow::V2::Context]
|
382
383
|
#
|
383
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
384
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
384
385
|
#
|
385
386
|
def create_context request, options = nil
|
386
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
387
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
387
388
|
|
388
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::CreateContextRequest
|
389
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::CreateContextRequest
|
389
390
|
|
390
391
|
# Converts hash and nil to an options object
|
391
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
392
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
392
393
|
|
393
394
|
# Customize the options with defaults
|
394
395
|
metadata = @config.rpcs.create_context.metadata.to_h
|
395
396
|
|
396
397
|
# Set x-goog-api-client and x-goog-user-project headers
|
397
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
398
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
398
399
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
399
400
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
400
401
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -415,8 +416,8 @@ module Google
|
|
415
416
|
yield response, operation if block_given?
|
416
417
|
return response
|
417
418
|
end
|
418
|
-
rescue GRPC::BadStatus => e
|
419
|
-
raise Google::Cloud::Error.from_error(e)
|
419
|
+
rescue ::GRPC::BadStatus => e
|
420
|
+
raise ::Google::Cloud::Error.from_error(e)
|
420
421
|
end
|
421
422
|
|
422
423
|
##
|
@@ -424,12 +425,12 @@ module Google
|
|
424
425
|
#
|
425
426
|
# @overload update_context(request, options = nil)
|
426
427
|
# Pass arguments to `update_context` via a request object, either of type
|
427
|
-
# {Google::Cloud::Dialogflow::V2::UpdateContextRequest} or an equivalent Hash.
|
428
|
+
# {::Google::Cloud::Dialogflow::V2::UpdateContextRequest} or an equivalent Hash.
|
428
429
|
#
|
429
|
-
# @param request [Google::Cloud::Dialogflow::V2::UpdateContextRequest, Hash]
|
430
|
+
# @param request [::Google::Cloud::Dialogflow::V2::UpdateContextRequest, ::Hash]
|
430
431
|
# A request object representing the call parameters. Required. To specify no
|
431
432
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
432
|
-
# @param options [Gapic::CallOptions, Hash]
|
433
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
433
434
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
434
435
|
#
|
435
436
|
# @overload update_context(context: nil, update_mask: nil)
|
@@ -437,32 +438,32 @@ module Google
|
|
437
438
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
438
439
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
439
440
|
#
|
440
|
-
# @param context [Google::Cloud::Dialogflow::V2::Context, Hash]
|
441
|
+
# @param context [::Google::Cloud::Dialogflow::V2::Context, ::Hash]
|
441
442
|
# Required. The context to update.
|
442
|
-
# @param update_mask [Google::Protobuf::FieldMask, Hash]
|
443
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
443
444
|
# Optional. The mask to control which fields get updated.
|
444
445
|
#
|
445
446
|
# @yield [response, operation] Access the result along with the RPC operation
|
446
|
-
# @yieldparam response [Google::Cloud::Dialogflow::V2::Context]
|
447
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
447
|
+
# @yieldparam response [::Google::Cloud::Dialogflow::V2::Context]
|
448
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
448
449
|
#
|
449
|
-
# @return [Google::Cloud::Dialogflow::V2::Context]
|
450
|
+
# @return [::Google::Cloud::Dialogflow::V2::Context]
|
450
451
|
#
|
451
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
452
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
452
453
|
#
|
453
454
|
def update_context request, options = nil
|
454
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
455
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
455
456
|
|
456
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::UpdateContextRequest
|
457
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::UpdateContextRequest
|
457
458
|
|
458
459
|
# Converts hash and nil to an options object
|
459
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
460
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
460
461
|
|
461
462
|
# Customize the options with defaults
|
462
463
|
metadata = @config.rpcs.update_context.metadata.to_h
|
463
464
|
|
464
465
|
# Set x-goog-api-client and x-goog-user-project headers
|
465
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
466
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
466
467
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
467
468
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
468
469
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -483,8 +484,8 @@ module Google
|
|
483
484
|
yield response, operation if block_given?
|
484
485
|
return response
|
485
486
|
end
|
486
|
-
rescue GRPC::BadStatus => e
|
487
|
-
raise Google::Cloud::Error.from_error(e)
|
487
|
+
rescue ::GRPC::BadStatus => e
|
488
|
+
raise ::Google::Cloud::Error.from_error(e)
|
488
489
|
end
|
489
490
|
|
490
491
|
##
|
@@ -492,12 +493,12 @@ module Google
|
|
492
493
|
#
|
493
494
|
# @overload delete_context(request, options = nil)
|
494
495
|
# Pass arguments to `delete_context` via a request object, either of type
|
495
|
-
# {Google::Cloud::Dialogflow::V2::DeleteContextRequest} or an equivalent Hash.
|
496
|
+
# {::Google::Cloud::Dialogflow::V2::DeleteContextRequest} or an equivalent Hash.
|
496
497
|
#
|
497
|
-
# @param request [Google::Cloud::Dialogflow::V2::DeleteContextRequest, Hash]
|
498
|
+
# @param request [::Google::Cloud::Dialogflow::V2::DeleteContextRequest, ::Hash]
|
498
499
|
# A request object representing the call parameters. Required. To specify no
|
499
500
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
500
|
-
# @param options [Gapic::CallOptions, Hash]
|
501
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
501
502
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
502
503
|
#
|
503
504
|
# @overload delete_context(name: nil)
|
@@ -505,7 +506,7 @@ module Google
|
|
505
506
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
506
507
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
507
508
|
#
|
508
|
-
# @param name [String]
|
509
|
+
# @param name [::String]
|
509
510
|
# Required. The name of the context to delete. Format:
|
510
511
|
# `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`
|
511
512
|
# or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
|
@@ -514,26 +515,26 @@ module Google
|
|
514
515
|
# environment. If `User ID` is not specified, we assume default '-' user.
|
515
516
|
#
|
516
517
|
# @yield [response, operation] Access the result along with the RPC operation
|
517
|
-
# @yieldparam response [Google::Protobuf::Empty]
|
518
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
518
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
519
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
519
520
|
#
|
520
|
-
# @return [Google::Protobuf::Empty]
|
521
|
+
# @return [::Google::Protobuf::Empty]
|
521
522
|
#
|
522
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
523
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
523
524
|
#
|
524
525
|
def delete_context request, options = nil
|
525
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
526
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
526
527
|
|
527
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::DeleteContextRequest
|
528
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::DeleteContextRequest
|
528
529
|
|
529
530
|
# Converts hash and nil to an options object
|
530
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
531
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
531
532
|
|
532
533
|
# Customize the options with defaults
|
533
534
|
metadata = @config.rpcs.delete_context.metadata.to_h
|
534
535
|
|
535
536
|
# Set x-goog-api-client and x-goog-user-project headers
|
536
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
537
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
537
538
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
538
539
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
539
540
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -554,8 +555,8 @@ module Google
|
|
554
555
|
yield response, operation if block_given?
|
555
556
|
return response
|
556
557
|
end
|
557
|
-
rescue GRPC::BadStatus => e
|
558
|
-
raise Google::Cloud::Error.from_error(e)
|
558
|
+
rescue ::GRPC::BadStatus => e
|
559
|
+
raise ::Google::Cloud::Error.from_error(e)
|
559
560
|
end
|
560
561
|
|
561
562
|
##
|
@@ -563,12 +564,12 @@ module Google
|
|
563
564
|
#
|
564
565
|
# @overload delete_all_contexts(request, options = nil)
|
565
566
|
# Pass arguments to `delete_all_contexts` via a request object, either of type
|
566
|
-
# {Google::Cloud::Dialogflow::V2::DeleteAllContextsRequest} or an equivalent Hash.
|
567
|
+
# {::Google::Cloud::Dialogflow::V2::DeleteAllContextsRequest} or an equivalent Hash.
|
567
568
|
#
|
568
|
-
# @param request [Google::Cloud::Dialogflow::V2::DeleteAllContextsRequest, Hash]
|
569
|
+
# @param request [::Google::Cloud::Dialogflow::V2::DeleteAllContextsRequest, ::Hash]
|
569
570
|
# A request object representing the call parameters. Required. To specify no
|
570
571
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
571
|
-
# @param options [Gapic::CallOptions, Hash]
|
572
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
572
573
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
573
574
|
#
|
574
575
|
# @overload delete_all_contexts(parent: nil)
|
@@ -576,7 +577,7 @@ module Google
|
|
576
577
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
577
578
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
578
579
|
#
|
579
|
-
# @param parent [String]
|
580
|
+
# @param parent [::String]
|
580
581
|
# Required. The name of the session to delete all contexts from. Format:
|
581
582
|
# `projects/<Project ID>/agent/sessions/<Session ID>` or `projects/<Project
|
582
583
|
# ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session
|
@@ -585,26 +586,26 @@ module Google
|
|
585
586
|
# If `User ID` is not specified, we assume default '-' user.
|
586
587
|
#
|
587
588
|
# @yield [response, operation] Access the result along with the RPC operation
|
588
|
-
# @yieldparam response [Google::Protobuf::Empty]
|
589
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
589
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
590
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
590
591
|
#
|
591
|
-
# @return [Google::Protobuf::Empty]
|
592
|
+
# @return [::Google::Protobuf::Empty]
|
592
593
|
#
|
593
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
594
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
594
595
|
#
|
595
596
|
def delete_all_contexts request, options = nil
|
596
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
597
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
597
598
|
|
598
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::DeleteAllContextsRequest
|
599
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::DeleteAllContextsRequest
|
599
600
|
|
600
601
|
# Converts hash and nil to an options object
|
601
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
602
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
602
603
|
|
603
604
|
# Customize the options with defaults
|
604
605
|
metadata = @config.rpcs.delete_all_contexts.metadata.to_h
|
605
606
|
|
606
607
|
# Set x-goog-api-client and x-goog-user-project headers
|
607
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
608
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
608
609
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
609
610
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
610
611
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -625,8 +626,8 @@ module Google
|
|
625
626
|
yield response, operation if block_given?
|
626
627
|
return response
|
627
628
|
end
|
628
|
-
rescue GRPC::BadStatus => e
|
629
|
-
raise Google::Cloud::Error.from_error(e)
|
629
|
+
rescue ::GRPC::BadStatus => e
|
630
|
+
raise ::Google::Cloud::Error.from_error(e)
|
630
631
|
end
|
631
632
|
|
632
633
|
##
|
@@ -636,7 +637,7 @@ module Google
|
|
636
637
|
# providing control over timeouts, retry behavior, logging, transport
|
637
638
|
# parameters, and other low-level controls. Certain parameters can also be
|
638
639
|
# applied individually to specific RPCs. See
|
639
|
-
# {Google::Cloud::Dialogflow::V2::Contexts::Client::Configuration::Rpcs}
|
640
|
+
# {::Google::Cloud::Dialogflow::V2::Contexts::Client::Configuration::Rpcs}
|
640
641
|
# for a list of RPCs that can be configured independently.
|
641
642
|
#
|
642
643
|
# Configuration can be applied globally to all clients, or to a single client
|
@@ -647,22 +648,22 @@ module Google
|
|
647
648
|
# To modify the global config, setting the timeout for list_contexts
|
648
649
|
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
649
650
|
#
|
650
|
-
# Google::Cloud::Dialogflow::V2::Contexts::Client.configure do |config|
|
651
|
-
# config.timeout =
|
652
|
-
# config.rpcs.list_contexts.timeout =
|
651
|
+
# ::Google::Cloud::Dialogflow::V2::Contexts::Client.configure do |config|
|
652
|
+
# config.timeout = 10.0
|
653
|
+
# config.rpcs.list_contexts.timeout = 20.0
|
653
654
|
# end
|
654
655
|
#
|
655
656
|
# To apply the above configuration only to a new client:
|
656
657
|
#
|
657
|
-
# client = Google::Cloud::Dialogflow::V2::Contexts::Client.new do |config|
|
658
|
-
# config.timeout =
|
659
|
-
# config.rpcs.list_contexts.timeout =
|
658
|
+
# client = ::Google::Cloud::Dialogflow::V2::Contexts::Client.new do |config|
|
659
|
+
# config.timeout = 10.0
|
660
|
+
# config.rpcs.list_contexts.timeout = 20.0
|
660
661
|
# end
|
661
662
|
#
|
662
663
|
# @!attribute [rw] endpoint
|
663
664
|
# The hostname or hostname:port of the service endpoint.
|
664
665
|
# Defaults to `"dialogflow.googleapis.com"`.
|
665
|
-
# @return [String]
|
666
|
+
# @return [::String]
|
666
667
|
# @!attribute [rw] credentials
|
667
668
|
# Credentials to send with calls. You may provide any of the following types:
|
668
669
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -674,29 +675,29 @@ module Google
|
|
674
675
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
675
676
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
676
677
|
# * (`nil`) indicating no credentials
|
677
|
-
# @return [Object]
|
678
|
+
# @return [::Object]
|
678
679
|
# @!attribute [rw] scope
|
679
680
|
# The OAuth scopes
|
680
|
-
# @return [Array
|
681
|
+
# @return [::Array<::String>]
|
681
682
|
# @!attribute [rw] lib_name
|
682
683
|
# The library name as recorded in instrumentation and logging
|
683
|
-
# @return [String]
|
684
|
+
# @return [::String]
|
684
685
|
# @!attribute [rw] lib_version
|
685
686
|
# The library version as recorded in instrumentation and logging
|
686
|
-
# @return [String]
|
687
|
+
# @return [::String]
|
687
688
|
# @!attribute [rw] channel_args
|
688
689
|
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
689
690
|
# `GRPC::Core::Channel` object is provided as the credential.
|
690
|
-
# @return [Hash]
|
691
|
+
# @return [::Hash]
|
691
692
|
# @!attribute [rw] interceptors
|
692
693
|
# An array of interceptors that are run before calls are executed.
|
693
|
-
# @return [Array
|
694
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
694
695
|
# @!attribute [rw] timeout
|
695
|
-
# The call timeout in
|
696
|
-
# @return [Numeric]
|
696
|
+
# The call timeout in seconds.
|
697
|
+
# @return [::Numeric]
|
697
698
|
# @!attribute [rw] metadata
|
698
699
|
# Additional gRPC headers to be sent with the call.
|
699
|
-
# @return [Hash{Symbol
|
700
|
+
# @return [::Hash{::Symbol=>::String}]
|
700
701
|
# @!attribute [rw] retry_policy
|
701
702
|
# The retry policy. The value is a hash with the following keys:
|
702
703
|
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
@@ -704,25 +705,29 @@ module Google
|
|
704
705
|
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
705
706
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
706
707
|
# trigger a retry.
|
707
|
-
# @return [Hash]
|
708
|
+
# @return [::Hash]
|
709
|
+
# @!attribute [rw] quota_project
|
710
|
+
# A separate project against which to charge quota.
|
711
|
+
# @return [::String]
|
708
712
|
#
|
709
713
|
class Configuration
|
710
|
-
extend Gapic::Config
|
714
|
+
extend ::Gapic::Config
|
711
715
|
|
712
|
-
config_attr :endpoint,
|
713
|
-
config_attr :credentials,
|
716
|
+
config_attr :endpoint, "dialogflow.googleapis.com", ::String
|
717
|
+
config_attr :credentials, nil do |value|
|
714
718
|
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
715
719
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
716
720
|
allowed.any? { |klass| klass === value }
|
717
721
|
end
|
718
|
-
config_attr :scope,
|
719
|
-
config_attr :lib_name,
|
720
|
-
config_attr :lib_version,
|
721
|
-
config_attr(:channel_args,
|
722
|
-
config_attr :interceptors,
|
723
|
-
config_attr :timeout,
|
724
|
-
config_attr :metadata,
|
725
|
-
config_attr :retry_policy,
|
722
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
723
|
+
config_attr :lib_name, nil, ::String, nil
|
724
|
+
config_attr :lib_version, nil, ::String, nil
|
725
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
726
|
+
config_attr :interceptors, nil, ::Array, nil
|
727
|
+
config_attr :timeout, nil, ::Numeric, nil
|
728
|
+
config_attr :metadata, nil, ::Hash, nil
|
729
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
730
|
+
config_attr :quota_project, nil, ::String, nil
|
726
731
|
|
727
732
|
# @private
|
728
733
|
def initialize parent_config = nil
|
@@ -738,7 +743,7 @@ module Google
|
|
738
743
|
def rpcs
|
739
744
|
@rpcs ||= begin
|
740
745
|
parent_rpcs = nil
|
741
|
-
parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to?
|
746
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
|
742
747
|
Rpcs.new parent_rpcs
|
743
748
|
end
|
744
749
|
end
|
@@ -763,49 +768,49 @@ module Google
|
|
763
768
|
class Rpcs
|
764
769
|
##
|
765
770
|
# RPC-specific configuration for `list_contexts`
|
766
|
-
# @return [Gapic::Config::Method]
|
771
|
+
# @return [::Gapic::Config::Method]
|
767
772
|
#
|
768
773
|
attr_reader :list_contexts
|
769
774
|
##
|
770
775
|
# RPC-specific configuration for `get_context`
|
771
|
-
# @return [Gapic::Config::Method]
|
776
|
+
# @return [::Gapic::Config::Method]
|
772
777
|
#
|
773
778
|
attr_reader :get_context
|
774
779
|
##
|
775
780
|
# RPC-specific configuration for `create_context`
|
776
|
-
# @return [Gapic::Config::Method]
|
781
|
+
# @return [::Gapic::Config::Method]
|
777
782
|
#
|
778
783
|
attr_reader :create_context
|
779
784
|
##
|
780
785
|
# RPC-specific configuration for `update_context`
|
781
|
-
# @return [Gapic::Config::Method]
|
786
|
+
# @return [::Gapic::Config::Method]
|
782
787
|
#
|
783
788
|
attr_reader :update_context
|
784
789
|
##
|
785
790
|
# RPC-specific configuration for `delete_context`
|
786
|
-
# @return [Gapic::Config::Method]
|
791
|
+
# @return [::Gapic::Config::Method]
|
787
792
|
#
|
788
793
|
attr_reader :delete_context
|
789
794
|
##
|
790
795
|
# RPC-specific configuration for `delete_all_contexts`
|
791
|
-
# @return [Gapic::Config::Method]
|
796
|
+
# @return [::Gapic::Config::Method]
|
792
797
|
#
|
793
798
|
attr_reader :delete_all_contexts
|
794
799
|
|
795
800
|
# @private
|
796
801
|
def initialize parent_rpcs = nil
|
797
802
|
list_contexts_config = parent_rpcs&.list_contexts if parent_rpcs&.respond_to? :list_contexts
|
798
|
-
@list_contexts = Gapic::Config::Method.new list_contexts_config
|
803
|
+
@list_contexts = ::Gapic::Config::Method.new list_contexts_config
|
799
804
|
get_context_config = parent_rpcs&.get_context if parent_rpcs&.respond_to? :get_context
|
800
|
-
@get_context = Gapic::Config::Method.new get_context_config
|
805
|
+
@get_context = ::Gapic::Config::Method.new get_context_config
|
801
806
|
create_context_config = parent_rpcs&.create_context if parent_rpcs&.respond_to? :create_context
|
802
|
-
@create_context = Gapic::Config::Method.new create_context_config
|
807
|
+
@create_context = ::Gapic::Config::Method.new create_context_config
|
803
808
|
update_context_config = parent_rpcs&.update_context if parent_rpcs&.respond_to? :update_context
|
804
|
-
@update_context = Gapic::Config::Method.new update_context_config
|
809
|
+
@update_context = ::Gapic::Config::Method.new update_context_config
|
805
810
|
delete_context_config = parent_rpcs&.delete_context if parent_rpcs&.respond_to? :delete_context
|
806
|
-
@delete_context = Gapic::Config::Method.new delete_context_config
|
811
|
+
@delete_context = ::Gapic::Config::Method.new delete_context_config
|
807
812
|
delete_all_contexts_config = parent_rpcs&.delete_all_contexts if parent_rpcs&.respond_to? :delete_all_contexts
|
808
|
-
@delete_all_contexts = Gapic::Config::Method.new delete_all_contexts_config
|
813
|
+
@delete_all_contexts = ::Gapic::Config::Method.new delete_all_contexts_config
|
809
814
|
|
810
815
|
yield self if block_given?
|
811
816
|
end
|