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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2fd0a37beaec6518f58e28845a02c6bcdb5367f5c49e5fd7bcc751bfd68a2a79
4
- data.tar.gz: 81aee0a4d1d073605d90b60bee483e02364d0672f07c19884d06296de497b2c2
3
+ metadata.gz: 879998d05704abb133e17f2547d835b3fbba81ce1f8f0ea6bda560869d7b2ce2
4
+ data.tar.gz: 7cb63dc055648fdd47915120a22787e0e7cfaf2fccb064aa173cc7c699c1d788
5
5
  SHA512:
6
- metadata.gz: c054f75f7b922c0cdb216c3c9dba8faca889d859f226ce775c1c665846e452a8c9b3e11c49537ed493f7a6625f694294ce04a31f4c24a4048fdaed6b604bb034
7
- data.tar.gz: dcbdd5a1ab9b8e3e41717df1ac5ffe889338bdcef6047bf401e81c7eebdf55da26b4efaeaed8b32f19f511c859b769df88ae77c7b0b3177e853efc9fecb787a4
6
+ metadata.gz: 195e8765cc54dd7d4d90558e7f0a8aafff5cdd5f6cbdc022aba66f26cf51c28531be15f6e3d9f7434323eb01f8c4d4be5b3683e4b88ae652e51b0e548b863e5e
7
+ data.tar.gz: d6c37dc240a09d8167342c961cca5f0145de13ece15ec033b7f24bf920b1888cbca617f720829c5aed5035f5c1af6fc953f4f914ab28f8d958176bb63714764e
data/AUTHENTICATION.md CHANGED
@@ -27,7 +27,7 @@ export DIALOGFLOW_CREDENTIALS=path/to/keyfile.json
27
27
  ```ruby
28
28
  require "google/cloud/dialogflow/v2"
29
29
 
30
- client = Google::Cloud::Dialogflow::V2::Agents::Client.new
30
+ client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new
31
31
  ```
32
32
 
33
33
  ## Credential Lookup
@@ -64,7 +64,7 @@ containers where writing files is difficult or not encouraged.
64
64
 
65
65
  The environment variables that google-cloud-dialogflow-v2
66
66
  checks for credentials are configured on the service Credentials class (such as
67
- {Google::Cloud::Dialogflow::V2::Agents::Credentials}):
67
+ {::Google::Cloud::Dialogflow::V2::Agents::Credentials}):
68
68
 
69
69
  1. `DIALOGFLOW_CREDENTIALS` - Path to JSON file, or JSON contents
70
70
  2. `DIALOGFLOW_KEYFILE` - Path to JSON file, or JSON contents
@@ -77,7 +77,7 @@ require "google/cloud/dialogflow/v2"
77
77
 
78
78
  ENV["DIALOGFLOW_CREDENTIALS"] = "path/to/keyfile.json"
79
79
 
80
- client = Google::Cloud::Dialogflow::V2::Agents::Client.new
80
+ client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new
81
81
  ```
82
82
 
83
83
  ### Configuration
@@ -88,7 +88,7 @@ environment variables. Either on an individual client initialization:
88
88
  ```ruby
89
89
  require "google/cloud/dialogflow/v2"
90
90
 
91
- client = Google::Cloud::Dialogflow::V2::Agents::Client.new do |config|
91
+ client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new do |config|
92
92
  config.credentials = "path/to/keyfile.json"
93
93
  end
94
94
  ```
@@ -98,11 +98,11 @@ Or configured globally for all clients:
98
98
  ```ruby
99
99
  require "google/cloud/dialogflow/v2"
100
100
 
101
- Google::Cloud::Dialogflow::V2::Agents::Client.configure do |config|
101
+ ::Google::Cloud::Dialogflow::V2::Agents::Client.configure do |config|
102
102
  config.credentials = "path/to/keyfile.json"
103
103
  end
104
104
 
105
- client = Google::Cloud::Dialogflow::V2::Agents::Client.new
105
+ client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new
106
106
  ```
107
107
 
108
108
  ### Cloud SDK
data/README.md CHANGED
@@ -25,7 +25,7 @@ In order to use this library, you first need to go through the following steps:
25
25
  ```ruby
26
26
  require "google/cloud/dialogflow/v2"
27
27
 
28
- client = Google::Cloud::Dialogflow::V2::Agents::Client.new
28
+ client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new
29
29
  request = my_create_request
30
30
  response = client.get_agent request
31
31
  ```
@@ -32,7 +32,7 @@ module Google
32
32
  # To load this package, including all its services, and instantiate a client:
33
33
  #
34
34
  # require "google/cloud/dialogflow/v2"
35
- # client = Google::Cloud::Dialogflow::V2::Agents::Client.new
35
+ # client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new
36
36
  #
37
37
  module V2
38
38
  end
@@ -37,8 +37,8 @@ module Google
37
37
  # in your app, product, or service to determine user intent and respond to the
38
38
  # user in a natural way.
39
39
  #
40
- # After you create an agent, you can add {Google::Cloud::Dialogflow::V2::Intents::Client Intents}, {Google::Cloud::Dialogflow::V2::Contexts::Client Contexts},
41
- # {Google::Cloud::Dialogflow::V2::EntityTypes::Client Entity Types}, {Google::Cloud::Dialogflow::V2::WebhookRequest Webhooks}, and so on to
40
+ # After you create an agent, you can add {::Google::Cloud::Dialogflow::V2::Intents::Client Intents}, {::Google::Cloud::Dialogflow::V2::Contexts::Client Contexts},
41
+ # {::Google::Cloud::Dialogflow::V2::EntityTypes::Client Entity Types}, {::Google::Cloud::Dialogflow::V2::WebhookRequest Webhooks}, and so on to
42
42
  # manage the flow of a conversation and match user input to predefined intents
43
43
  # and actions.
44
44
  #
@@ -48,8 +48,8 @@ module Google
48
48
  # Editions](https://cloud.google.com/dialogflow/docs/editions).
49
49
  #
50
50
  # You can save your agent for backup or versioning by exporting the agent by
51
- # using the {Google::Cloud::Dialogflow::V2::Agents::Client#export_agent ExportAgent} method. You can import a saved
52
- # agent by using the {Google::Cloud::Dialogflow::V2::Agents::Client#import_agent ImportAgent} method.
51
+ # using the {::Google::Cloud::Dialogflow::V2::Agents::Client#export_agent ExportAgent} method. You can import a saved
52
+ # agent by using the {::Google::Cloud::Dialogflow::V2::Agents::Client#import_agent ImportAgent} method.
53
53
  #
54
54
  # Dialogflow provides several
55
55
  # [prebuilt
@@ -64,7 +64,7 @@ module Google
64
64
  # To load this service and instantiate a client:
65
65
  #
66
66
  # require "google/cloud/dialogflow/v2/agents"
67
- # client = Google::Cloud::Dialogflow::V2::Agents::Client.new
67
+ # client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new
68
68
  #
69
69
  module Agents
70
70
  end
@@ -32,8 +32,8 @@ module Google
32
32
  # in your app, product, or service to determine user intent and respond to the
33
33
  # user in a natural way.
34
34
  #
35
- # After you create an agent, you can add {Google::Cloud::Dialogflow::V2::Intents::Client Intents}, {Google::Cloud::Dialogflow::V2::Contexts::Client Contexts},
36
- # {Google::Cloud::Dialogflow::V2::EntityTypes::Client Entity Types}, {Google::Cloud::Dialogflow::V2::WebhookRequest Webhooks}, and so on to
35
+ # After you create an agent, you can add {::Google::Cloud::Dialogflow::V2::Intents::Client Intents}, {::Google::Cloud::Dialogflow::V2::Contexts::Client Contexts},
36
+ # {::Google::Cloud::Dialogflow::V2::EntityTypes::Client Entity Types}, {::Google::Cloud::Dialogflow::V2::WebhookRequest Webhooks}, and so on to
37
37
  # manage the flow of a conversation and match user input to predefined intents
38
38
  # and actions.
39
39
  #
@@ -43,8 +43,8 @@ module Google
43
43
  # Editions](https://cloud.google.com/dialogflow/docs/editions).
44
44
  #
45
45
  # You can save your agent for backup or versioning by exporting the agent by
46
- # using the {Google::Cloud::Dialogflow::V2::Agents::Client#export_agent ExportAgent} method. You can import a saved
47
- # agent by using the {Google::Cloud::Dialogflow::V2::Agents::Client#import_agent ImportAgent} method.
46
+ # using the {::Google::Cloud::Dialogflow::V2::Agents::Client#export_agent ExportAgent} method. You can import a saved
47
+ # agent by using the {::Google::Cloud::Dialogflow::V2::Agents::Client#import_agent ImportAgent} method.
48
48
  #
49
49
  # Dialogflow provides several
50
50
  # [prebuilt
@@ -65,15 +65,15 @@ module Google
65
65
  ##
66
66
  # Configure the Agents Client class.
67
67
  #
68
- # See {Google::Cloud::Dialogflow::V2::Agents::Client::Configuration}
68
+ # See {::Google::Cloud::Dialogflow::V2::Agents::Client::Configuration}
69
69
  # for a description of the configuration fields.
70
70
  #
71
71
  # ## Example
72
72
  #
73
73
  # To modify the configuration for all Agents clients:
74
74
  #
75
- # Google::Cloud::Dialogflow::V2::Agents::Client.configure do |config|
76
- # config.timeout = 10_000
75
+ # ::Google::Cloud::Dialogflow::V2::Agents::Client.configure do |config|
76
+ # config.timeout = 10.0
77
77
  # end
78
78
  #
79
79
  # @yield [config] Configure the Client client.
@@ -163,7 +163,7 @@ module Google
163
163
  # but structural changes (adding new fields, etc.) are not allowed. Structural changes
164
164
  # should be made on {Client.configure}.
165
165
  #
166
- # See {Google::Cloud::Dialogflow::V2::Agents::Client::Configuration}
166
+ # See {::Google::Cloud::Dialogflow::V2::Agents::Client::Configuration}
167
167
  # for a description of the configuration fields.
168
168
  #
169
169
  # @yield [config] Configure the Client client.
@@ -184,13 +184,13 @@ module Google
184
184
  # To create a new Agents client with the default
185
185
  # configuration:
186
186
  #
187
- # client = Google::Cloud::Dialogflow::V2::Agents::Client.new
187
+ # client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new
188
188
  #
189
189
  # To create a new Agents client with a custom
190
190
  # configuration:
191
191
  #
192
- # client = Google::Cloud::Dialogflow::V2::Agents::Client.new do |config|
193
- # config.timeout = 10_000
192
+ # client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new do |config|
193
+ # config.timeout = 10.0
194
194
  # end
195
195
  #
196
196
  # @yield [config] Configure the Agents client.
@@ -222,8 +222,8 @@ module Google
222
222
  config.endpoint = @config.endpoint
223
223
  end
224
224
 
225
- @agents_stub = Gapic::ServiceStub.new(
226
- Google::Cloud::Dialogflow::V2::Agents::Stub,
225
+ @agents_stub = ::Gapic::ServiceStub.new(
226
+ ::Google::Cloud::Dialogflow::V2::Agents::Stub,
227
227
  credentials: credentials,
228
228
  endpoint: @config.endpoint,
229
229
  channel_args: @config.channel_args,
@@ -234,7 +234,7 @@ module Google
234
234
  ##
235
235
  # Get the associated client for long-running operations.
236
236
  #
237
- # @return [Google::Cloud::Dialogflow::V2::Agents::Operations]
237
+ # @return [::Google::Cloud::Dialogflow::V2::Agents::Operations]
238
238
  #
239
239
  attr_reader :operations_client
240
240
 
@@ -245,12 +245,12 @@ module Google
245
245
  #
246
246
  # @overload get_agent(request, options = nil)
247
247
  # Pass arguments to `get_agent` via a request object, either of type
248
- # {Google::Cloud::Dialogflow::V2::GetAgentRequest} or an equivalent Hash.
248
+ # {::Google::Cloud::Dialogflow::V2::GetAgentRequest} or an equivalent Hash.
249
249
  #
250
- # @param request [Google::Cloud::Dialogflow::V2::GetAgentRequest, Hash]
250
+ # @param request [::Google::Cloud::Dialogflow::V2::GetAgentRequest, ::Hash]
251
251
  # A request object representing the call parameters. Required. To specify no
252
252
  # parameters, or to keep all the default parameter values, pass an empty Hash.
253
- # @param options [Gapic::CallOptions, Hash]
253
+ # @param options [::Gapic::CallOptions, ::Hash]
254
254
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
255
255
  #
256
256
  # @overload get_agent(parent: nil)
@@ -258,31 +258,31 @@ module Google
258
258
  # least one keyword argument is required. To specify no parameters, or to keep all
259
259
  # the default parameter values, pass an empty Hash as a request object (see above).
260
260
  #
261
- # @param parent [String]
261
+ # @param parent [::String]
262
262
  # Required. The project that the agent to fetch is associated with.
263
263
  # Format: `projects/<Project ID>`.
264
264
  #
265
265
  # @yield [response, operation] Access the result along with the RPC operation
266
- # @yieldparam response [Google::Cloud::Dialogflow::V2::Agent]
267
- # @yieldparam operation [GRPC::ActiveCall::Operation]
266
+ # @yieldparam response [::Google::Cloud::Dialogflow::V2::Agent]
267
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
268
268
  #
269
- # @return [Google::Cloud::Dialogflow::V2::Agent]
269
+ # @return [::Google::Cloud::Dialogflow::V2::Agent]
270
270
  #
271
- # @raise [Google::Cloud::Error] if the RPC is aborted.
271
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
272
272
  #
273
273
  def get_agent request, options = nil
274
- raise ArgumentError, "request must be provided" if request.nil?
274
+ raise ::ArgumentError, "request must be provided" if request.nil?
275
275
 
276
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::GetAgentRequest
276
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::GetAgentRequest
277
277
 
278
278
  # Converts hash and nil to an options object
279
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
279
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
280
280
 
281
281
  # Customize the options with defaults
282
282
  metadata = @config.rpcs.get_agent.metadata.to_h
283
283
 
284
284
  # Set x-goog-api-client and x-goog-user-project headers
285
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
285
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
286
286
  lib_name: @config.lib_name, lib_version: @config.lib_version,
287
287
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
288
288
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -303,8 +303,8 @@ module Google
303
303
  yield response, operation if block_given?
304
304
  return response
305
305
  end
306
- rescue GRPC::BadStatus => e
307
- raise Google::Cloud::Error.from_error(e)
306
+ rescue ::GRPC::BadStatus => e
307
+ raise ::Google::Cloud::Error.from_error(e)
308
308
  end
309
309
 
310
310
  ##
@@ -312,12 +312,12 @@ module Google
312
312
  #
313
313
  # @overload set_agent(request, options = nil)
314
314
  # Pass arguments to `set_agent` via a request object, either of type
315
- # {Google::Cloud::Dialogflow::V2::SetAgentRequest} or an equivalent Hash.
315
+ # {::Google::Cloud::Dialogflow::V2::SetAgentRequest} or an equivalent Hash.
316
316
  #
317
- # @param request [Google::Cloud::Dialogflow::V2::SetAgentRequest, Hash]
317
+ # @param request [::Google::Cloud::Dialogflow::V2::SetAgentRequest, ::Hash]
318
318
  # A request object representing the call parameters. Required. To specify no
319
319
  # parameters, or to keep all the default parameter values, pass an empty Hash.
320
- # @param options [Gapic::CallOptions, Hash]
320
+ # @param options [::Gapic::CallOptions, ::Hash]
321
321
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
322
322
  #
323
323
  # @overload set_agent(agent: nil, update_mask: nil)
@@ -325,32 +325,32 @@ module Google
325
325
  # least one keyword argument is required. To specify no parameters, or to keep all
326
326
  # the default parameter values, pass an empty Hash as a request object (see above).
327
327
  #
328
- # @param agent [Google::Cloud::Dialogflow::V2::Agent, Hash]
328
+ # @param agent [::Google::Cloud::Dialogflow::V2::Agent, ::Hash]
329
329
  # Required. The agent to update.
330
- # @param update_mask [Google::Protobuf::FieldMask, Hash]
330
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
331
331
  # Optional. The mask to control which fields get updated.
332
332
  #
333
333
  # @yield [response, operation] Access the result along with the RPC operation
334
- # @yieldparam response [Google::Cloud::Dialogflow::V2::Agent]
335
- # @yieldparam operation [GRPC::ActiveCall::Operation]
334
+ # @yieldparam response [::Google::Cloud::Dialogflow::V2::Agent]
335
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
336
336
  #
337
- # @return [Google::Cloud::Dialogflow::V2::Agent]
337
+ # @return [::Google::Cloud::Dialogflow::V2::Agent]
338
338
  #
339
- # @raise [Google::Cloud::Error] if the RPC is aborted.
339
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
340
340
  #
341
341
  def set_agent request, options = nil
342
- raise ArgumentError, "request must be provided" if request.nil?
342
+ raise ::ArgumentError, "request must be provided" if request.nil?
343
343
 
344
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::SetAgentRequest
344
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::SetAgentRequest
345
345
 
346
346
  # Converts hash and nil to an options object
347
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
347
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
348
348
 
349
349
  # Customize the options with defaults
350
350
  metadata = @config.rpcs.set_agent.metadata.to_h
351
351
 
352
352
  # Set x-goog-api-client and x-goog-user-project headers
353
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
353
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
354
354
  lib_name: @config.lib_name, lib_version: @config.lib_version,
355
355
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
356
356
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -371,8 +371,8 @@ module Google
371
371
  yield response, operation if block_given?
372
372
  return response
373
373
  end
374
- rescue GRPC::BadStatus => e
375
- raise Google::Cloud::Error.from_error(e)
374
+ rescue ::GRPC::BadStatus => e
375
+ raise ::Google::Cloud::Error.from_error(e)
376
376
  end
377
377
 
378
378
  ##
@@ -380,12 +380,12 @@ module Google
380
380
  #
381
381
  # @overload delete_agent(request, options = nil)
382
382
  # Pass arguments to `delete_agent` via a request object, either of type
383
- # {Google::Cloud::Dialogflow::V2::DeleteAgentRequest} or an equivalent Hash.
383
+ # {::Google::Cloud::Dialogflow::V2::DeleteAgentRequest} or an equivalent Hash.
384
384
  #
385
- # @param request [Google::Cloud::Dialogflow::V2::DeleteAgentRequest, Hash]
385
+ # @param request [::Google::Cloud::Dialogflow::V2::DeleteAgentRequest, ::Hash]
386
386
  # A request object representing the call parameters. Required. To specify no
387
387
  # parameters, or to keep all the default parameter values, pass an empty Hash.
388
- # @param options [Gapic::CallOptions, Hash]
388
+ # @param options [::Gapic::CallOptions, ::Hash]
389
389
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
390
390
  #
391
391
  # @overload delete_agent(parent: nil)
@@ -393,31 +393,31 @@ module Google
393
393
  # least one keyword argument is required. To specify no parameters, or to keep all
394
394
  # the default parameter values, pass an empty Hash as a request object (see above).
395
395
  #
396
- # @param parent [String]
396
+ # @param parent [::String]
397
397
  # Required. The project that the agent to delete is associated with.
398
398
  # Format: `projects/<Project ID>`.
399
399
  #
400
400
  # @yield [response, operation] Access the result along with the RPC operation
401
- # @yieldparam response [Google::Protobuf::Empty]
402
- # @yieldparam operation [GRPC::ActiveCall::Operation]
401
+ # @yieldparam response [::Google::Protobuf::Empty]
402
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
403
403
  #
404
- # @return [Google::Protobuf::Empty]
404
+ # @return [::Google::Protobuf::Empty]
405
405
  #
406
- # @raise [Google::Cloud::Error] if the RPC is aborted.
406
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
407
407
  #
408
408
  def delete_agent request, options = nil
409
- raise ArgumentError, "request must be provided" if request.nil?
409
+ raise ::ArgumentError, "request must be provided" if request.nil?
410
410
 
411
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::DeleteAgentRequest
411
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::DeleteAgentRequest
412
412
 
413
413
  # Converts hash and nil to an options object
414
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
414
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
415
415
 
416
416
  # Customize the options with defaults
417
417
  metadata = @config.rpcs.delete_agent.metadata.to_h
418
418
 
419
419
  # Set x-goog-api-client and x-goog-user-project headers
420
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
420
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
421
421
  lib_name: @config.lib_name, lib_version: @config.lib_version,
422
422
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
423
423
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -438,8 +438,8 @@ module Google
438
438
  yield response, operation if block_given?
439
439
  return response
440
440
  end
441
- rescue GRPC::BadStatus => e
442
- raise Google::Cloud::Error.from_error(e)
441
+ rescue ::GRPC::BadStatus => e
442
+ raise ::Google::Cloud::Error.from_error(e)
443
443
  end
444
444
 
445
445
  ##
@@ -453,12 +453,12 @@ module Google
453
453
  #
454
454
  # @overload search_agents(request, options = nil)
455
455
  # Pass arguments to `search_agents` via a request object, either of type
456
- # {Google::Cloud::Dialogflow::V2::SearchAgentsRequest} or an equivalent Hash.
456
+ # {::Google::Cloud::Dialogflow::V2::SearchAgentsRequest} or an equivalent Hash.
457
457
  #
458
- # @param request [Google::Cloud::Dialogflow::V2::SearchAgentsRequest, Hash]
458
+ # @param request [::Google::Cloud::Dialogflow::V2::SearchAgentsRequest, ::Hash]
459
459
  # A request object representing the call parameters. Required. To specify no
460
460
  # parameters, or to keep all the default parameter values, pass an empty Hash.
461
- # @param options [Gapic::CallOptions, Hash]
461
+ # @param options [::Gapic::CallOptions, ::Hash]
462
462
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
463
463
  #
464
464
  # @overload search_agents(parent: nil, page_size: nil, page_token: nil)
@@ -466,36 +466,36 @@ module Google
466
466
  # least one keyword argument is required. To specify no parameters, or to keep all
467
467
  # the default parameter values, pass an empty Hash as a request object (see above).
468
468
  #
469
- # @param parent [String]
469
+ # @param parent [::String]
470
470
  # Required. The project to list agents from.
471
471
  # Format: `projects/<Project ID or '-'>`.
472
- # @param page_size [Integer]
472
+ # @param page_size [::Integer]
473
473
  # Optional. The maximum number of items to return in a single page. By
474
474
  # default 100 and at most 1000.
475
- # @param page_token [String]
475
+ # @param page_token [::String]
476
476
  # The next_page_token value returned from a previous list request.
477
477
  #
478
478
  # @yield [response, operation] Access the result along with the RPC operation
479
- # @yieldparam response [Gapic::PagedEnumerable<Google::Cloud::Dialogflow::V2::Agent>]
480
- # @yieldparam operation [GRPC::ActiveCall::Operation]
479
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::V2::Agent>]
480
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
481
481
  #
482
- # @return [Gapic::PagedEnumerable<Google::Cloud::Dialogflow::V2::Agent>]
482
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::V2::Agent>]
483
483
  #
484
- # @raise [Google::Cloud::Error] if the RPC is aborted.
484
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
485
485
  #
486
486
  def search_agents request, options = nil
487
- raise ArgumentError, "request must be provided" if request.nil?
487
+ raise ::ArgumentError, "request must be provided" if request.nil?
488
488
 
489
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::SearchAgentsRequest
489
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::SearchAgentsRequest
490
490
 
491
491
  # Converts hash and nil to an options object
492
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
492
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
493
493
 
494
494
  # Customize the options with defaults
495
495
  metadata = @config.rpcs.search_agents.metadata.to_h
496
496
 
497
497
  # Set x-goog-api-client and x-goog-user-project headers
498
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
498
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
499
499
  lib_name: @config.lib_name, lib_version: @config.lib_version,
500
500
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
501
501
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -513,27 +513,27 @@ module Google
513
513
  retry_policy: @config.retry_policy
514
514
 
515
515
  @agents_stub.call_rpc :search_agents, request, options: options do |response, operation|
516
- response = Gapic::PagedEnumerable.new @agents_stub, :search_agents, request, response, operation, options
516
+ response = ::Gapic::PagedEnumerable.new @agents_stub, :search_agents, request, response, operation, options
517
517
  yield response, operation if block_given?
518
518
  return response
519
519
  end
520
- rescue GRPC::BadStatus => e
521
- raise Google::Cloud::Error.from_error(e)
520
+ rescue ::GRPC::BadStatus => e
521
+ raise ::Google::Cloud::Error.from_error(e)
522
522
  end
523
523
 
524
524
  ##
525
525
  # Trains the specified agent.
526
526
  #
527
- # Operation <response: {Google::Protobuf::Empty google.protobuf.Empty}>
527
+ # Operation <response: {::Google::Protobuf::Empty google.protobuf.Empty}>
528
528
  #
529
529
  # @overload train_agent(request, options = nil)
530
530
  # Pass arguments to `train_agent` via a request object, either of type
531
- # {Google::Cloud::Dialogflow::V2::TrainAgentRequest} or an equivalent Hash.
531
+ # {::Google::Cloud::Dialogflow::V2::TrainAgentRequest} or an equivalent Hash.
532
532
  #
533
- # @param request [Google::Cloud::Dialogflow::V2::TrainAgentRequest, Hash]
533
+ # @param request [::Google::Cloud::Dialogflow::V2::TrainAgentRequest, ::Hash]
534
534
  # A request object representing the call parameters. Required. To specify no
535
535
  # parameters, or to keep all the default parameter values, pass an empty Hash.
536
- # @param options [Gapic::CallOptions, Hash]
536
+ # @param options [::Gapic::CallOptions, ::Hash]
537
537
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
538
538
  #
539
539
  # @overload train_agent(parent: nil)
@@ -541,31 +541,31 @@ module Google
541
541
  # least one keyword argument is required. To specify no parameters, or to keep all
542
542
  # the default parameter values, pass an empty Hash as a request object (see above).
543
543
  #
544
- # @param parent [String]
544
+ # @param parent [::String]
545
545
  # Required. The project that the agent to train is associated with.
546
546
  # Format: `projects/<Project ID>`.
547
547
  #
548
548
  # @yield [response, operation] Access the result along with the RPC operation
549
- # @yieldparam response [Gapic::Operation]
550
- # @yieldparam operation [GRPC::ActiveCall::Operation]
549
+ # @yieldparam response [::Gapic::Operation]
550
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
551
551
  #
552
- # @return [Gapic::Operation]
552
+ # @return [::Gapic::Operation]
553
553
  #
554
- # @raise [Google::Cloud::Error] if the RPC is aborted.
554
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
555
555
  #
556
556
  def train_agent request, options = nil
557
- raise ArgumentError, "request must be provided" if request.nil?
557
+ raise ::ArgumentError, "request must be provided" if request.nil?
558
558
 
559
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::TrainAgentRequest
559
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::TrainAgentRequest
560
560
 
561
561
  # Converts hash and nil to an options object
562
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
562
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
563
563
 
564
564
  # Customize the options with defaults
565
565
  metadata = @config.rpcs.train_agent.metadata.to_h
566
566
 
567
567
  # Set x-goog-api-client and x-goog-user-project headers
568
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
568
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
569
569
  lib_name: @config.lib_name, lib_version: @config.lib_version,
570
570
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
571
571
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -583,27 +583,27 @@ module Google
583
583
  retry_policy: @config.retry_policy
584
584
 
585
585
  @agents_stub.call_rpc :train_agent, request, options: options do |response, operation|
586
- response = Gapic::Operation.new response, @operations_client, options: options
586
+ response = ::Gapic::Operation.new response, @operations_client, options: options
587
587
  yield response, operation if block_given?
588
588
  return response
589
589
  end
590
- rescue GRPC::BadStatus => e
591
- raise Google::Cloud::Error.from_error(e)
590
+ rescue ::GRPC::BadStatus => e
591
+ raise ::Google::Cloud::Error.from_error(e)
592
592
  end
593
593
 
594
594
  ##
595
595
  # Exports the specified agent to a ZIP file.
596
596
  #
597
- # Operation <response: {Google::Cloud::Dialogflow::V2::ExportAgentResponse ExportAgentResponse}>
597
+ # Operation <response: {::Google::Cloud::Dialogflow::V2::ExportAgentResponse ExportAgentResponse}>
598
598
  #
599
599
  # @overload export_agent(request, options = nil)
600
600
  # Pass arguments to `export_agent` via a request object, either of type
601
- # {Google::Cloud::Dialogflow::V2::ExportAgentRequest} or an equivalent Hash.
601
+ # {::Google::Cloud::Dialogflow::V2::ExportAgentRequest} or an equivalent Hash.
602
602
  #
603
- # @param request [Google::Cloud::Dialogflow::V2::ExportAgentRequest, Hash]
603
+ # @param request [::Google::Cloud::Dialogflow::V2::ExportAgentRequest, ::Hash]
604
604
  # A request object representing the call parameters. Required. To specify no
605
605
  # parameters, or to keep all the default parameter values, pass an empty Hash.
606
- # @param options [Gapic::CallOptions, Hash]
606
+ # @param options [::Gapic::CallOptions, ::Hash]
607
607
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
608
608
  #
609
609
  # @overload export_agent(parent: nil, agent_uri: nil)
@@ -611,36 +611,36 @@ module Google
611
611
  # least one keyword argument is required. To specify no parameters, or to keep all
612
612
  # the default parameter values, pass an empty Hash as a request object (see above).
613
613
  #
614
- # @param parent [String]
614
+ # @param parent [::String]
615
615
  # Required. The project that the agent to export is associated with.
616
616
  # Format: `projects/<Project ID>`.
617
- # @param agent_uri [String]
617
+ # @param agent_uri [::String]
618
618
  # Required. The [Google Cloud Storage](https://cloud.google.com/storage/docs/)
619
619
  # URI to export the agent to.
620
620
  # The format of this URI must be `gs://<bucket-name>/<object-name>`.
621
621
  # If left unspecified, the serialized agent is returned inline.
622
622
  #
623
623
  # @yield [response, operation] Access the result along with the RPC operation
624
- # @yieldparam response [Gapic::Operation]
625
- # @yieldparam operation [GRPC::ActiveCall::Operation]
624
+ # @yieldparam response [::Gapic::Operation]
625
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
626
626
  #
627
- # @return [Gapic::Operation]
627
+ # @return [::Gapic::Operation]
628
628
  #
629
- # @raise [Google::Cloud::Error] if the RPC is aborted.
629
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
630
630
  #
631
631
  def export_agent request, options = nil
632
- raise ArgumentError, "request must be provided" if request.nil?
632
+ raise ::ArgumentError, "request must be provided" if request.nil?
633
633
 
634
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::ExportAgentRequest
634
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::ExportAgentRequest
635
635
 
636
636
  # Converts hash and nil to an options object
637
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
637
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
638
638
 
639
639
  # Customize the options with defaults
640
640
  metadata = @config.rpcs.export_agent.metadata.to_h
641
641
 
642
642
  # Set x-goog-api-client and x-goog-user-project headers
643
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
643
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
644
644
  lib_name: @config.lib_name, lib_version: @config.lib_version,
645
645
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
646
646
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -658,12 +658,12 @@ module Google
658
658
  retry_policy: @config.retry_policy
659
659
 
660
660
  @agents_stub.call_rpc :export_agent, request, options: options do |response, operation|
661
- response = Gapic::Operation.new response, @operations_client, options: options
661
+ response = ::Gapic::Operation.new response, @operations_client, options: options
662
662
  yield response, operation if block_given?
663
663
  return response
664
664
  end
665
- rescue GRPC::BadStatus => e
666
- raise Google::Cloud::Error.from_error(e)
665
+ rescue ::GRPC::BadStatus => e
666
+ raise ::Google::Cloud::Error.from_error(e)
667
667
  end
668
668
 
669
669
  ##
@@ -673,16 +673,16 @@ module Google
673
673
  # Intents and entity types with the same name are replaced with the new
674
674
  # versions from ImportAgentRequest.
675
675
  #
676
- # Operation <response: {Google::Protobuf::Empty google.protobuf.Empty}>
676
+ # Operation <response: {::Google::Protobuf::Empty google.protobuf.Empty}>
677
677
  #
678
678
  # @overload import_agent(request, options = nil)
679
679
  # Pass arguments to `import_agent` via a request object, either of type
680
- # {Google::Cloud::Dialogflow::V2::ImportAgentRequest} or an equivalent Hash.
680
+ # {::Google::Cloud::Dialogflow::V2::ImportAgentRequest} or an equivalent Hash.
681
681
  #
682
- # @param request [Google::Cloud::Dialogflow::V2::ImportAgentRequest, Hash]
682
+ # @param request [::Google::Cloud::Dialogflow::V2::ImportAgentRequest, ::Hash]
683
683
  # A request object representing the call parameters. Required. To specify no
684
684
  # parameters, or to keep all the default parameter values, pass an empty Hash.
685
- # @param options [Gapic::CallOptions, Hash]
685
+ # @param options [::Gapic::CallOptions, ::Hash]
686
686
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
687
687
  #
688
688
  # @overload import_agent(parent: nil, agent_uri: nil, agent_content: nil)
@@ -690,36 +690,36 @@ module Google
690
690
  # least one keyword argument is required. To specify no parameters, or to keep all
691
691
  # the default parameter values, pass an empty Hash as a request object (see above).
692
692
  #
693
- # @param parent [String]
693
+ # @param parent [::String]
694
694
  # Required. The project that the agent to import is associated with.
695
695
  # Format: `projects/<Project ID>`.
696
- # @param agent_uri [String]
696
+ # @param agent_uri [::String]
697
697
  # The URI to a Google Cloud Storage file containing the agent to import.
698
698
  # Note: The URI must start with "gs://".
699
- # @param agent_content [String]
699
+ # @param agent_content [::String]
700
700
  # Zip compressed raw byte content for agent.
701
701
  #
702
702
  # @yield [response, operation] Access the result along with the RPC operation
703
- # @yieldparam response [Gapic::Operation]
704
- # @yieldparam operation [GRPC::ActiveCall::Operation]
703
+ # @yieldparam response [::Gapic::Operation]
704
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
705
705
  #
706
- # @return [Gapic::Operation]
706
+ # @return [::Gapic::Operation]
707
707
  #
708
- # @raise [Google::Cloud::Error] if the RPC is aborted.
708
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
709
709
  #
710
710
  def import_agent request, options = nil
711
- raise ArgumentError, "request must be provided" if request.nil?
711
+ raise ::ArgumentError, "request must be provided" if request.nil?
712
712
 
713
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::ImportAgentRequest
713
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::ImportAgentRequest
714
714
 
715
715
  # Converts hash and nil to an options object
716
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
716
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
717
717
 
718
718
  # Customize the options with defaults
719
719
  metadata = @config.rpcs.import_agent.metadata.to_h
720
720
 
721
721
  # Set x-goog-api-client and x-goog-user-project headers
722
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
722
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
723
723
  lib_name: @config.lib_name, lib_version: @config.lib_version,
724
724
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
725
725
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -737,12 +737,12 @@ module Google
737
737
  retry_policy: @config.retry_policy
738
738
 
739
739
  @agents_stub.call_rpc :import_agent, request, options: options do |response, operation|
740
- response = Gapic::Operation.new response, @operations_client, options: options
740
+ response = ::Gapic::Operation.new response, @operations_client, options: options
741
741
  yield response, operation if block_given?
742
742
  return response
743
743
  end
744
- rescue GRPC::BadStatus => e
745
- raise Google::Cloud::Error.from_error(e)
744
+ rescue ::GRPC::BadStatus => e
745
+ raise ::Google::Cloud::Error.from_error(e)
746
746
  end
747
747
 
748
748
  ##
@@ -751,16 +751,16 @@ module Google
751
751
  # Replaces the current agent version with a new one. All the intents and
752
752
  # entity types in the older version are deleted.
753
753
  #
754
- # Operation <response: {Google::Protobuf::Empty google.protobuf.Empty}>
754
+ # Operation <response: {::Google::Protobuf::Empty google.protobuf.Empty}>
755
755
  #
756
756
  # @overload restore_agent(request, options = nil)
757
757
  # Pass arguments to `restore_agent` via a request object, either of type
758
- # {Google::Cloud::Dialogflow::V2::RestoreAgentRequest} or an equivalent Hash.
758
+ # {::Google::Cloud::Dialogflow::V2::RestoreAgentRequest} or an equivalent Hash.
759
759
  #
760
- # @param request [Google::Cloud::Dialogflow::V2::RestoreAgentRequest, Hash]
760
+ # @param request [::Google::Cloud::Dialogflow::V2::RestoreAgentRequest, ::Hash]
761
761
  # A request object representing the call parameters. Required. To specify no
762
762
  # parameters, or to keep all the default parameter values, pass an empty Hash.
763
- # @param options [Gapic::CallOptions, Hash]
763
+ # @param options [::Gapic::CallOptions, ::Hash]
764
764
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
765
765
  #
766
766
  # @overload restore_agent(parent: nil, agent_uri: nil, agent_content: nil)
@@ -768,36 +768,36 @@ module Google
768
768
  # least one keyword argument is required. To specify no parameters, or to keep all
769
769
  # the default parameter values, pass an empty Hash as a request object (see above).
770
770
  #
771
- # @param parent [String]
771
+ # @param parent [::String]
772
772
  # Required. The project that the agent to restore is associated with.
773
773
  # Format: `projects/<Project ID>`.
774
- # @param agent_uri [String]
774
+ # @param agent_uri [::String]
775
775
  # The URI to a Google Cloud Storage file containing the agent to restore.
776
776
  # Note: The URI must start with "gs://".
777
- # @param agent_content [String]
777
+ # @param agent_content [::String]
778
778
  # Zip compressed raw byte content for agent.
779
779
  #
780
780
  # @yield [response, operation] Access the result along with the RPC operation
781
- # @yieldparam response [Gapic::Operation]
782
- # @yieldparam operation [GRPC::ActiveCall::Operation]
781
+ # @yieldparam response [::Gapic::Operation]
782
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
783
783
  #
784
- # @return [Gapic::Operation]
784
+ # @return [::Gapic::Operation]
785
785
  #
786
- # @raise [Google::Cloud::Error] if the RPC is aborted.
786
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
787
787
  #
788
788
  def restore_agent request, options = nil
789
- raise ArgumentError, "request must be provided" if request.nil?
789
+ raise ::ArgumentError, "request must be provided" if request.nil?
790
790
 
791
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::RestoreAgentRequest
791
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::RestoreAgentRequest
792
792
 
793
793
  # Converts hash and nil to an options object
794
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
794
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
795
795
 
796
796
  # Customize the options with defaults
797
797
  metadata = @config.rpcs.restore_agent.metadata.to_h
798
798
 
799
799
  # Set x-goog-api-client and x-goog-user-project headers
800
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
800
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
801
801
  lib_name: @config.lib_name, lib_version: @config.lib_version,
802
802
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
803
803
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -815,12 +815,12 @@ module Google
815
815
  retry_policy: @config.retry_policy
816
816
 
817
817
  @agents_stub.call_rpc :restore_agent, request, options: options do |response, operation|
818
- response = Gapic::Operation.new response, @operations_client, options: options
818
+ response = ::Gapic::Operation.new response, @operations_client, options: options
819
819
  yield response, operation if block_given?
820
820
  return response
821
821
  end
822
- rescue GRPC::BadStatus => e
823
- raise Google::Cloud::Error.from_error(e)
822
+ rescue ::GRPC::BadStatus => e
823
+ raise ::Google::Cloud::Error.from_error(e)
824
824
  end
825
825
 
826
826
  ##
@@ -829,12 +829,12 @@ module Google
829
829
  #
830
830
  # @overload get_validation_result(request, options = nil)
831
831
  # Pass arguments to `get_validation_result` via a request object, either of type
832
- # {Google::Cloud::Dialogflow::V2::GetValidationResultRequest} or an equivalent Hash.
832
+ # {::Google::Cloud::Dialogflow::V2::GetValidationResultRequest} or an equivalent Hash.
833
833
  #
834
- # @param request [Google::Cloud::Dialogflow::V2::GetValidationResultRequest, Hash]
834
+ # @param request [::Google::Cloud::Dialogflow::V2::GetValidationResultRequest, ::Hash]
835
835
  # A request object representing the call parameters. Required. To specify no
836
836
  # parameters, or to keep all the default parameter values, pass an empty Hash.
837
- # @param options [Gapic::CallOptions, Hash]
837
+ # @param options [::Gapic::CallOptions, ::Hash]
838
838
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
839
839
  #
840
840
  # @overload get_validation_result(parent: nil, language_code: nil)
@@ -842,10 +842,10 @@ module Google
842
842
  # least one keyword argument is required. To specify no parameters, or to keep all
843
843
  # the default parameter values, pass an empty Hash as a request object (see above).
844
844
  #
845
- # @param parent [String]
845
+ # @param parent [::String]
846
846
  # Required. The project that the agent is associated with.
847
847
  # Format: `projects/<Project ID>`.
848
- # @param language_code [String]
848
+ # @param language_code [::String]
849
849
  # Optional. The language for which you want a validation result. If not
850
850
  # specified, the agent's default language is used. [Many
851
851
  # languages](https://cloud.google.com/dialogflow/docs/reference/language)
@@ -853,26 +853,26 @@ module Google
853
853
  # be used.
854
854
  #
855
855
  # @yield [response, operation] Access the result along with the RPC operation
856
- # @yieldparam response [Google::Cloud::Dialogflow::V2::ValidationResult]
857
- # @yieldparam operation [GRPC::ActiveCall::Operation]
856
+ # @yieldparam response [::Google::Cloud::Dialogflow::V2::ValidationResult]
857
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
858
858
  #
859
- # @return [Google::Cloud::Dialogflow::V2::ValidationResult]
859
+ # @return [::Google::Cloud::Dialogflow::V2::ValidationResult]
860
860
  #
861
- # @raise [Google::Cloud::Error] if the RPC is aborted.
861
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
862
862
  #
863
863
  def get_validation_result request, options = nil
864
- raise ArgumentError, "request must be provided" if request.nil?
864
+ raise ::ArgumentError, "request must be provided" if request.nil?
865
865
 
866
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::GetValidationResultRequest
866
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::GetValidationResultRequest
867
867
 
868
868
  # Converts hash and nil to an options object
869
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
869
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
870
870
 
871
871
  # Customize the options with defaults
872
872
  metadata = @config.rpcs.get_validation_result.metadata.to_h
873
873
 
874
874
  # Set x-goog-api-client and x-goog-user-project headers
875
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
875
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
876
876
  lib_name: @config.lib_name, lib_version: @config.lib_version,
877
877
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
878
878
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -893,8 +893,8 @@ module Google
893
893
  yield response, operation if block_given?
894
894
  return response
895
895
  end
896
- rescue GRPC::BadStatus => e
897
- raise Google::Cloud::Error.from_error(e)
896
+ rescue ::GRPC::BadStatus => e
897
+ raise ::Google::Cloud::Error.from_error(e)
898
898
  end
899
899
 
900
900
  ##
@@ -904,7 +904,7 @@ module Google
904
904
  # providing control over timeouts, retry behavior, logging, transport
905
905
  # parameters, and other low-level controls. Certain parameters can also be
906
906
  # applied individually to specific RPCs. See
907
- # {Google::Cloud::Dialogflow::V2::Agents::Client::Configuration::Rpcs}
907
+ # {::Google::Cloud::Dialogflow::V2::Agents::Client::Configuration::Rpcs}
908
908
  # for a list of RPCs that can be configured independently.
909
909
  #
910
910
  # Configuration can be applied globally to all clients, or to a single client
@@ -915,22 +915,22 @@ module Google
915
915
  # To modify the global config, setting the timeout for get_agent
916
916
  # to 20 seconds, and all remaining timeouts to 10 seconds:
917
917
  #
918
- # Google::Cloud::Dialogflow::V2::Agents::Client.configure do |config|
919
- # config.timeout = 10_000
920
- # config.rpcs.get_agent.timeout = 20_000
918
+ # ::Google::Cloud::Dialogflow::V2::Agents::Client.configure do |config|
919
+ # config.timeout = 10.0
920
+ # config.rpcs.get_agent.timeout = 20.0
921
921
  # end
922
922
  #
923
923
  # To apply the above configuration only to a new client:
924
924
  #
925
- # client = Google::Cloud::Dialogflow::V2::Agents::Client.new do |config|
926
- # config.timeout = 10_000
927
- # config.rpcs.get_agent.timeout = 20_000
925
+ # client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new do |config|
926
+ # config.timeout = 10.0
927
+ # config.rpcs.get_agent.timeout = 20.0
928
928
  # end
929
929
  #
930
930
  # @!attribute [rw] endpoint
931
931
  # The hostname or hostname:port of the service endpoint.
932
932
  # Defaults to `"dialogflow.googleapis.com"`.
933
- # @return [String]
933
+ # @return [::String]
934
934
  # @!attribute [rw] credentials
935
935
  # Credentials to send with calls. You may provide any of the following types:
936
936
  # * (`String`) The path to a service account key file in JSON format
@@ -942,29 +942,29 @@ module Google
942
942
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
943
943
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
944
944
  # * (`nil`) indicating no credentials
945
- # @return [Object]
945
+ # @return [::Object]
946
946
  # @!attribute [rw] scope
947
947
  # The OAuth scopes
948
- # @return [Array<String>]
948
+ # @return [::Array<::String>]
949
949
  # @!attribute [rw] lib_name
950
950
  # The library name as recorded in instrumentation and logging
951
- # @return [String]
951
+ # @return [::String]
952
952
  # @!attribute [rw] lib_version
953
953
  # The library version as recorded in instrumentation and logging
954
- # @return [String]
954
+ # @return [::String]
955
955
  # @!attribute [rw] channel_args
956
956
  # Extra parameters passed to the gRPC channel. Note: this is ignored if a
957
957
  # `GRPC::Core::Channel` object is provided as the credential.
958
- # @return [Hash]
958
+ # @return [::Hash]
959
959
  # @!attribute [rw] interceptors
960
960
  # An array of interceptors that are run before calls are executed.
961
- # @return [Array<GRPC::ClientInterceptor>]
961
+ # @return [::Array<::GRPC::ClientInterceptor>]
962
962
  # @!attribute [rw] timeout
963
- # The call timeout in milliseconds.
964
- # @return [Numeric]
963
+ # The call timeout in seconds.
964
+ # @return [::Numeric]
965
965
  # @!attribute [rw] metadata
966
966
  # Additional gRPC headers to be sent with the call.
967
- # @return [Hash{Symbol=>String}]
967
+ # @return [::Hash{::Symbol=>::String}]
968
968
  # @!attribute [rw] retry_policy
969
969
  # The retry policy. The value is a hash with the following keys:
970
970
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
@@ -972,10 +972,10 @@ module Google
972
972
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
973
973
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
974
974
  # trigger a retry.
975
- # @return [Hash]
975
+ # @return [::Hash]
976
976
  #
977
977
  class Configuration
978
- extend Gapic::Config
978
+ extend ::Gapic::Config
979
979
 
980
980
  config_attr :endpoint, "dialogflow.googleapis.com", String
981
981
  config_attr :credentials, nil do |value|
@@ -983,14 +983,14 @@ module Google
983
983
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
984
984
  allowed.any? { |klass| klass === value }
985
985
  end
986
- config_attr :scope, nil, String, Array, nil
987
- config_attr :lib_name, nil, String, nil
988
- config_attr :lib_version, nil, String, nil
989
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, Hash, nil)
990
- config_attr :interceptors, nil, Array, nil
991
- config_attr :timeout, nil, Numeric, nil
992
- config_attr :metadata, nil, Hash, nil
993
- config_attr :retry_policy, nil, Hash, Proc, nil
986
+ config_attr :scope, nil, ::String, ::Array, nil
987
+ config_attr :lib_name, nil, ::String, nil
988
+ config_attr :lib_version, nil, ::String, nil
989
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
990
+ config_attr :interceptors, nil, ::Array, nil
991
+ config_attr :timeout, nil, ::Numeric, nil
992
+ config_attr :metadata, nil, ::Hash, nil
993
+ config_attr :retry_policy, nil, ::Hash, Proc, nil
994
994
 
995
995
  # @private
996
996
  def initialize parent_config = nil
@@ -1031,70 +1031,70 @@ module Google
1031
1031
  class Rpcs
1032
1032
  ##
1033
1033
  # RPC-specific configuration for `get_agent`
1034
- # @return [Gapic::Config::Method]
1034
+ # @return [::Gapic::Config::Method]
1035
1035
  #
1036
1036
  attr_reader :get_agent
1037
1037
  ##
1038
1038
  # RPC-specific configuration for `set_agent`
1039
- # @return [Gapic::Config::Method]
1039
+ # @return [::Gapic::Config::Method]
1040
1040
  #
1041
1041
  attr_reader :set_agent
1042
1042
  ##
1043
1043
  # RPC-specific configuration for `delete_agent`
1044
- # @return [Gapic::Config::Method]
1044
+ # @return [::Gapic::Config::Method]
1045
1045
  #
1046
1046
  attr_reader :delete_agent
1047
1047
  ##
1048
1048
  # RPC-specific configuration for `search_agents`
1049
- # @return [Gapic::Config::Method]
1049
+ # @return [::Gapic::Config::Method]
1050
1050
  #
1051
1051
  attr_reader :search_agents
1052
1052
  ##
1053
1053
  # RPC-specific configuration for `train_agent`
1054
- # @return [Gapic::Config::Method]
1054
+ # @return [::Gapic::Config::Method]
1055
1055
  #
1056
1056
  attr_reader :train_agent
1057
1057
  ##
1058
1058
  # RPC-specific configuration for `export_agent`
1059
- # @return [Gapic::Config::Method]
1059
+ # @return [::Gapic::Config::Method]
1060
1060
  #
1061
1061
  attr_reader :export_agent
1062
1062
  ##
1063
1063
  # RPC-specific configuration for `import_agent`
1064
- # @return [Gapic::Config::Method]
1064
+ # @return [::Gapic::Config::Method]
1065
1065
  #
1066
1066
  attr_reader :import_agent
1067
1067
  ##
1068
1068
  # RPC-specific configuration for `restore_agent`
1069
- # @return [Gapic::Config::Method]
1069
+ # @return [::Gapic::Config::Method]
1070
1070
  #
1071
1071
  attr_reader :restore_agent
1072
1072
  ##
1073
1073
  # RPC-specific configuration for `get_validation_result`
1074
- # @return [Gapic::Config::Method]
1074
+ # @return [::Gapic::Config::Method]
1075
1075
  #
1076
1076
  attr_reader :get_validation_result
1077
1077
 
1078
1078
  # @private
1079
1079
  def initialize parent_rpcs = nil
1080
1080
  get_agent_config = parent_rpcs&.get_agent if parent_rpcs&.respond_to? :get_agent
1081
- @get_agent = Gapic::Config::Method.new get_agent_config
1081
+ @get_agent = ::Gapic::Config::Method.new get_agent_config
1082
1082
  set_agent_config = parent_rpcs&.set_agent if parent_rpcs&.respond_to? :set_agent
1083
- @set_agent = Gapic::Config::Method.new set_agent_config
1083
+ @set_agent = ::Gapic::Config::Method.new set_agent_config
1084
1084
  delete_agent_config = parent_rpcs&.delete_agent if parent_rpcs&.respond_to? :delete_agent
1085
- @delete_agent = Gapic::Config::Method.new delete_agent_config
1085
+ @delete_agent = ::Gapic::Config::Method.new delete_agent_config
1086
1086
  search_agents_config = parent_rpcs&.search_agents if parent_rpcs&.respond_to? :search_agents
1087
- @search_agents = Gapic::Config::Method.new search_agents_config
1087
+ @search_agents = ::Gapic::Config::Method.new search_agents_config
1088
1088
  train_agent_config = parent_rpcs&.train_agent if parent_rpcs&.respond_to? :train_agent
1089
- @train_agent = Gapic::Config::Method.new train_agent_config
1089
+ @train_agent = ::Gapic::Config::Method.new train_agent_config
1090
1090
  export_agent_config = parent_rpcs&.export_agent if parent_rpcs&.respond_to? :export_agent
1091
- @export_agent = Gapic::Config::Method.new export_agent_config
1091
+ @export_agent = ::Gapic::Config::Method.new export_agent_config
1092
1092
  import_agent_config = parent_rpcs&.import_agent if parent_rpcs&.respond_to? :import_agent
1093
- @import_agent = Gapic::Config::Method.new import_agent_config
1093
+ @import_agent = ::Gapic::Config::Method.new import_agent_config
1094
1094
  restore_agent_config = parent_rpcs&.restore_agent if parent_rpcs&.respond_to? :restore_agent
1095
- @restore_agent = Gapic::Config::Method.new restore_agent_config
1095
+ @restore_agent = ::Gapic::Config::Method.new restore_agent_config
1096
1096
  get_validation_result_config = parent_rpcs&.get_validation_result if parent_rpcs&.respond_to? :get_validation_result
1097
- @get_validation_result = Gapic::Config::Method.new get_validation_result_config
1097
+ @get_validation_result = ::Gapic::Config::Method.new get_validation_result_config
1098
1098
 
1099
1099
  yield self if block_given?
1100
1100
  end