google-cloud-dialogflow-v2 0.4.0 → 0.6.1

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 +218 -205
  7. data/lib/google/cloud/dialogflow/v2/agents/credentials.rb +1 -1
  8. data/lib/google/cloud/dialogflow/v2/agents/operations.rb +108 -102
  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 +147 -142
  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 +244 -231
  16. data/lib/google/cloud/dialogflow/v2/entity_types/credentials.rb +1 -1
  17. data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +108 -102
  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 +189 -176
  27. data/lib/google/cloud/dialogflow/v2/intents/credentials.rb +1 -1
  28. data/lib/google/cloud/dialogflow/v2/intents/operations.rb +108 -102
  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 +129 -124
  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 +85 -80
  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 +40 -5
  60. data/lib/google/cloud/common_resources_pb.rb +0 -15
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "googleauth"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Dialogflow
24
+ module V2
25
+ module Environments
26
+ # Credentials for the Environments API.
27
+ class Credentials < ::Google::Auth::Credentials
28
+ self.scope = [
29
+ "https://www.googleapis.com/auth/cloud-platform",
30
+ "https://www.googleapis.com/auth/dialogflow"
31
+ ]
32
+ self.env_vars = [
33
+ "DIALOGFLOW_CREDENTIALS",
34
+ "DIALOGFLOW_KEYFILE",
35
+ "GOOGLE_CLOUD_CREDENTIALS",
36
+ "GOOGLE_CLOUD_KEYFILE",
37
+ "GCLOUD_KEYFILE",
38
+ "DIALOGFLOW_CREDENTIALS_JSON",
39
+ "DIALOGFLOW_KEYFILE_JSON",
40
+ "GOOGLE_CLOUD_CREDENTIALS_JSON",
41
+ "GOOGLE_CLOUD_KEYFILE_JSON",
42
+ "GCLOUD_KEYFILE_JSON"
43
+ ]
44
+ self.paths = [
45
+ "~/.config/google_cloud/application_default_credentials.json"
46
+ ]
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Dialogflow
23
+ module V2
24
+ module Environments
25
+ # Path helper methods for the Environments API.
26
+ module Paths
27
+ ##
28
+ # Create a fully-qualified Agent resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `projects/{project}/agent`
33
+ #
34
+ # @param project [String]
35
+ #
36
+ # @return [::String]
37
+ def agent_path project:
38
+ "projects/#{project}/agent"
39
+ end
40
+
41
+ extend self
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
@@ -34,8 +34,8 @@ module Google
34
34
  ##
35
35
  # An intent represents a mapping between input from a user and an action to
36
36
  # be taken by your application. When you pass user input to the
37
- # {Google::Cloud::Dialogflow::V2::Sessions::Client#detect_intent DetectIntent} (or
38
- # {Google::Cloud::Dialogflow::V2::Sessions::Client#streaming_detect_intent StreamingDetectIntent}) method, the
37
+ # {::Google::Cloud::Dialogflow::V2::Sessions::Client#detect_intent DetectIntent} (or
38
+ # {::Google::Cloud::Dialogflow::V2::Sessions::Client#streaming_detect_intent StreamingDetectIntent}) method, the
39
39
  # Dialogflow API analyzes the input and searches
40
40
  # for a matching intent. If no match is found, the Dialogflow API returns a
41
41
  # fallback intent (`is_fallback` = true).
@@ -68,7 +68,7 @@ module Google
68
68
  # To load this service and instantiate a client:
69
69
  #
70
70
  # require "google/cloud/dialogflow/v2/intents"
71
- # client = Google::Cloud::Dialogflow::V2::Intents::Client.new
71
+ # client = ::Google::Cloud::Dialogflow::V2::Intents::Client.new
72
72
  #
73
73
  module Intents
74
74
  end
@@ -29,8 +29,8 @@ module Google
29
29
  #
30
30
  # An intent represents a mapping between input from a user and an action to
31
31
  # be taken by your application. When you pass user input to the
32
- # {Google::Cloud::Dialogflow::V2::Sessions::Client#detect_intent DetectIntent} (or
33
- # {Google::Cloud::Dialogflow::V2::Sessions::Client#streaming_detect_intent StreamingDetectIntent}) method, the
32
+ # {::Google::Cloud::Dialogflow::V2::Sessions::Client#detect_intent DetectIntent} (or
33
+ # {::Google::Cloud::Dialogflow::V2::Sessions::Client#streaming_detect_intent StreamingDetectIntent}) method, the
34
34
  # Dialogflow API analyzes the input and searches
35
35
  # for a matching intent. If no match is found, the Dialogflow API returns a
36
36
  # fallback intent (`is_fallback` = true).
@@ -69,15 +69,15 @@ module Google
69
69
  ##
70
70
  # Configure the Intents Client class.
71
71
  #
72
- # See {Google::Cloud::Dialogflow::V2::Intents::Client::Configuration}
72
+ # See {::Google::Cloud::Dialogflow::V2::Intents::Client::Configuration}
73
73
  # for a description of the configuration fields.
74
74
  #
75
75
  # ## Example
76
76
  #
77
77
  # To modify the configuration for all Intents clients:
78
78
  #
79
- # Google::Cloud::Dialogflow::V2::Intents::Client.configure do |config|
80
- # config.timeout = 10_000
79
+ # ::Google::Cloud::Dialogflow::V2::Intents::Client.configure do |config|
80
+ # config.timeout = 10.0
81
81
  # end
82
82
  #
83
83
  # @yield [config] Configure the Client client.
@@ -147,7 +147,7 @@ module Google
147
147
  # but structural changes (adding new fields, etc.) are not allowed. Structural changes
148
148
  # should be made on {Client.configure}.
149
149
  #
150
- # See {Google::Cloud::Dialogflow::V2::Intents::Client::Configuration}
150
+ # See {::Google::Cloud::Dialogflow::V2::Intents::Client::Configuration}
151
151
  # for a description of the configuration fields.
152
152
  #
153
153
  # @yield [config] Configure the Client client.
@@ -168,13 +168,13 @@ module Google
168
168
  # To create a new Intents client with the default
169
169
  # configuration:
170
170
  #
171
- # client = Google::Cloud::Dialogflow::V2::Intents::Client.new
171
+ # client = ::Google::Cloud::Dialogflow::V2::Intents::Client.new
172
172
  #
173
173
  # To create a new Intents client with a custom
174
174
  # configuration:
175
175
  #
176
- # client = Google::Cloud::Dialogflow::V2::Intents::Client.new do |config|
177
- # config.timeout = 10_000
176
+ # client = ::Google::Cloud::Dialogflow::V2::Intents::Client.new do |config|
177
+ # config.timeout = 10.0
178
178
  # end
179
179
  #
180
180
  # @yield [config] Configure the Intents client.
@@ -199,14 +199,16 @@ module Google
199
199
  if credentials.is_a?(String) || credentials.is_a?(Hash)
200
200
  credentials = Credentials.new credentials, scope: @config.scope
201
201
  end
202
- @quota_project_id = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil
202
+ @quota_project_id = @config.quota_project
203
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
203
204
 
204
205
  @operations_client = Operations.new do |config|
205
206
  config.credentials = credentials
207
+ config.endpoint = @config.endpoint
206
208
  end
207
209
 
208
- @intents_stub = Gapic::ServiceStub.new(
209
- Google::Cloud::Dialogflow::V2::Intents::Stub,
210
+ @intents_stub = ::Gapic::ServiceStub.new(
211
+ ::Google::Cloud::Dialogflow::V2::Intents::Stub,
210
212
  credentials: credentials,
211
213
  endpoint: @config.endpoint,
212
214
  channel_args: @config.channel_args,
@@ -214,6 +216,13 @@ module Google
214
216
  )
215
217
  end
216
218
 
219
+ ##
220
+ # Get the associated client for long-running operations.
221
+ #
222
+ # @return [::Google::Cloud::Dialogflow::V2::Intents::Operations]
223
+ #
224
+ attr_reader :operations_client
225
+
217
226
  # Service calls
218
227
 
219
228
  ##
@@ -221,12 +230,12 @@ module Google
221
230
  #
222
231
  # @overload list_intents(request, options = nil)
223
232
  # Pass arguments to `list_intents` via a request object, either of type
224
- # {Google::Cloud::Dialogflow::V2::ListIntentsRequest} or an equivalent Hash.
233
+ # {::Google::Cloud::Dialogflow::V2::ListIntentsRequest} or an equivalent Hash.
225
234
  #
226
- # @param request [Google::Cloud::Dialogflow::V2::ListIntentsRequest, Hash]
235
+ # @param request [::Google::Cloud::Dialogflow::V2::ListIntentsRequest, ::Hash]
227
236
  # A request object representing the call parameters. Required. To specify no
228
237
  # parameters, or to keep all the default parameter values, pass an empty Hash.
229
- # @param options [Gapic::CallOptions, Hash]
238
+ # @param options [::Gapic::CallOptions, ::Hash]
230
239
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
231
240
  #
232
241
  # @overload list_intents(parent: nil, language_code: nil, intent_view: nil, page_size: nil, page_token: nil)
@@ -234,44 +243,44 @@ module Google
234
243
  # least one keyword argument is required. To specify no parameters, or to keep all
235
244
  # the default parameter values, pass an empty Hash as a request object (see above).
236
245
  #
237
- # @param parent [String]
246
+ # @param parent [::String]
238
247
  # Required. The agent to list all intents from.
239
248
  # Format: `projects/<Project ID>/agent`.
240
- # @param language_code [String]
249
+ # @param language_code [::String]
241
250
  # Optional. The language used to access language-specific data.
242
251
  # If not specified, the agent's default language is used.
243
252
  # For more information, see
244
253
  # [Multilingual intent and entity
245
254
  # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
246
- # @param intent_view [Google::Cloud::Dialogflow::V2::IntentView]
255
+ # @param intent_view [::Google::Cloud::Dialogflow::V2::IntentView]
247
256
  # Optional. The resource view to apply to the returned intent.
248
- # @param page_size [Integer]
257
+ # @param page_size [::Integer]
249
258
  # Optional. The maximum number of items to return in a single page. By
250
259
  # default 100 and at most 1000.
251
- # @param page_token [String]
260
+ # @param page_token [::String]
252
261
  # Optional. The next_page_token value returned from a previous list request.
253
262
  #
254
263
  # @yield [response, operation] Access the result along with the RPC operation
255
- # @yieldparam response [Gapic::PagedEnumerable<Google::Cloud::Dialogflow::V2::Intent>]
256
- # @yieldparam operation [GRPC::ActiveCall::Operation]
264
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::V2::Intent>]
265
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
257
266
  #
258
- # @return [Gapic::PagedEnumerable<Google::Cloud::Dialogflow::V2::Intent>]
267
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::V2::Intent>]
259
268
  #
260
- # @raise [Google::Cloud::Error] if the RPC is aborted.
269
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
261
270
  #
262
271
  def list_intents request, options = nil
263
- raise ArgumentError, "request must be provided" if request.nil?
272
+ raise ::ArgumentError, "request must be provided" if request.nil?
264
273
 
265
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::ListIntentsRequest
274
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::ListIntentsRequest
266
275
 
267
276
  # Converts hash and nil to an options object
268
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
277
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
269
278
 
270
279
  # Customize the options with defaults
271
280
  metadata = @config.rpcs.list_intents.metadata.to_h
272
281
 
273
282
  # Set x-goog-api-client and x-goog-user-project headers
274
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
283
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
275
284
  lib_name: @config.lib_name, lib_version: @config.lib_version,
276
285
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
277
286
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -289,12 +298,12 @@ module Google
289
298
  retry_policy: @config.retry_policy
290
299
 
291
300
  @intents_stub.call_rpc :list_intents, request, options: options do |response, operation|
292
- response = Gapic::PagedEnumerable.new @intents_stub, :list_intents, request, response, operation, options
301
+ response = ::Gapic::PagedEnumerable.new @intents_stub, :list_intents, request, response, operation, options
293
302
  yield response, operation if block_given?
294
303
  return response
295
304
  end
296
- rescue GRPC::BadStatus => e
297
- raise Google::Cloud::Error.from_error(e)
305
+ rescue ::GRPC::BadStatus => e
306
+ raise ::Google::Cloud::Error.from_error(e)
298
307
  end
299
308
 
300
309
  ##
@@ -302,12 +311,12 @@ module Google
302
311
  #
303
312
  # @overload get_intent(request, options = nil)
304
313
  # Pass arguments to `get_intent` via a request object, either of type
305
- # {Google::Cloud::Dialogflow::V2::GetIntentRequest} or an equivalent Hash.
314
+ # {::Google::Cloud::Dialogflow::V2::GetIntentRequest} or an equivalent Hash.
306
315
  #
307
- # @param request [Google::Cloud::Dialogflow::V2::GetIntentRequest, Hash]
316
+ # @param request [::Google::Cloud::Dialogflow::V2::GetIntentRequest, ::Hash]
308
317
  # A request object representing the call parameters. Required. To specify no
309
318
  # parameters, or to keep all the default parameter values, pass an empty Hash.
310
- # @param options [Gapic::CallOptions, Hash]
319
+ # @param options [::Gapic::CallOptions, ::Hash]
311
320
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
312
321
  #
313
322
  # @overload get_intent(name: nil, language_code: nil, intent_view: nil)
@@ -315,39 +324,39 @@ module Google
315
324
  # least one keyword argument is required. To specify no parameters, or to keep all
316
325
  # the default parameter values, pass an empty Hash as a request object (see above).
317
326
  #
318
- # @param name [String]
327
+ # @param name [::String]
319
328
  # Required. The name of the intent.
320
329
  # Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
321
- # @param language_code [String]
330
+ # @param language_code [::String]
322
331
  # Optional. The language used to access language-specific data.
323
332
  # If not specified, the agent's default language is used.
324
333
  # For more information, see
325
334
  # [Multilingual intent and entity
326
335
  # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
327
- # @param intent_view [Google::Cloud::Dialogflow::V2::IntentView]
336
+ # @param intent_view [::Google::Cloud::Dialogflow::V2::IntentView]
328
337
  # Optional. The resource view to apply to the returned intent.
329
338
  #
330
339
  # @yield [response, operation] Access the result along with the RPC operation
331
- # @yieldparam response [Google::Cloud::Dialogflow::V2::Intent]
332
- # @yieldparam operation [GRPC::ActiveCall::Operation]
340
+ # @yieldparam response [::Google::Cloud::Dialogflow::V2::Intent]
341
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
333
342
  #
334
- # @return [Google::Cloud::Dialogflow::V2::Intent]
343
+ # @return [::Google::Cloud::Dialogflow::V2::Intent]
335
344
  #
336
- # @raise [Google::Cloud::Error] if the RPC is aborted.
345
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
337
346
  #
338
347
  def get_intent request, options = nil
339
- raise ArgumentError, "request must be provided" if request.nil?
348
+ raise ::ArgumentError, "request must be provided" if request.nil?
340
349
 
341
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::GetIntentRequest
350
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::GetIntentRequest
342
351
 
343
352
  # Converts hash and nil to an options object
344
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
353
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
345
354
 
346
355
  # Customize the options with defaults
347
356
  metadata = @config.rpcs.get_intent.metadata.to_h
348
357
 
349
358
  # Set x-goog-api-client and x-goog-user-project headers
350
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
359
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
351
360
  lib_name: @config.lib_name, lib_version: @config.lib_version,
352
361
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
353
362
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -368,8 +377,8 @@ module Google
368
377
  yield response, operation if block_given?
369
378
  return response
370
379
  end
371
- rescue GRPC::BadStatus => e
372
- raise Google::Cloud::Error.from_error(e)
380
+ rescue ::GRPC::BadStatus => e
381
+ raise ::Google::Cloud::Error.from_error(e)
373
382
  end
374
383
 
375
384
  ##
@@ -377,12 +386,12 @@ module Google
377
386
  #
378
387
  # @overload create_intent(request, options = nil)
379
388
  # Pass arguments to `create_intent` via a request object, either of type
380
- # {Google::Cloud::Dialogflow::V2::CreateIntentRequest} or an equivalent Hash.
389
+ # {::Google::Cloud::Dialogflow::V2::CreateIntentRequest} or an equivalent Hash.
381
390
  #
382
- # @param request [Google::Cloud::Dialogflow::V2::CreateIntentRequest, Hash]
391
+ # @param request [::Google::Cloud::Dialogflow::V2::CreateIntentRequest, ::Hash]
383
392
  # A request object representing the call parameters. Required. To specify no
384
393
  # parameters, or to keep all the default parameter values, pass an empty Hash.
385
- # @param options [Gapic::CallOptions, Hash]
394
+ # @param options [::Gapic::CallOptions, ::Hash]
386
395
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
387
396
  #
388
397
  # @overload create_intent(parent: nil, intent: nil, language_code: nil, intent_view: nil)
@@ -390,41 +399,41 @@ module Google
390
399
  # least one keyword argument is required. To specify no parameters, or to keep all
391
400
  # the default parameter values, pass an empty Hash as a request object (see above).
392
401
  #
393
- # @param parent [String]
402
+ # @param parent [::String]
394
403
  # Required. The agent to create a intent for.
395
404
  # Format: `projects/<Project ID>/agent`.
396
- # @param intent [Google::Cloud::Dialogflow::V2::Intent, Hash]
405
+ # @param intent [::Google::Cloud::Dialogflow::V2::Intent, ::Hash]
397
406
  # Required. The intent to create.
398
- # @param language_code [String]
407
+ # @param language_code [::String]
399
408
  # Optional. The language used to access language-specific data.
400
409
  # If not specified, the agent's default language is used.
401
410
  # For more information, see
402
411
  # [Multilingual intent and entity
403
412
  # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
404
- # @param intent_view [Google::Cloud::Dialogflow::V2::IntentView]
413
+ # @param intent_view [::Google::Cloud::Dialogflow::V2::IntentView]
405
414
  # Optional. The resource view to apply to the returned intent.
406
415
  #
407
416
  # @yield [response, operation] Access the result along with the RPC operation
408
- # @yieldparam response [Google::Cloud::Dialogflow::V2::Intent]
409
- # @yieldparam operation [GRPC::ActiveCall::Operation]
417
+ # @yieldparam response [::Google::Cloud::Dialogflow::V2::Intent]
418
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
410
419
  #
411
- # @return [Google::Cloud::Dialogflow::V2::Intent]
420
+ # @return [::Google::Cloud::Dialogflow::V2::Intent]
412
421
  #
413
- # @raise [Google::Cloud::Error] if the RPC is aborted.
422
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
414
423
  #
415
424
  def create_intent request, options = nil
416
- raise ArgumentError, "request must be provided" if request.nil?
425
+ raise ::ArgumentError, "request must be provided" if request.nil?
417
426
 
418
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::CreateIntentRequest
427
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::CreateIntentRequest
419
428
 
420
429
  # Converts hash and nil to an options object
421
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
430
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
422
431
 
423
432
  # Customize the options with defaults
424
433
  metadata = @config.rpcs.create_intent.metadata.to_h
425
434
 
426
435
  # Set x-goog-api-client and x-goog-user-project headers
427
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
436
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
428
437
  lib_name: @config.lib_name, lib_version: @config.lib_version,
429
438
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
430
439
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -445,8 +454,8 @@ module Google
445
454
  yield response, operation if block_given?
446
455
  return response
447
456
  end
448
- rescue GRPC::BadStatus => e
449
- raise Google::Cloud::Error.from_error(e)
457
+ rescue ::GRPC::BadStatus => e
458
+ raise ::Google::Cloud::Error.from_error(e)
450
459
  end
451
460
 
452
461
  ##
@@ -454,12 +463,12 @@ module Google
454
463
  #
455
464
  # @overload update_intent(request, options = nil)
456
465
  # Pass arguments to `update_intent` via a request object, either of type
457
- # {Google::Cloud::Dialogflow::V2::UpdateIntentRequest} or an equivalent Hash.
466
+ # {::Google::Cloud::Dialogflow::V2::UpdateIntentRequest} or an equivalent Hash.
458
467
  #
459
- # @param request [Google::Cloud::Dialogflow::V2::UpdateIntentRequest, Hash]
468
+ # @param request [::Google::Cloud::Dialogflow::V2::UpdateIntentRequest, ::Hash]
460
469
  # A request object representing the call parameters. Required. To specify no
461
470
  # parameters, or to keep all the default parameter values, pass an empty Hash.
462
- # @param options [Gapic::CallOptions, Hash]
471
+ # @param options [::Gapic::CallOptions, ::Hash]
463
472
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
464
473
  #
465
474
  # @overload update_intent(intent: nil, language_code: nil, update_mask: nil, intent_view: nil)
@@ -467,40 +476,40 @@ module Google
467
476
  # least one keyword argument is required. To specify no parameters, or to keep all
468
477
  # the default parameter values, pass an empty Hash as a request object (see above).
469
478
  #
470
- # @param intent [Google::Cloud::Dialogflow::V2::Intent, Hash]
479
+ # @param intent [::Google::Cloud::Dialogflow::V2::Intent, ::Hash]
471
480
  # Required. The intent to update.
472
- # @param language_code [String]
481
+ # @param language_code [::String]
473
482
  # Optional. The language used to access language-specific data.
474
483
  # If not specified, the agent's default language is used.
475
484
  # For more information, see
476
485
  # [Multilingual intent and entity
477
486
  # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
478
- # @param update_mask [Google::Protobuf::FieldMask, Hash]
487
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
479
488
  # Optional. The mask to control which fields get updated.
480
- # @param intent_view [Google::Cloud::Dialogflow::V2::IntentView]
489
+ # @param intent_view [::Google::Cloud::Dialogflow::V2::IntentView]
481
490
  # Optional. The resource view to apply to the returned intent.
482
491
  #
483
492
  # @yield [response, operation] Access the result along with the RPC operation
484
- # @yieldparam response [Google::Cloud::Dialogflow::V2::Intent]
485
- # @yieldparam operation [GRPC::ActiveCall::Operation]
493
+ # @yieldparam response [::Google::Cloud::Dialogflow::V2::Intent]
494
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
486
495
  #
487
- # @return [Google::Cloud::Dialogflow::V2::Intent]
496
+ # @return [::Google::Cloud::Dialogflow::V2::Intent]
488
497
  #
489
- # @raise [Google::Cloud::Error] if the RPC is aborted.
498
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
490
499
  #
491
500
  def update_intent request, options = nil
492
- raise ArgumentError, "request must be provided" if request.nil?
501
+ raise ::ArgumentError, "request must be provided" if request.nil?
493
502
 
494
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::UpdateIntentRequest
503
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::UpdateIntentRequest
495
504
 
496
505
  # Converts hash and nil to an options object
497
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
506
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
498
507
 
499
508
  # Customize the options with defaults
500
509
  metadata = @config.rpcs.update_intent.metadata.to_h
501
510
 
502
511
  # Set x-goog-api-client and x-goog-user-project headers
503
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
512
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
504
513
  lib_name: @config.lib_name, lib_version: @config.lib_version,
505
514
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
506
515
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -521,8 +530,8 @@ module Google
521
530
  yield response, operation if block_given?
522
531
  return response
523
532
  end
524
- rescue GRPC::BadStatus => e
525
- raise Google::Cloud::Error.from_error(e)
533
+ rescue ::GRPC::BadStatus => e
534
+ raise ::Google::Cloud::Error.from_error(e)
526
535
  end
527
536
 
528
537
  ##
@@ -530,12 +539,12 @@ module Google
530
539
  #
531
540
  # @overload delete_intent(request, options = nil)
532
541
  # Pass arguments to `delete_intent` via a request object, either of type
533
- # {Google::Cloud::Dialogflow::V2::DeleteIntentRequest} or an equivalent Hash.
542
+ # {::Google::Cloud::Dialogflow::V2::DeleteIntentRequest} or an equivalent Hash.
534
543
  #
535
- # @param request [Google::Cloud::Dialogflow::V2::DeleteIntentRequest, Hash]
544
+ # @param request [::Google::Cloud::Dialogflow::V2::DeleteIntentRequest, ::Hash]
536
545
  # A request object representing the call parameters. Required. To specify no
537
546
  # parameters, or to keep all the default parameter values, pass an empty Hash.
538
- # @param options [Gapic::CallOptions, Hash]
547
+ # @param options [::Gapic::CallOptions, ::Hash]
539
548
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
540
549
  #
541
550
  # @overload delete_intent(name: nil)
@@ -543,32 +552,32 @@ module Google
543
552
  # least one keyword argument is required. To specify no parameters, or to keep all
544
553
  # the default parameter values, pass an empty Hash as a request object (see above).
545
554
  #
546
- # @param name [String]
555
+ # @param name [::String]
547
556
  # Required. The name of the intent to delete. If this intent has direct or
548
557
  # indirect followup intents, we also delete them.
549
558
  # Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
550
559
  #
551
560
  # @yield [response, operation] Access the result along with the RPC operation
552
- # @yieldparam response [Google::Protobuf::Empty]
553
- # @yieldparam operation [GRPC::ActiveCall::Operation]
561
+ # @yieldparam response [::Google::Protobuf::Empty]
562
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
554
563
  #
555
- # @return [Google::Protobuf::Empty]
564
+ # @return [::Google::Protobuf::Empty]
556
565
  #
557
- # @raise [Google::Cloud::Error] if the RPC is aborted.
566
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
558
567
  #
559
568
  def delete_intent request, options = nil
560
- raise ArgumentError, "request must be provided" if request.nil?
569
+ raise ::ArgumentError, "request must be provided" if request.nil?
561
570
 
562
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::DeleteIntentRequest
571
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::DeleteIntentRequest
563
572
 
564
573
  # Converts hash and nil to an options object
565
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
574
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
566
575
 
567
576
  # Customize the options with defaults
568
577
  metadata = @config.rpcs.delete_intent.metadata.to_h
569
578
 
570
579
  # Set x-goog-api-client and x-goog-user-project headers
571
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
580
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
572
581
  lib_name: @config.lib_name, lib_version: @config.lib_version,
573
582
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
574
583
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -589,23 +598,23 @@ module Google
589
598
  yield response, operation if block_given?
590
599
  return response
591
600
  end
592
- rescue GRPC::BadStatus => e
593
- raise Google::Cloud::Error.from_error(e)
601
+ rescue ::GRPC::BadStatus => e
602
+ raise ::Google::Cloud::Error.from_error(e)
594
603
  end
595
604
 
596
605
  ##
597
606
  # Updates/Creates multiple intents in the specified agent.
598
607
  #
599
- # Operation <response: {Google::Cloud::Dialogflow::V2::BatchUpdateIntentsResponse BatchUpdateIntentsResponse}>
608
+ # Operation <response: {::Google::Cloud::Dialogflow::V2::BatchUpdateIntentsResponse BatchUpdateIntentsResponse}>
600
609
  #
601
610
  # @overload batch_update_intents(request, options = nil)
602
611
  # Pass arguments to `batch_update_intents` via a request object, either of type
603
- # {Google::Cloud::Dialogflow::V2::BatchUpdateIntentsRequest} or an equivalent Hash.
612
+ # {::Google::Cloud::Dialogflow::V2::BatchUpdateIntentsRequest} or an equivalent Hash.
604
613
  #
605
- # @param request [Google::Cloud::Dialogflow::V2::BatchUpdateIntentsRequest, Hash]
614
+ # @param request [::Google::Cloud::Dialogflow::V2::BatchUpdateIntentsRequest, ::Hash]
606
615
  # A request object representing the call parameters. Required. To specify no
607
616
  # parameters, or to keep all the default parameter values, pass an empty Hash.
608
- # @param options [Gapic::CallOptions, Hash]
617
+ # @param options [::Gapic::CallOptions, ::Hash]
609
618
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
610
619
  #
611
620
  # @overload batch_update_intents(parent: nil, intent_batch_uri: nil, intent_batch_inline: nil, language_code: nil, update_mask: nil, intent_view: nil)
@@ -613,47 +622,47 @@ module Google
613
622
  # least one keyword argument is required. To specify no parameters, or to keep all
614
623
  # the default parameter values, pass an empty Hash as a request object (see above).
615
624
  #
616
- # @param parent [String]
625
+ # @param parent [::String]
617
626
  # Required. The name of the agent to update or create intents in.
618
627
  # Format: `projects/<Project ID>/agent`.
619
- # @param intent_batch_uri [String]
628
+ # @param intent_batch_uri [::String]
620
629
  # The URI to a Google Cloud Storage file containing intents to update or
621
630
  # create. The file format can either be a serialized proto (of IntentBatch
622
631
  # type) or JSON object. Note: The URI must start with "gs://".
623
- # @param intent_batch_inline [Google::Cloud::Dialogflow::V2::IntentBatch, Hash]
632
+ # @param intent_batch_inline [::Google::Cloud::Dialogflow::V2::IntentBatch, ::Hash]
624
633
  # The collection of intents to update or create.
625
- # @param language_code [String]
634
+ # @param language_code [::String]
626
635
  # Optional. The language used to access language-specific data.
627
636
  # If not specified, the agent's default language is used.
628
637
  # For more information, see
629
638
  # [Multilingual intent and entity
630
639
  # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
631
- # @param update_mask [Google::Protobuf::FieldMask, Hash]
640
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
632
641
  # Optional. The mask to control which fields get updated.
633
- # @param intent_view [Google::Cloud::Dialogflow::V2::IntentView]
642
+ # @param intent_view [::Google::Cloud::Dialogflow::V2::IntentView]
634
643
  # Optional. The resource view to apply to the returned intent.
635
644
  #
636
645
  # @yield [response, operation] Access the result along with the RPC operation
637
- # @yieldparam response [Gapic::Operation]
638
- # @yieldparam operation [GRPC::ActiveCall::Operation]
646
+ # @yieldparam response [::Gapic::Operation]
647
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
639
648
  #
640
- # @return [Gapic::Operation]
649
+ # @return [::Gapic::Operation]
641
650
  #
642
- # @raise [Google::Cloud::Error] if the RPC is aborted.
651
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
643
652
  #
644
653
  def batch_update_intents request, options = nil
645
- raise ArgumentError, "request must be provided" if request.nil?
654
+ raise ::ArgumentError, "request must be provided" if request.nil?
646
655
 
647
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::BatchUpdateIntentsRequest
656
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::BatchUpdateIntentsRequest
648
657
 
649
658
  # Converts hash and nil to an options object
650
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
659
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
651
660
 
652
661
  # Customize the options with defaults
653
662
  metadata = @config.rpcs.batch_update_intents.metadata.to_h
654
663
 
655
664
  # Set x-goog-api-client and x-goog-user-project headers
656
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
665
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
657
666
  lib_name: @config.lib_name, lib_version: @config.lib_version,
658
667
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
659
668
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -671,27 +680,27 @@ module Google
671
680
  retry_policy: @config.retry_policy
672
681
 
673
682
  @intents_stub.call_rpc :batch_update_intents, request, options: options do |response, operation|
674
- response = Gapic::Operation.new response, @operations_client, options: options
683
+ response = ::Gapic::Operation.new response, @operations_client, options: options
675
684
  yield response, operation if block_given?
676
685
  return response
677
686
  end
678
- rescue GRPC::BadStatus => e
679
- raise Google::Cloud::Error.from_error(e)
687
+ rescue ::GRPC::BadStatus => e
688
+ raise ::Google::Cloud::Error.from_error(e)
680
689
  end
681
690
 
682
691
  ##
683
692
  # Deletes intents in the specified agent.
684
693
  #
685
- # Operation <response: {Google::Protobuf::Empty google.protobuf.Empty}>
694
+ # Operation <response: {::Google::Protobuf::Empty google.protobuf.Empty}>
686
695
  #
687
696
  # @overload batch_delete_intents(request, options = nil)
688
697
  # Pass arguments to `batch_delete_intents` via a request object, either of type
689
- # {Google::Cloud::Dialogflow::V2::BatchDeleteIntentsRequest} or an equivalent Hash.
698
+ # {::Google::Cloud::Dialogflow::V2::BatchDeleteIntentsRequest} or an equivalent Hash.
690
699
  #
691
- # @param request [Google::Cloud::Dialogflow::V2::BatchDeleteIntentsRequest, Hash]
700
+ # @param request [::Google::Cloud::Dialogflow::V2::BatchDeleteIntentsRequest, ::Hash]
692
701
  # A request object representing the call parameters. Required. To specify no
693
702
  # parameters, or to keep all the default parameter values, pass an empty Hash.
694
- # @param options [Gapic::CallOptions, Hash]
703
+ # @param options [::Gapic::CallOptions, ::Hash]
695
704
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
696
705
  #
697
706
  # @overload batch_delete_intents(parent: nil, intents: nil)
@@ -699,34 +708,34 @@ module Google
699
708
  # least one keyword argument is required. To specify no parameters, or to keep all
700
709
  # the default parameter values, pass an empty Hash as a request object (see above).
701
710
  #
702
- # @param parent [String]
711
+ # @param parent [::String]
703
712
  # Required. The name of the agent to delete all entities types for. Format:
704
713
  # `projects/<Project ID>/agent`.
705
- # @param intents [Array<Google::Cloud::Dialogflow::V2::Intent, Hash>]
714
+ # @param intents [::Array<::Google::Cloud::Dialogflow::V2::Intent, ::Hash>]
706
715
  # Required. The collection of intents to delete. Only intent `name` must be
707
716
  # filled in.
708
717
  #
709
718
  # @yield [response, operation] Access the result along with the RPC operation
710
- # @yieldparam response [Gapic::Operation]
711
- # @yieldparam operation [GRPC::ActiveCall::Operation]
719
+ # @yieldparam response [::Gapic::Operation]
720
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
712
721
  #
713
- # @return [Gapic::Operation]
722
+ # @return [::Gapic::Operation]
714
723
  #
715
- # @raise [Google::Cloud::Error] if the RPC is aborted.
724
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
716
725
  #
717
726
  def batch_delete_intents request, options = nil
718
- raise ArgumentError, "request must be provided" if request.nil?
727
+ raise ::ArgumentError, "request must be provided" if request.nil?
719
728
 
720
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::BatchDeleteIntentsRequest
729
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::BatchDeleteIntentsRequest
721
730
 
722
731
  # Converts hash and nil to an options object
723
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
732
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
724
733
 
725
734
  # Customize the options with defaults
726
735
  metadata = @config.rpcs.batch_delete_intents.metadata.to_h
727
736
 
728
737
  # Set x-goog-api-client and x-goog-user-project headers
729
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
738
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
730
739
  lib_name: @config.lib_name, lib_version: @config.lib_version,
731
740
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
732
741
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -744,12 +753,12 @@ module Google
744
753
  retry_policy: @config.retry_policy
745
754
 
746
755
  @intents_stub.call_rpc :batch_delete_intents, request, options: options do |response, operation|
747
- response = Gapic::Operation.new response, @operations_client, options: options
756
+ response = ::Gapic::Operation.new response, @operations_client, options: options
748
757
  yield response, operation if block_given?
749
758
  return response
750
759
  end
751
- rescue GRPC::BadStatus => e
752
- raise Google::Cloud::Error.from_error(e)
760
+ rescue ::GRPC::BadStatus => e
761
+ raise ::Google::Cloud::Error.from_error(e)
753
762
  end
754
763
 
755
764
  ##
@@ -759,7 +768,7 @@ module Google
759
768
  # providing control over timeouts, retry behavior, logging, transport
760
769
  # parameters, and other low-level controls. Certain parameters can also be
761
770
  # applied individually to specific RPCs. See
762
- # {Google::Cloud::Dialogflow::V2::Intents::Client::Configuration::Rpcs}
771
+ # {::Google::Cloud::Dialogflow::V2::Intents::Client::Configuration::Rpcs}
763
772
  # for a list of RPCs that can be configured independently.
764
773
  #
765
774
  # Configuration can be applied globally to all clients, or to a single client
@@ -770,22 +779,22 @@ module Google
770
779
  # To modify the global config, setting the timeout for list_intents
771
780
  # to 20 seconds, and all remaining timeouts to 10 seconds:
772
781
  #
773
- # Google::Cloud::Dialogflow::V2::Intents::Client.configure do |config|
774
- # config.timeout = 10_000
775
- # config.rpcs.list_intents.timeout = 20_000
782
+ # ::Google::Cloud::Dialogflow::V2::Intents::Client.configure do |config|
783
+ # config.timeout = 10.0
784
+ # config.rpcs.list_intents.timeout = 20.0
776
785
  # end
777
786
  #
778
787
  # To apply the above configuration only to a new client:
779
788
  #
780
- # client = Google::Cloud::Dialogflow::V2::Intents::Client.new do |config|
781
- # config.timeout = 10_000
782
- # config.rpcs.list_intents.timeout = 20_000
789
+ # client = ::Google::Cloud::Dialogflow::V2::Intents::Client.new do |config|
790
+ # config.timeout = 10.0
791
+ # config.rpcs.list_intents.timeout = 20.0
783
792
  # end
784
793
  #
785
794
  # @!attribute [rw] endpoint
786
795
  # The hostname or hostname:port of the service endpoint.
787
796
  # Defaults to `"dialogflow.googleapis.com"`.
788
- # @return [String]
797
+ # @return [::String]
789
798
  # @!attribute [rw] credentials
790
799
  # Credentials to send with calls. You may provide any of the following types:
791
800
  # * (`String`) The path to a service account key file in JSON format
@@ -797,29 +806,29 @@ module Google
797
806
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
798
807
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
799
808
  # * (`nil`) indicating no credentials
800
- # @return [Object]
809
+ # @return [::Object]
801
810
  # @!attribute [rw] scope
802
811
  # The OAuth scopes
803
- # @return [Array<String>]
812
+ # @return [::Array<::String>]
804
813
  # @!attribute [rw] lib_name
805
814
  # The library name as recorded in instrumentation and logging
806
- # @return [String]
815
+ # @return [::String]
807
816
  # @!attribute [rw] lib_version
808
817
  # The library version as recorded in instrumentation and logging
809
- # @return [String]
818
+ # @return [::String]
810
819
  # @!attribute [rw] channel_args
811
820
  # Extra parameters passed to the gRPC channel. Note: this is ignored if a
812
821
  # `GRPC::Core::Channel` object is provided as the credential.
813
- # @return [Hash]
822
+ # @return [::Hash]
814
823
  # @!attribute [rw] interceptors
815
824
  # An array of interceptors that are run before calls are executed.
816
- # @return [Array<GRPC::ClientInterceptor>]
825
+ # @return [::Array<::GRPC::ClientInterceptor>]
817
826
  # @!attribute [rw] timeout
818
- # The call timeout in milliseconds.
819
- # @return [Numeric]
827
+ # The call timeout in seconds.
828
+ # @return [::Numeric]
820
829
  # @!attribute [rw] metadata
821
830
  # Additional gRPC headers to be sent with the call.
822
- # @return [Hash{Symbol=>String}]
831
+ # @return [::Hash{::Symbol=>::String}]
823
832
  # @!attribute [rw] retry_policy
824
833
  # The retry policy. The value is a hash with the following keys:
825
834
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
@@ -827,25 +836,29 @@ module Google
827
836
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
828
837
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
829
838
  # trigger a retry.
830
- # @return [Hash]
839
+ # @return [::Hash]
840
+ # @!attribute [rw] quota_project
841
+ # A separate project against which to charge quota.
842
+ # @return [::String]
831
843
  #
832
844
  class Configuration
833
- extend Gapic::Config
845
+ extend ::Gapic::Config
834
846
 
835
- config_attr :endpoint, "dialogflow.googleapis.com", String
836
- config_attr :credentials, nil do |value|
847
+ config_attr :endpoint, "dialogflow.googleapis.com", ::String
848
+ config_attr :credentials, nil do |value|
837
849
  allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
838
850
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
839
851
  allowed.any? { |klass| klass === value }
840
852
  end
841
- config_attr :scope, nil, String, Array, nil
842
- config_attr :lib_name, nil, String, nil
843
- config_attr :lib_version, nil, String, nil
844
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, Hash, nil)
845
- config_attr :interceptors, nil, Array, nil
846
- config_attr :timeout, nil, Numeric, nil
847
- config_attr :metadata, nil, Hash, nil
848
- config_attr :retry_policy, nil, Hash, Proc, nil
853
+ config_attr :scope, nil, ::String, ::Array, nil
854
+ config_attr :lib_name, nil, ::String, nil
855
+ config_attr :lib_version, nil, ::String, nil
856
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
857
+ config_attr :interceptors, nil, ::Array, nil
858
+ config_attr :timeout, nil, ::Numeric, nil
859
+ config_attr :metadata, nil, ::Hash, nil
860
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
861
+ config_attr :quota_project, nil, ::String, nil
849
862
 
850
863
  # @private
851
864
  def initialize parent_config = nil
@@ -886,56 +899,56 @@ module Google
886
899
  class Rpcs
887
900
  ##
888
901
  # RPC-specific configuration for `list_intents`
889
- # @return [Gapic::Config::Method]
902
+ # @return [::Gapic::Config::Method]
890
903
  #
891
904
  attr_reader :list_intents
892
905
  ##
893
906
  # RPC-specific configuration for `get_intent`
894
- # @return [Gapic::Config::Method]
907
+ # @return [::Gapic::Config::Method]
895
908
  #
896
909
  attr_reader :get_intent
897
910
  ##
898
911
  # RPC-specific configuration for `create_intent`
899
- # @return [Gapic::Config::Method]
912
+ # @return [::Gapic::Config::Method]
900
913
  #
901
914
  attr_reader :create_intent
902
915
  ##
903
916
  # RPC-specific configuration for `update_intent`
904
- # @return [Gapic::Config::Method]
917
+ # @return [::Gapic::Config::Method]
905
918
  #
906
919
  attr_reader :update_intent
907
920
  ##
908
921
  # RPC-specific configuration for `delete_intent`
909
- # @return [Gapic::Config::Method]
922
+ # @return [::Gapic::Config::Method]
910
923
  #
911
924
  attr_reader :delete_intent
912
925
  ##
913
926
  # RPC-specific configuration for `batch_update_intents`
914
- # @return [Gapic::Config::Method]
927
+ # @return [::Gapic::Config::Method]
915
928
  #
916
929
  attr_reader :batch_update_intents
917
930
  ##
918
931
  # RPC-specific configuration for `batch_delete_intents`
919
- # @return [Gapic::Config::Method]
932
+ # @return [::Gapic::Config::Method]
920
933
  #
921
934
  attr_reader :batch_delete_intents
922
935
 
923
936
  # @private
924
937
  def initialize parent_rpcs = nil
925
938
  list_intents_config = parent_rpcs&.list_intents if parent_rpcs&.respond_to? :list_intents
926
- @list_intents = Gapic::Config::Method.new list_intents_config
939
+ @list_intents = ::Gapic::Config::Method.new list_intents_config
927
940
  get_intent_config = parent_rpcs&.get_intent if parent_rpcs&.respond_to? :get_intent
928
- @get_intent = Gapic::Config::Method.new get_intent_config
941
+ @get_intent = ::Gapic::Config::Method.new get_intent_config
929
942
  create_intent_config = parent_rpcs&.create_intent if parent_rpcs&.respond_to? :create_intent
930
- @create_intent = Gapic::Config::Method.new create_intent_config
943
+ @create_intent = ::Gapic::Config::Method.new create_intent_config
931
944
  update_intent_config = parent_rpcs&.update_intent if parent_rpcs&.respond_to? :update_intent
932
- @update_intent = Gapic::Config::Method.new update_intent_config
945
+ @update_intent = ::Gapic::Config::Method.new update_intent_config
933
946
  delete_intent_config = parent_rpcs&.delete_intent if parent_rpcs&.respond_to? :delete_intent
934
- @delete_intent = Gapic::Config::Method.new delete_intent_config
947
+ @delete_intent = ::Gapic::Config::Method.new delete_intent_config
935
948
  batch_update_intents_config = parent_rpcs&.batch_update_intents if parent_rpcs&.respond_to? :batch_update_intents
936
- @batch_update_intents = Gapic::Config::Method.new batch_update_intents_config
949
+ @batch_update_intents = ::Gapic::Config::Method.new batch_update_intents_config
937
950
  batch_delete_intents_config = parent_rpcs&.batch_delete_intents if parent_rpcs&.respond_to? :batch_delete_intents
938
- @batch_delete_intents = Gapic::Config::Method.new batch_delete_intents_config
951
+ @batch_delete_intents = ::Gapic::Config::Method.new batch_delete_intents_config
939
952
 
940
953
  yield self if block_given?
941
954
  end