google-cloud-dialogflow-v2 0.4.1 → 0.6.2

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