google-cloud-dialogflow-v2 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +6 -6
  3. data/README.md +1 -1
  4. data/lib/google/cloud/dialogflow/v2.rb +1 -1
  5. data/lib/google/cloud/dialogflow/v2/agents.rb +5 -5
  6. data/lib/google/cloud/dialogflow/v2/agents/client.rb +203 -203
  7. data/lib/google/cloud/dialogflow/v2/agents/credentials.rb +1 -1
  8. data/lib/google/cloud/dialogflow/v2/agents/operations.rb +100 -100
  9. data/lib/google/cloud/dialogflow/v2/agents/paths.rb +2 -2
  10. data/lib/google/cloud/dialogflow/v2/contexts.rb +3 -3
  11. data/lib/google/cloud/dialogflow/v2/contexts/client.rb +139 -139
  12. data/lib/google/cloud/dialogflow/v2/contexts/credentials.rb +1 -1
  13. data/lib/google/cloud/dialogflow/v2/contexts/paths.rb +14 -14
  14. data/lib/google/cloud/dialogflow/v2/entity_types.rb +2 -2
  15. data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +229 -229
  16. data/lib/google/cloud/dialogflow/v2/entity_types/credentials.rb +1 -1
  17. data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +100 -100
  18. data/lib/google/cloud/dialogflow/v2/entity_types/paths.rb +3 -3
  19. data/lib/google/cloud/dialogflow/v2/environments.rb +1 -1
  20. data/lib/google/cloud/dialogflow/v2/environments/client.rb +55 -55
  21. data/lib/google/cloud/dialogflow/v2/environments/credentials.rb +1 -1
  22. data/lib/google/cloud/dialogflow/v2/environments/paths.rb +1 -1
  23. data/lib/google/cloud/dialogflow/v2/intents.rb +3 -3
  24. data/lib/google/cloud/dialogflow/v2/intents/client.rb +174 -174
  25. data/lib/google/cloud/dialogflow/v2/intents/credentials.rb +1 -1
  26. data/lib/google/cloud/dialogflow/v2/intents/operations.rb +100 -100
  27. data/lib/google/cloud/dialogflow/v2/intents/paths.rb +11 -11
  28. data/lib/google/cloud/dialogflow/v2/session_entity_types.rb +1 -1
  29. data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +121 -121
  30. data/lib/google/cloud/dialogflow/v2/session_entity_types/credentials.rb +1 -1
  31. data/lib/google/cloud/dialogflow/v2/session_entity_types/paths.rb +14 -14
  32. data/lib/google/cloud/dialogflow/v2/sessions.rb +3 -3
  33. data/lib/google/cloud/dialogflow/v2/sessions/client.rb +77 -77
  34. data/lib/google/cloud/dialogflow/v2/sessions/credentials.rb +1 -1
  35. data/lib/google/cloud/dialogflow/v2/sessions/paths.rb +22 -22
  36. data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
  37. data/proto_docs/google/api/resource.rb +12 -12
  38. data/proto_docs/google/cloud/dialogflow/v2/agent.rb +69 -69
  39. data/proto_docs/google/cloud/dialogflow/v2/audio_config.rb +45 -44
  40. data/proto_docs/google/cloud/dialogflow/v2/context.rb +38 -38
  41. data/proto_docs/google/cloud/dialogflow/v2/entity_type.rb +86 -86
  42. data/proto_docs/google/cloud/dialogflow/v2/environment.rb +18 -18
  43. data/proto_docs/google/cloud/dialogflow/v2/intent.rb +250 -250
  44. data/proto_docs/google/cloud/dialogflow/v2/session.rb +106 -106
  45. data/proto_docs/google/cloud/dialogflow/v2/session_entity_type.rb +35 -35
  46. data/proto_docs/google/cloud/dialogflow/v2/validation_result.rb +8 -8
  47. data/proto_docs/google/cloud/dialogflow/v2/webhook.rb +27 -27
  48. data/proto_docs/google/longrunning/operations.rb +30 -30
  49. data/proto_docs/google/protobuf/any.rb +4 -4
  50. data/proto_docs/google/protobuf/duration.rb +4 -4
  51. data/proto_docs/google/protobuf/empty.rb +2 -2
  52. data/proto_docs/google/protobuf/field_mask.rb +3 -3
  53. data/proto_docs/google/protobuf/struct.rb +18 -18
  54. data/proto_docs/google/protobuf/timestamp.rb +4 -4
  55. data/proto_docs/google/rpc/status.rb +6 -6
  56. data/proto_docs/google/type/latlng.rb +4 -4
  57. metadata +2 -2
@@ -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
@@ -61,27 +61,27 @@ module Google
61
61
  # @param session [String]
62
62
  # @param context [String]
63
63
  #
64
- # @return [String]
64
+ # @return [::String]
65
65
  def context_path **args
66
66
  resources = {
67
67
  "context:project:session" => (proc do |project:, session:, context:|
68
- raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
69
- raise ArgumentError, "session cannot contain /" if session.to_s.include? "/"
68
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
69
+ raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
70
70
 
71
71
  "projects/#{project}/agent/sessions/#{session}/contexts/#{context}"
72
72
  end),
73
73
  "context:environment:project:session:user" => (proc do |project:, environment:, user:, session:, context:|
74
- raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
75
- raise ArgumentError, "environment cannot contain /" if environment.to_s.include? "/"
76
- raise ArgumentError, "user cannot contain /" if user.to_s.include? "/"
77
- raise ArgumentError, "session cannot contain /" if session.to_s.include? "/"
74
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
75
+ raise ::ArgumentError, "environment cannot contain /" if environment.to_s.include? "/"
76
+ raise ::ArgumentError, "user cannot contain /" if user.to_s.include? "/"
77
+ raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
78
78
 
79
79
  "projects/#{project}/agent/environments/#{environment}/users/#{user}/sessions/#{session}/contexts/#{context}"
80
80
  end)
81
81
  }
82
82
 
83
83
  resource = resources[args.keys.sort.join(":")]
84
- raise ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
84
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
85
85
  resource.call(**args)
86
86
  end
87
87
 
@@ -95,9 +95,9 @@ module Google
95
95
  # @param project [String]
96
96
  # @param intent [String]
97
97
  #
98
- # @return [String]
98
+ # @return [::String]
99
99
  def intent_path project:, intent:
100
- raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
100
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
101
101
 
102
102
  "projects/#{project}/agent/intents/#{intent}"
103
103
  end
@@ -52,7 +52,7 @@ module Google
52
52
  # To load this service and instantiate a client:
53
53
  #
54
54
  # require "google/cloud/dialogflow/v2/session_entity_types"
55
- # client = Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.new
55
+ # client = ::Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.new
56
56
  #
57
57
  module SessionEntityTypes
58
58
  end
@@ -54,15 +54,15 @@ module Google
54
54
  ##
55
55
  # Configure the SessionEntityTypes Client class.
56
56
  #
57
- # See {Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client::Configuration}
57
+ # See {::Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client::Configuration}
58
58
  # for a description of the configuration fields.
59
59
  #
60
60
  # ## Example
61
61
  #
62
62
  # To modify the configuration for all SessionEntityTypes clients:
63
63
  #
64
- # Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.configure do |config|
65
- # config.timeout = 10_000
64
+ # ::Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.configure do |config|
65
+ # config.timeout = 10.0
66
66
  # end
67
67
  #
68
68
  # @yield [config] Configure the Client client.
@@ -122,7 +122,7 @@ module Google
122
122
  # but structural changes (adding new fields, etc.) are not allowed. Structural changes
123
123
  # should be made on {Client.configure}.
124
124
  #
125
- # See {Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client::Configuration}
125
+ # See {::Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client::Configuration}
126
126
  # for a description of the configuration fields.
127
127
  #
128
128
  # @yield [config] Configure the Client client.
@@ -143,13 +143,13 @@ module Google
143
143
  # To create a new SessionEntityTypes client with the default
144
144
  # configuration:
145
145
  #
146
- # client = Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.new
146
+ # client = ::Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.new
147
147
  #
148
148
  # To create a new SessionEntityTypes client with a custom
149
149
  # configuration:
150
150
  #
151
- # client = Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.new do |config|
152
- # config.timeout = 10_000
151
+ # client = ::Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.new do |config|
152
+ # config.timeout = 10.0
153
153
  # end
154
154
  #
155
155
  # @yield [config] Configure the SessionEntityTypes client.
@@ -176,8 +176,8 @@ module Google
176
176
  end
177
177
  @quota_project_id = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil
178
178
 
179
- @session_entity_types_stub = Gapic::ServiceStub.new(
180
- Google::Cloud::Dialogflow::V2::SessionEntityTypes::Stub,
179
+ @session_entity_types_stub = ::Gapic::ServiceStub.new(
180
+ ::Google::Cloud::Dialogflow::V2::SessionEntityTypes::Stub,
181
181
  credentials: credentials,
182
182
  endpoint: @config.endpoint,
183
183
  channel_args: @config.channel_args,
@@ -196,12 +196,12 @@ module Google
196
196
  #
197
197
  # @overload list_session_entity_types(request, options = nil)
198
198
  # Pass arguments to `list_session_entity_types` via a request object, either of type
199
- # {Google::Cloud::Dialogflow::V2::ListSessionEntityTypesRequest} or an equivalent Hash.
199
+ # {::Google::Cloud::Dialogflow::V2::ListSessionEntityTypesRequest} or an equivalent Hash.
200
200
  #
201
- # @param request [Google::Cloud::Dialogflow::V2::ListSessionEntityTypesRequest, Hash]
201
+ # @param request [::Google::Cloud::Dialogflow::V2::ListSessionEntityTypesRequest, ::Hash]
202
202
  # A request object representing the call parameters. Required. To specify no
203
203
  # parameters, or to keep all the default parameter values, pass an empty Hash.
204
- # @param options [Gapic::CallOptions, Hash]
204
+ # @param options [::Gapic::CallOptions, ::Hash]
205
205
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
206
206
  #
207
207
  # @overload list_session_entity_types(parent: nil, page_size: nil, page_token: nil)
@@ -209,40 +209,40 @@ module Google
209
209
  # least one keyword argument is required. To specify no parameters, or to keep all
210
210
  # the default parameter values, pass an empty Hash as a request object (see above).
211
211
  #
212
- # @param parent [String]
212
+ # @param parent [::String]
213
213
  # Required. The session to list all session entity types from.
214
214
  # Format: `projects/<Project ID>/agent/sessions/<Session ID>` or
215
215
  # `projects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/
216
216
  # sessions/<Session ID>`.
217
217
  # If `Environment ID` is not specified, we assume default 'draft'
218
218
  # environment. If `User ID` is not specified, we assume default '-' user.
219
- # @param page_size [Integer]
219
+ # @param page_size [::Integer]
220
220
  # Optional. The maximum number of items to return in a single page. By
221
221
  # default 100 and at most 1000.
222
- # @param page_token [String]
222
+ # @param page_token [::String]
223
223
  # Optional. The next_page_token value returned from a previous list request.
224
224
  #
225
225
  # @yield [response, operation] Access the result along with the RPC operation
226
- # @yieldparam response [Gapic::PagedEnumerable<Google::Cloud::Dialogflow::V2::SessionEntityType>]
227
- # @yieldparam operation [GRPC::ActiveCall::Operation]
226
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::V2::SessionEntityType>]
227
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
228
228
  #
229
- # @return [Gapic::PagedEnumerable<Google::Cloud::Dialogflow::V2::SessionEntityType>]
229
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::V2::SessionEntityType>]
230
230
  #
231
- # @raise [Google::Cloud::Error] if the RPC is aborted.
231
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
232
232
  #
233
233
  def list_session_entity_types request, options = nil
234
- raise ArgumentError, "request must be provided" if request.nil?
234
+ raise ::ArgumentError, "request must be provided" if request.nil?
235
235
 
236
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::ListSessionEntityTypesRequest
236
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::ListSessionEntityTypesRequest
237
237
 
238
238
  # Converts hash and nil to an options object
239
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
239
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
240
240
 
241
241
  # Customize the options with defaults
242
242
  metadata = @config.rpcs.list_session_entity_types.metadata.to_h
243
243
 
244
244
  # Set x-goog-api-client and x-goog-user-project headers
245
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
245
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
246
246
  lib_name: @config.lib_name, lib_version: @config.lib_version,
247
247
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
248
248
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -260,12 +260,12 @@ module Google
260
260
  retry_policy: @config.retry_policy
261
261
 
262
262
  @session_entity_types_stub.call_rpc :list_session_entity_types, request, options: options do |response, operation|
263
- response = Gapic::PagedEnumerable.new @session_entity_types_stub, :list_session_entity_types, request, response, operation, options
263
+ response = ::Gapic::PagedEnumerable.new @session_entity_types_stub, :list_session_entity_types, request, response, operation, options
264
264
  yield response, operation if block_given?
265
265
  return response
266
266
  end
267
- rescue GRPC::BadStatus => e
268
- raise Google::Cloud::Error.from_error(e)
267
+ rescue ::GRPC::BadStatus => e
268
+ raise ::Google::Cloud::Error.from_error(e)
269
269
  end
270
270
 
271
271
  ##
@@ -277,12 +277,12 @@ module Google
277
277
  #
278
278
  # @overload get_session_entity_type(request, options = nil)
279
279
  # Pass arguments to `get_session_entity_type` via a request object, either of type
280
- # {Google::Cloud::Dialogflow::V2::GetSessionEntityTypeRequest} or an equivalent Hash.
280
+ # {::Google::Cloud::Dialogflow::V2::GetSessionEntityTypeRequest} or an equivalent Hash.
281
281
  #
282
- # @param request [Google::Cloud::Dialogflow::V2::GetSessionEntityTypeRequest, Hash]
282
+ # @param request [::Google::Cloud::Dialogflow::V2::GetSessionEntityTypeRequest, ::Hash]
283
283
  # A request object representing the call parameters. Required. To specify no
284
284
  # parameters, or to keep all the default parameter values, pass an empty Hash.
285
- # @param options [Gapic::CallOptions, Hash]
285
+ # @param options [::Gapic::CallOptions, ::Hash]
286
286
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
287
287
  #
288
288
  # @overload get_session_entity_type(name: nil)
@@ -290,7 +290,7 @@ module Google
290
290
  # least one keyword argument is required. To specify no parameters, or to keep all
291
291
  # the default parameter values, pass an empty Hash as a request object (see above).
292
292
  #
293
- # @param name [String]
293
+ # @param name [::String]
294
294
  # Required. The name of the session entity type. Format:
295
295
  # `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
296
296
  # Display Name>` or `projects/<Project ID>/agent/environments/<Environment
@@ -300,26 +300,26 @@ module Google
300
300
  # environment. If `User ID` is not specified, we assume default '-' user.
301
301
  #
302
302
  # @yield [response, operation] Access the result along with the RPC operation
303
- # @yieldparam response [Google::Cloud::Dialogflow::V2::SessionEntityType]
304
- # @yieldparam operation [GRPC::ActiveCall::Operation]
303
+ # @yieldparam response [::Google::Cloud::Dialogflow::V2::SessionEntityType]
304
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
305
305
  #
306
- # @return [Google::Cloud::Dialogflow::V2::SessionEntityType]
306
+ # @return [::Google::Cloud::Dialogflow::V2::SessionEntityType]
307
307
  #
308
- # @raise [Google::Cloud::Error] if the RPC is aborted.
308
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
309
309
  #
310
310
  def get_session_entity_type request, options = nil
311
- raise ArgumentError, "request must be provided" if request.nil?
311
+ raise ::ArgumentError, "request must be provided" if request.nil?
312
312
 
313
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::GetSessionEntityTypeRequest
313
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::GetSessionEntityTypeRequest
314
314
 
315
315
  # Converts hash and nil to an options object
316
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
316
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
317
317
 
318
318
  # Customize the options with defaults
319
319
  metadata = @config.rpcs.get_session_entity_type.metadata.to_h
320
320
 
321
321
  # Set x-goog-api-client and x-goog-user-project headers
322
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
322
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
323
323
  lib_name: @config.lib_name, lib_version: @config.lib_version,
324
324
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
325
325
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -340,8 +340,8 @@ module Google
340
340
  yield response, operation if block_given?
341
341
  return response
342
342
  end
343
- rescue GRPC::BadStatus => e
344
- raise Google::Cloud::Error.from_error(e)
343
+ rescue ::GRPC::BadStatus => e
344
+ raise ::Google::Cloud::Error.from_error(e)
345
345
  end
346
346
 
347
347
  ##
@@ -356,12 +356,12 @@ module Google
356
356
  #
357
357
  # @overload create_session_entity_type(request, options = nil)
358
358
  # Pass arguments to `create_session_entity_type` via a request object, either of type
359
- # {Google::Cloud::Dialogflow::V2::CreateSessionEntityTypeRequest} or an equivalent Hash.
359
+ # {::Google::Cloud::Dialogflow::V2::CreateSessionEntityTypeRequest} or an equivalent Hash.
360
360
  #
361
- # @param request [Google::Cloud::Dialogflow::V2::CreateSessionEntityTypeRequest, Hash]
361
+ # @param request [::Google::Cloud::Dialogflow::V2::CreateSessionEntityTypeRequest, ::Hash]
362
362
  # A request object representing the call parameters. Required. To specify no
363
363
  # parameters, or to keep all the default parameter values, pass an empty Hash.
364
- # @param options [Gapic::CallOptions, Hash]
364
+ # @param options [::Gapic::CallOptions, ::Hash]
365
365
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
366
366
  #
367
367
  # @overload create_session_entity_type(parent: nil, session_entity_type: nil)
@@ -369,37 +369,37 @@ module Google
369
369
  # least one keyword argument is required. To specify no parameters, or to keep all
370
370
  # the default parameter values, pass an empty Hash as a request object (see above).
371
371
  #
372
- # @param parent [String]
372
+ # @param parent [::String]
373
373
  # Required. The session to create a session entity type for.
374
374
  # Format: `projects/<Project ID>/agent/sessions/<Session ID>` or
375
375
  # `projects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/
376
376
  # sessions/<Session ID>`.
377
377
  # If `Environment ID` is not specified, we assume default 'draft'
378
378
  # environment. If `User ID` is not specified, we assume default '-' user.
379
- # @param session_entity_type [Google::Cloud::Dialogflow::V2::SessionEntityType, Hash]
379
+ # @param session_entity_type [::Google::Cloud::Dialogflow::V2::SessionEntityType, ::Hash]
380
380
  # Required. The session entity type to create.
381
381
  #
382
382
  # @yield [response, operation] Access the result along with the RPC operation
383
- # @yieldparam response [Google::Cloud::Dialogflow::V2::SessionEntityType]
384
- # @yieldparam operation [GRPC::ActiveCall::Operation]
383
+ # @yieldparam response [::Google::Cloud::Dialogflow::V2::SessionEntityType]
384
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
385
385
  #
386
- # @return [Google::Cloud::Dialogflow::V2::SessionEntityType]
386
+ # @return [::Google::Cloud::Dialogflow::V2::SessionEntityType]
387
387
  #
388
- # @raise [Google::Cloud::Error] if the RPC is aborted.
388
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
389
389
  #
390
390
  def create_session_entity_type request, options = nil
391
- raise ArgumentError, "request must be provided" if request.nil?
391
+ raise ::ArgumentError, "request must be provided" if request.nil?
392
392
 
393
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::CreateSessionEntityTypeRequest
393
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::CreateSessionEntityTypeRequest
394
394
 
395
395
  # Converts hash and nil to an options object
396
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
396
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
397
397
 
398
398
  # Customize the options with defaults
399
399
  metadata = @config.rpcs.create_session_entity_type.metadata.to_h
400
400
 
401
401
  # Set x-goog-api-client and x-goog-user-project headers
402
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
402
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
403
403
  lib_name: @config.lib_name, lib_version: @config.lib_version,
404
404
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
405
405
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -420,8 +420,8 @@ module Google
420
420
  yield response, operation if block_given?
421
421
  return response
422
422
  end
423
- rescue GRPC::BadStatus => e
424
- raise Google::Cloud::Error.from_error(e)
423
+ rescue ::GRPC::BadStatus => e
424
+ raise ::Google::Cloud::Error.from_error(e)
425
425
  end
426
426
 
427
427
  ##
@@ -433,12 +433,12 @@ module Google
433
433
  #
434
434
  # @overload update_session_entity_type(request, options = nil)
435
435
  # Pass arguments to `update_session_entity_type` via a request object, either of type
436
- # {Google::Cloud::Dialogflow::V2::UpdateSessionEntityTypeRequest} or an equivalent Hash.
436
+ # {::Google::Cloud::Dialogflow::V2::UpdateSessionEntityTypeRequest} or an equivalent Hash.
437
437
  #
438
- # @param request [Google::Cloud::Dialogflow::V2::UpdateSessionEntityTypeRequest, Hash]
438
+ # @param request [::Google::Cloud::Dialogflow::V2::UpdateSessionEntityTypeRequest, ::Hash]
439
439
  # A request object representing the call parameters. Required. To specify no
440
440
  # parameters, or to keep all the default parameter values, pass an empty Hash.
441
- # @param options [Gapic::CallOptions, Hash]
441
+ # @param options [::Gapic::CallOptions, ::Hash]
442
442
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
443
443
  #
444
444
  # @overload update_session_entity_type(session_entity_type: nil, update_mask: nil)
@@ -446,32 +446,32 @@ module Google
446
446
  # least one keyword argument is required. To specify no parameters, or to keep all
447
447
  # the default parameter values, pass an empty Hash as a request object (see above).
448
448
  #
449
- # @param session_entity_type [Google::Cloud::Dialogflow::V2::SessionEntityType, Hash]
449
+ # @param session_entity_type [::Google::Cloud::Dialogflow::V2::SessionEntityType, ::Hash]
450
450
  # Required. The session entity type to update.
451
- # @param update_mask [Google::Protobuf::FieldMask, Hash]
451
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
452
452
  # Optional. The mask to control which fields get updated.
453
453
  #
454
454
  # @yield [response, operation] Access the result along with the RPC operation
455
- # @yieldparam response [Google::Cloud::Dialogflow::V2::SessionEntityType]
456
- # @yieldparam operation [GRPC::ActiveCall::Operation]
455
+ # @yieldparam response [::Google::Cloud::Dialogflow::V2::SessionEntityType]
456
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
457
457
  #
458
- # @return [Google::Cloud::Dialogflow::V2::SessionEntityType]
458
+ # @return [::Google::Cloud::Dialogflow::V2::SessionEntityType]
459
459
  #
460
- # @raise [Google::Cloud::Error] if the RPC is aborted.
460
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
461
461
  #
462
462
  def update_session_entity_type request, options = nil
463
- raise ArgumentError, "request must be provided" if request.nil?
463
+ raise ::ArgumentError, "request must be provided" if request.nil?
464
464
 
465
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::UpdateSessionEntityTypeRequest
465
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::UpdateSessionEntityTypeRequest
466
466
 
467
467
  # Converts hash and nil to an options object
468
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
468
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
469
469
 
470
470
  # Customize the options with defaults
471
471
  metadata = @config.rpcs.update_session_entity_type.metadata.to_h
472
472
 
473
473
  # Set x-goog-api-client and x-goog-user-project headers
474
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
474
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
475
475
  lib_name: @config.lib_name, lib_version: @config.lib_version,
476
476
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
477
477
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -492,8 +492,8 @@ module Google
492
492
  yield response, operation if block_given?
493
493
  return response
494
494
  end
495
- rescue GRPC::BadStatus => e
496
- raise Google::Cloud::Error.from_error(e)
495
+ rescue ::GRPC::BadStatus => e
496
+ raise ::Google::Cloud::Error.from_error(e)
497
497
  end
498
498
 
499
499
  ##
@@ -505,12 +505,12 @@ module Google
505
505
  #
506
506
  # @overload delete_session_entity_type(request, options = nil)
507
507
  # Pass arguments to `delete_session_entity_type` via a request object, either of type
508
- # {Google::Cloud::Dialogflow::V2::DeleteSessionEntityTypeRequest} or an equivalent Hash.
508
+ # {::Google::Cloud::Dialogflow::V2::DeleteSessionEntityTypeRequest} or an equivalent Hash.
509
509
  #
510
- # @param request [Google::Cloud::Dialogflow::V2::DeleteSessionEntityTypeRequest, Hash]
510
+ # @param request [::Google::Cloud::Dialogflow::V2::DeleteSessionEntityTypeRequest, ::Hash]
511
511
  # A request object representing the call parameters. Required. To specify no
512
512
  # parameters, or to keep all the default parameter values, pass an empty Hash.
513
- # @param options [Gapic::CallOptions, Hash]
513
+ # @param options [::Gapic::CallOptions, ::Hash]
514
514
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
515
515
  #
516
516
  # @overload delete_session_entity_type(name: nil)
@@ -518,7 +518,7 @@ module Google
518
518
  # least one keyword argument is required. To specify no parameters, or to keep all
519
519
  # the default parameter values, pass an empty Hash as a request object (see above).
520
520
  #
521
- # @param name [String]
521
+ # @param name [::String]
522
522
  # Required. The name of the entity type to delete. Format:
523
523
  # `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
524
524
  # Display Name>` or `projects/<Project ID>/agent/environments/<Environment
@@ -528,26 +528,26 @@ module Google
528
528
  # environment. If `User ID` is not specified, we assume default '-' user.
529
529
  #
530
530
  # @yield [response, operation] Access the result along with the RPC operation
531
- # @yieldparam response [Google::Protobuf::Empty]
532
- # @yieldparam operation [GRPC::ActiveCall::Operation]
531
+ # @yieldparam response [::Google::Protobuf::Empty]
532
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
533
533
  #
534
- # @return [Google::Protobuf::Empty]
534
+ # @return [::Google::Protobuf::Empty]
535
535
  #
536
- # @raise [Google::Cloud::Error] if the RPC is aborted.
536
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
537
537
  #
538
538
  def delete_session_entity_type request, options = nil
539
- raise ArgumentError, "request must be provided" if request.nil?
539
+ raise ::ArgumentError, "request must be provided" if request.nil?
540
540
 
541
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::DeleteSessionEntityTypeRequest
541
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::DeleteSessionEntityTypeRequest
542
542
 
543
543
  # Converts hash and nil to an options object
544
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
544
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
545
545
 
546
546
  # Customize the options with defaults
547
547
  metadata = @config.rpcs.delete_session_entity_type.metadata.to_h
548
548
 
549
549
  # Set x-goog-api-client and x-goog-user-project headers
550
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
550
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
551
551
  lib_name: @config.lib_name, lib_version: @config.lib_version,
552
552
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
553
553
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -568,8 +568,8 @@ module Google
568
568
  yield response, operation if block_given?
569
569
  return response
570
570
  end
571
- rescue GRPC::BadStatus => e
572
- raise Google::Cloud::Error.from_error(e)
571
+ rescue ::GRPC::BadStatus => e
572
+ raise ::Google::Cloud::Error.from_error(e)
573
573
  end
574
574
 
575
575
  ##
@@ -579,7 +579,7 @@ module Google
579
579
  # providing control over timeouts, retry behavior, logging, transport
580
580
  # parameters, and other low-level controls. Certain parameters can also be
581
581
  # applied individually to specific RPCs. See
582
- # {Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client::Configuration::Rpcs}
582
+ # {::Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client::Configuration::Rpcs}
583
583
  # for a list of RPCs that can be configured independently.
584
584
  #
585
585
  # Configuration can be applied globally to all clients, or to a single client
@@ -590,22 +590,22 @@ module Google
590
590
  # To modify the global config, setting the timeout for list_session_entity_types
591
591
  # to 20 seconds, and all remaining timeouts to 10 seconds:
592
592
  #
593
- # Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.configure do |config|
594
- # config.timeout = 10_000
595
- # config.rpcs.list_session_entity_types.timeout = 20_000
593
+ # ::Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.configure do |config|
594
+ # config.timeout = 10.0
595
+ # config.rpcs.list_session_entity_types.timeout = 20.0
596
596
  # end
597
597
  #
598
598
  # To apply the above configuration only to a new client:
599
599
  #
600
- # client = Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.new do |config|
601
- # config.timeout = 10_000
602
- # config.rpcs.list_session_entity_types.timeout = 20_000
600
+ # client = ::Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.new do |config|
601
+ # config.timeout = 10.0
602
+ # config.rpcs.list_session_entity_types.timeout = 20.0
603
603
  # end
604
604
  #
605
605
  # @!attribute [rw] endpoint
606
606
  # The hostname or hostname:port of the service endpoint.
607
607
  # Defaults to `"dialogflow.googleapis.com"`.
608
- # @return [String]
608
+ # @return [::String]
609
609
  # @!attribute [rw] credentials
610
610
  # Credentials to send with calls. You may provide any of the following types:
611
611
  # * (`String`) The path to a service account key file in JSON format
@@ -617,29 +617,29 @@ module Google
617
617
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
618
618
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
619
619
  # * (`nil`) indicating no credentials
620
- # @return [Object]
620
+ # @return [::Object]
621
621
  # @!attribute [rw] scope
622
622
  # The OAuth scopes
623
- # @return [Array<String>]
623
+ # @return [::Array<::String>]
624
624
  # @!attribute [rw] lib_name
625
625
  # The library name as recorded in instrumentation and logging
626
- # @return [String]
626
+ # @return [::String]
627
627
  # @!attribute [rw] lib_version
628
628
  # The library version as recorded in instrumentation and logging
629
- # @return [String]
629
+ # @return [::String]
630
630
  # @!attribute [rw] channel_args
631
631
  # Extra parameters passed to the gRPC channel. Note: this is ignored if a
632
632
  # `GRPC::Core::Channel` object is provided as the credential.
633
- # @return [Hash]
633
+ # @return [::Hash]
634
634
  # @!attribute [rw] interceptors
635
635
  # An array of interceptors that are run before calls are executed.
636
- # @return [Array<GRPC::ClientInterceptor>]
636
+ # @return [::Array<::GRPC::ClientInterceptor>]
637
637
  # @!attribute [rw] timeout
638
- # The call timeout in milliseconds.
639
- # @return [Numeric]
638
+ # The call timeout in seconds.
639
+ # @return [::Numeric]
640
640
  # @!attribute [rw] metadata
641
641
  # Additional gRPC headers to be sent with the call.
642
- # @return [Hash{Symbol=>String}]
642
+ # @return [::Hash{::Symbol=>::String}]
643
643
  # @!attribute [rw] retry_policy
644
644
  # The retry policy. The value is a hash with the following keys:
645
645
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
@@ -647,10 +647,10 @@ module Google
647
647
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
648
648
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
649
649
  # trigger a retry.
650
- # @return [Hash]
650
+ # @return [::Hash]
651
651
  #
652
652
  class Configuration
653
- extend Gapic::Config
653
+ extend ::Gapic::Config
654
654
 
655
655
  config_attr :endpoint, "dialogflow.googleapis.com", String
656
656
  config_attr :credentials, nil do |value|
@@ -658,14 +658,14 @@ module Google
658
658
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
659
659
  allowed.any? { |klass| klass === value }
660
660
  end
661
- config_attr :scope, nil, String, Array, nil
662
- config_attr :lib_name, nil, String, nil
663
- config_attr :lib_version, nil, String, nil
664
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, Hash, nil)
665
- config_attr :interceptors, nil, Array, nil
666
- config_attr :timeout, nil, Numeric, nil
667
- config_attr :metadata, nil, Hash, nil
668
- config_attr :retry_policy, nil, Hash, Proc, nil
661
+ config_attr :scope, nil, ::String, ::Array, nil
662
+ config_attr :lib_name, nil, ::String, nil
663
+ config_attr :lib_version, nil, ::String, nil
664
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
665
+ config_attr :interceptors, nil, ::Array, nil
666
+ config_attr :timeout, nil, ::Numeric, nil
667
+ config_attr :metadata, nil, ::Hash, nil
668
+ config_attr :retry_policy, nil, ::Hash, Proc, nil
669
669
 
670
670
  # @private
671
671
  def initialize parent_config = nil
@@ -706,42 +706,42 @@ module Google
706
706
  class Rpcs
707
707
  ##
708
708
  # RPC-specific configuration for `list_session_entity_types`
709
- # @return [Gapic::Config::Method]
709
+ # @return [::Gapic::Config::Method]
710
710
  #
711
711
  attr_reader :list_session_entity_types
712
712
  ##
713
713
  # RPC-specific configuration for `get_session_entity_type`
714
- # @return [Gapic::Config::Method]
714
+ # @return [::Gapic::Config::Method]
715
715
  #
716
716
  attr_reader :get_session_entity_type
717
717
  ##
718
718
  # RPC-specific configuration for `create_session_entity_type`
719
- # @return [Gapic::Config::Method]
719
+ # @return [::Gapic::Config::Method]
720
720
  #
721
721
  attr_reader :create_session_entity_type
722
722
  ##
723
723
  # RPC-specific configuration for `update_session_entity_type`
724
- # @return [Gapic::Config::Method]
724
+ # @return [::Gapic::Config::Method]
725
725
  #
726
726
  attr_reader :update_session_entity_type
727
727
  ##
728
728
  # RPC-specific configuration for `delete_session_entity_type`
729
- # @return [Gapic::Config::Method]
729
+ # @return [::Gapic::Config::Method]
730
730
  #
731
731
  attr_reader :delete_session_entity_type
732
732
 
733
733
  # @private
734
734
  def initialize parent_rpcs = nil
735
735
  list_session_entity_types_config = parent_rpcs&.list_session_entity_types if parent_rpcs&.respond_to? :list_session_entity_types
736
- @list_session_entity_types = Gapic::Config::Method.new list_session_entity_types_config
736
+ @list_session_entity_types = ::Gapic::Config::Method.new list_session_entity_types_config
737
737
  get_session_entity_type_config = parent_rpcs&.get_session_entity_type if parent_rpcs&.respond_to? :get_session_entity_type
738
- @get_session_entity_type = Gapic::Config::Method.new get_session_entity_type_config
738
+ @get_session_entity_type = ::Gapic::Config::Method.new get_session_entity_type_config
739
739
  create_session_entity_type_config = parent_rpcs&.create_session_entity_type if parent_rpcs&.respond_to? :create_session_entity_type
740
- @create_session_entity_type = Gapic::Config::Method.new create_session_entity_type_config
740
+ @create_session_entity_type = ::Gapic::Config::Method.new create_session_entity_type_config
741
741
  update_session_entity_type_config = parent_rpcs&.update_session_entity_type if parent_rpcs&.respond_to? :update_session_entity_type
742
- @update_session_entity_type = Gapic::Config::Method.new update_session_entity_type_config
742
+ @update_session_entity_type = ::Gapic::Config::Method.new update_session_entity_type_config
743
743
  delete_session_entity_type_config = parent_rpcs&.delete_session_entity_type if parent_rpcs&.respond_to? :delete_session_entity_type
744
- @delete_session_entity_type = Gapic::Config::Method.new delete_session_entity_type_config
744
+ @delete_session_entity_type = ::Gapic::Config::Method.new delete_session_entity_type_config
745
745
 
746
746
  yield self if block_given?
747
747
  end