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
@@ -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,15 +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
206
207
  config.endpoint = @config.endpoint
207
208
  end
208
209
 
209
- @intents_stub = Gapic::ServiceStub.new(
210
- Google::Cloud::Dialogflow::V2::Intents::Stub,
210
+ @intents_stub = ::Gapic::ServiceStub.new(
211
+ ::Google::Cloud::Dialogflow::V2::Intents::Stub,
211
212
  credentials: credentials,
212
213
  endpoint: @config.endpoint,
213
214
  channel_args: @config.channel_args,
@@ -218,7 +219,7 @@ module Google
218
219
  ##
219
220
  # Get the associated client for long-running operations.
220
221
  #
221
- # @return [Google::Cloud::Dialogflow::V2::Intents::Operations]
222
+ # @return [::Google::Cloud::Dialogflow::V2::Intents::Operations]
222
223
  #
223
224
  attr_reader :operations_client
224
225
 
@@ -229,12 +230,12 @@ module Google
229
230
  #
230
231
  # @overload list_intents(request, options = nil)
231
232
  # Pass arguments to `list_intents` via a request object, either of type
232
- # {Google::Cloud::Dialogflow::V2::ListIntentsRequest} or an equivalent Hash.
233
+ # {::Google::Cloud::Dialogflow::V2::ListIntentsRequest} or an equivalent Hash.
233
234
  #
234
- # @param request [Google::Cloud::Dialogflow::V2::ListIntentsRequest, Hash]
235
+ # @param request [::Google::Cloud::Dialogflow::V2::ListIntentsRequest, ::Hash]
235
236
  # A request object representing the call parameters. Required. To specify no
236
237
  # parameters, or to keep all the default parameter values, pass an empty Hash.
237
- # @param options [Gapic::CallOptions, Hash]
238
+ # @param options [::Gapic::CallOptions, ::Hash]
238
239
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
239
240
  #
240
241
  # @overload list_intents(parent: nil, language_code: nil, intent_view: nil, page_size: nil, page_token: nil)
@@ -242,44 +243,44 @@ module Google
242
243
  # least one keyword argument is required. To specify no parameters, or to keep all
243
244
  # the default parameter values, pass an empty Hash as a request object (see above).
244
245
  #
245
- # @param parent [String]
246
+ # @param parent [::String]
246
247
  # Required. The agent to list all intents from.
247
248
  # Format: `projects/<Project ID>/agent`.
248
- # @param language_code [String]
249
+ # @param language_code [::String]
249
250
  # Optional. The language used to access language-specific data.
250
251
  # If not specified, the agent's default language is used.
251
252
  # For more information, see
252
253
  # [Multilingual intent and entity
253
254
  # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
254
- # @param intent_view [Google::Cloud::Dialogflow::V2::IntentView]
255
+ # @param intent_view [::Google::Cloud::Dialogflow::V2::IntentView]
255
256
  # Optional. The resource view to apply to the returned intent.
256
- # @param page_size [Integer]
257
+ # @param page_size [::Integer]
257
258
  # Optional. The maximum number of items to return in a single page. By
258
259
  # default 100 and at most 1000.
259
- # @param page_token [String]
260
+ # @param page_token [::String]
260
261
  # Optional. The next_page_token value returned from a previous list request.
261
262
  #
262
263
  # @yield [response, operation] Access the result along with the RPC operation
263
- # @yieldparam response [Gapic::PagedEnumerable<Google::Cloud::Dialogflow::V2::Intent>]
264
- # @yieldparam operation [GRPC::ActiveCall::Operation]
264
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::V2::Intent>]
265
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
265
266
  #
266
- # @return [Gapic::PagedEnumerable<Google::Cloud::Dialogflow::V2::Intent>]
267
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::V2::Intent>]
267
268
  #
268
- # @raise [Google::Cloud::Error] if the RPC is aborted.
269
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
269
270
  #
270
271
  def list_intents request, options = nil
271
- raise ArgumentError, "request must be provided" if request.nil?
272
+ raise ::ArgumentError, "request must be provided" if request.nil?
272
273
 
273
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::ListIntentsRequest
274
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::ListIntentsRequest
274
275
 
275
276
  # Converts hash and nil to an options object
276
- 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
277
278
 
278
279
  # Customize the options with defaults
279
280
  metadata = @config.rpcs.list_intents.metadata.to_h
280
281
 
281
282
  # Set x-goog-api-client and x-goog-user-project headers
282
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
283
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
283
284
  lib_name: @config.lib_name, lib_version: @config.lib_version,
284
285
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
285
286
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -297,12 +298,12 @@ module Google
297
298
  retry_policy: @config.retry_policy
298
299
 
299
300
  @intents_stub.call_rpc :list_intents, request, options: options do |response, operation|
300
- 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
301
302
  yield response, operation if block_given?
302
303
  return response
303
304
  end
304
- rescue GRPC::BadStatus => e
305
- raise Google::Cloud::Error.from_error(e)
305
+ rescue ::GRPC::BadStatus => e
306
+ raise ::Google::Cloud::Error.from_error(e)
306
307
  end
307
308
 
308
309
  ##
@@ -310,12 +311,12 @@ module Google
310
311
  #
311
312
  # @overload get_intent(request, options = nil)
312
313
  # Pass arguments to `get_intent` via a request object, either of type
313
- # {Google::Cloud::Dialogflow::V2::GetIntentRequest} or an equivalent Hash.
314
+ # {::Google::Cloud::Dialogflow::V2::GetIntentRequest} or an equivalent Hash.
314
315
  #
315
- # @param request [Google::Cloud::Dialogflow::V2::GetIntentRequest, Hash]
316
+ # @param request [::Google::Cloud::Dialogflow::V2::GetIntentRequest, ::Hash]
316
317
  # A request object representing the call parameters. Required. To specify no
317
318
  # parameters, or to keep all the default parameter values, pass an empty Hash.
318
- # @param options [Gapic::CallOptions, Hash]
319
+ # @param options [::Gapic::CallOptions, ::Hash]
319
320
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
320
321
  #
321
322
  # @overload get_intent(name: nil, language_code: nil, intent_view: nil)
@@ -323,39 +324,39 @@ module Google
323
324
  # least one keyword argument is required. To specify no parameters, or to keep all
324
325
  # the default parameter values, pass an empty Hash as a request object (see above).
325
326
  #
326
- # @param name [String]
327
+ # @param name [::String]
327
328
  # Required. The name of the intent.
328
329
  # Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
329
- # @param language_code [String]
330
+ # @param language_code [::String]
330
331
  # Optional. The language used to access language-specific data.
331
332
  # If not specified, the agent's default language is used.
332
333
  # For more information, see
333
334
  # [Multilingual intent and entity
334
335
  # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
335
- # @param intent_view [Google::Cloud::Dialogflow::V2::IntentView]
336
+ # @param intent_view [::Google::Cloud::Dialogflow::V2::IntentView]
336
337
  # Optional. The resource view to apply to the returned intent.
337
338
  #
338
339
  # @yield [response, operation] Access the result along with the RPC operation
339
- # @yieldparam response [Google::Cloud::Dialogflow::V2::Intent]
340
- # @yieldparam operation [GRPC::ActiveCall::Operation]
340
+ # @yieldparam response [::Google::Cloud::Dialogflow::V2::Intent]
341
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
341
342
  #
342
- # @return [Google::Cloud::Dialogflow::V2::Intent]
343
+ # @return [::Google::Cloud::Dialogflow::V2::Intent]
343
344
  #
344
- # @raise [Google::Cloud::Error] if the RPC is aborted.
345
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
345
346
  #
346
347
  def get_intent request, options = nil
347
- raise ArgumentError, "request must be provided" if request.nil?
348
+ raise ::ArgumentError, "request must be provided" if request.nil?
348
349
 
349
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::GetIntentRequest
350
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::GetIntentRequest
350
351
 
351
352
  # Converts hash and nil to an options object
352
- 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
353
354
 
354
355
  # Customize the options with defaults
355
356
  metadata = @config.rpcs.get_intent.metadata.to_h
356
357
 
357
358
  # Set x-goog-api-client and x-goog-user-project headers
358
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
359
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
359
360
  lib_name: @config.lib_name, lib_version: @config.lib_version,
360
361
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
361
362
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -376,8 +377,8 @@ module Google
376
377
  yield response, operation if block_given?
377
378
  return response
378
379
  end
379
- rescue GRPC::BadStatus => e
380
- raise Google::Cloud::Error.from_error(e)
380
+ rescue ::GRPC::BadStatus => e
381
+ raise ::Google::Cloud::Error.from_error(e)
381
382
  end
382
383
 
383
384
  ##
@@ -385,12 +386,12 @@ module Google
385
386
  #
386
387
  # @overload create_intent(request, options = nil)
387
388
  # Pass arguments to `create_intent` via a request object, either of type
388
- # {Google::Cloud::Dialogflow::V2::CreateIntentRequest} or an equivalent Hash.
389
+ # {::Google::Cloud::Dialogflow::V2::CreateIntentRequest} or an equivalent Hash.
389
390
  #
390
- # @param request [Google::Cloud::Dialogflow::V2::CreateIntentRequest, Hash]
391
+ # @param request [::Google::Cloud::Dialogflow::V2::CreateIntentRequest, ::Hash]
391
392
  # A request object representing the call parameters. Required. To specify no
392
393
  # parameters, or to keep all the default parameter values, pass an empty Hash.
393
- # @param options [Gapic::CallOptions, Hash]
394
+ # @param options [::Gapic::CallOptions, ::Hash]
394
395
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
395
396
  #
396
397
  # @overload create_intent(parent: nil, intent: nil, language_code: nil, intent_view: nil)
@@ -398,41 +399,41 @@ module Google
398
399
  # least one keyword argument is required. To specify no parameters, or to keep all
399
400
  # the default parameter values, pass an empty Hash as a request object (see above).
400
401
  #
401
- # @param parent [String]
402
+ # @param parent [::String]
402
403
  # Required. The agent to create a intent for.
403
404
  # Format: `projects/<Project ID>/agent`.
404
- # @param intent [Google::Cloud::Dialogflow::V2::Intent, Hash]
405
+ # @param intent [::Google::Cloud::Dialogflow::V2::Intent, ::Hash]
405
406
  # Required. The intent to create.
406
- # @param language_code [String]
407
+ # @param language_code [::String]
407
408
  # Optional. The language used to access language-specific data.
408
409
  # If not specified, the agent's default language is used.
409
410
  # For more information, see
410
411
  # [Multilingual intent and entity
411
412
  # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
412
- # @param intent_view [Google::Cloud::Dialogflow::V2::IntentView]
413
+ # @param intent_view [::Google::Cloud::Dialogflow::V2::IntentView]
413
414
  # Optional. The resource view to apply to the returned intent.
414
415
  #
415
416
  # @yield [response, operation] Access the result along with the RPC operation
416
- # @yieldparam response [Google::Cloud::Dialogflow::V2::Intent]
417
- # @yieldparam operation [GRPC::ActiveCall::Operation]
417
+ # @yieldparam response [::Google::Cloud::Dialogflow::V2::Intent]
418
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
418
419
  #
419
- # @return [Google::Cloud::Dialogflow::V2::Intent]
420
+ # @return [::Google::Cloud::Dialogflow::V2::Intent]
420
421
  #
421
- # @raise [Google::Cloud::Error] if the RPC is aborted.
422
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
422
423
  #
423
424
  def create_intent request, options = nil
424
- raise ArgumentError, "request must be provided" if request.nil?
425
+ raise ::ArgumentError, "request must be provided" if request.nil?
425
426
 
426
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::CreateIntentRequest
427
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::CreateIntentRequest
427
428
 
428
429
  # Converts hash and nil to an options object
429
- 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
430
431
 
431
432
  # Customize the options with defaults
432
433
  metadata = @config.rpcs.create_intent.metadata.to_h
433
434
 
434
435
  # Set x-goog-api-client and x-goog-user-project headers
435
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
436
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
436
437
  lib_name: @config.lib_name, lib_version: @config.lib_version,
437
438
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
438
439
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -453,8 +454,8 @@ module Google
453
454
  yield response, operation if block_given?
454
455
  return response
455
456
  end
456
- rescue GRPC::BadStatus => e
457
- raise Google::Cloud::Error.from_error(e)
457
+ rescue ::GRPC::BadStatus => e
458
+ raise ::Google::Cloud::Error.from_error(e)
458
459
  end
459
460
 
460
461
  ##
@@ -462,12 +463,12 @@ module Google
462
463
  #
463
464
  # @overload update_intent(request, options = nil)
464
465
  # Pass arguments to `update_intent` via a request object, either of type
465
- # {Google::Cloud::Dialogflow::V2::UpdateIntentRequest} or an equivalent Hash.
466
+ # {::Google::Cloud::Dialogflow::V2::UpdateIntentRequest} or an equivalent Hash.
466
467
  #
467
- # @param request [Google::Cloud::Dialogflow::V2::UpdateIntentRequest, Hash]
468
+ # @param request [::Google::Cloud::Dialogflow::V2::UpdateIntentRequest, ::Hash]
468
469
  # A request object representing the call parameters. Required. To specify no
469
470
  # parameters, or to keep all the default parameter values, pass an empty Hash.
470
- # @param options [Gapic::CallOptions, Hash]
471
+ # @param options [::Gapic::CallOptions, ::Hash]
471
472
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
472
473
  #
473
474
  # @overload update_intent(intent: nil, language_code: nil, update_mask: nil, intent_view: nil)
@@ -475,40 +476,40 @@ module Google
475
476
  # least one keyword argument is required. To specify no parameters, or to keep all
476
477
  # the default parameter values, pass an empty Hash as a request object (see above).
477
478
  #
478
- # @param intent [Google::Cloud::Dialogflow::V2::Intent, Hash]
479
+ # @param intent [::Google::Cloud::Dialogflow::V2::Intent, ::Hash]
479
480
  # Required. The intent to update.
480
- # @param language_code [String]
481
+ # @param language_code [::String]
481
482
  # Optional. The language used to access language-specific data.
482
483
  # If not specified, the agent's default language is used.
483
484
  # For more information, see
484
485
  # [Multilingual intent and entity
485
486
  # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
486
- # @param update_mask [Google::Protobuf::FieldMask, Hash]
487
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
487
488
  # Optional. The mask to control which fields get updated.
488
- # @param intent_view [Google::Cloud::Dialogflow::V2::IntentView]
489
+ # @param intent_view [::Google::Cloud::Dialogflow::V2::IntentView]
489
490
  # Optional. The resource view to apply to the returned intent.
490
491
  #
491
492
  # @yield [response, operation] Access the result along with the RPC operation
492
- # @yieldparam response [Google::Cloud::Dialogflow::V2::Intent]
493
- # @yieldparam operation [GRPC::ActiveCall::Operation]
493
+ # @yieldparam response [::Google::Cloud::Dialogflow::V2::Intent]
494
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
494
495
  #
495
- # @return [Google::Cloud::Dialogflow::V2::Intent]
496
+ # @return [::Google::Cloud::Dialogflow::V2::Intent]
496
497
  #
497
- # @raise [Google::Cloud::Error] if the RPC is aborted.
498
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
498
499
  #
499
500
  def update_intent request, options = nil
500
- raise ArgumentError, "request must be provided" if request.nil?
501
+ raise ::ArgumentError, "request must be provided" if request.nil?
501
502
 
502
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::UpdateIntentRequest
503
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::UpdateIntentRequest
503
504
 
504
505
  # Converts hash and nil to an options object
505
- 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
506
507
 
507
508
  # Customize the options with defaults
508
509
  metadata = @config.rpcs.update_intent.metadata.to_h
509
510
 
510
511
  # Set x-goog-api-client and x-goog-user-project headers
511
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
512
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
512
513
  lib_name: @config.lib_name, lib_version: @config.lib_version,
513
514
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
514
515
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -529,8 +530,8 @@ module Google
529
530
  yield response, operation if block_given?
530
531
  return response
531
532
  end
532
- rescue GRPC::BadStatus => e
533
- raise Google::Cloud::Error.from_error(e)
533
+ rescue ::GRPC::BadStatus => e
534
+ raise ::Google::Cloud::Error.from_error(e)
534
535
  end
535
536
 
536
537
  ##
@@ -538,12 +539,12 @@ module Google
538
539
  #
539
540
  # @overload delete_intent(request, options = nil)
540
541
  # Pass arguments to `delete_intent` via a request object, either of type
541
- # {Google::Cloud::Dialogflow::V2::DeleteIntentRequest} or an equivalent Hash.
542
+ # {::Google::Cloud::Dialogflow::V2::DeleteIntentRequest} or an equivalent Hash.
542
543
  #
543
- # @param request [Google::Cloud::Dialogflow::V2::DeleteIntentRequest, Hash]
544
+ # @param request [::Google::Cloud::Dialogflow::V2::DeleteIntentRequest, ::Hash]
544
545
  # A request object representing the call parameters. Required. To specify no
545
546
  # parameters, or to keep all the default parameter values, pass an empty Hash.
546
- # @param options [Gapic::CallOptions, Hash]
547
+ # @param options [::Gapic::CallOptions, ::Hash]
547
548
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
548
549
  #
549
550
  # @overload delete_intent(name: nil)
@@ -551,32 +552,32 @@ module Google
551
552
  # least one keyword argument is required. To specify no parameters, or to keep all
552
553
  # the default parameter values, pass an empty Hash as a request object (see above).
553
554
  #
554
- # @param name [String]
555
+ # @param name [::String]
555
556
  # Required. The name of the intent to delete. If this intent has direct or
556
557
  # indirect followup intents, we also delete them.
557
558
  # Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
558
559
  #
559
560
  # @yield [response, operation] Access the result along with the RPC operation
560
- # @yieldparam response [Google::Protobuf::Empty]
561
- # @yieldparam operation [GRPC::ActiveCall::Operation]
561
+ # @yieldparam response [::Google::Protobuf::Empty]
562
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
562
563
  #
563
- # @return [Google::Protobuf::Empty]
564
+ # @return [::Google::Protobuf::Empty]
564
565
  #
565
- # @raise [Google::Cloud::Error] if the RPC is aborted.
566
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
566
567
  #
567
568
  def delete_intent request, options = nil
568
- raise ArgumentError, "request must be provided" if request.nil?
569
+ raise ::ArgumentError, "request must be provided" if request.nil?
569
570
 
570
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::DeleteIntentRequest
571
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::DeleteIntentRequest
571
572
 
572
573
  # Converts hash and nil to an options object
573
- 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
574
575
 
575
576
  # Customize the options with defaults
576
577
  metadata = @config.rpcs.delete_intent.metadata.to_h
577
578
 
578
579
  # Set x-goog-api-client and x-goog-user-project headers
579
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
580
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
580
581
  lib_name: @config.lib_name, lib_version: @config.lib_version,
581
582
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
582
583
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -597,23 +598,23 @@ module Google
597
598
  yield response, operation if block_given?
598
599
  return response
599
600
  end
600
- rescue GRPC::BadStatus => e
601
- raise Google::Cloud::Error.from_error(e)
601
+ rescue ::GRPC::BadStatus => e
602
+ raise ::Google::Cloud::Error.from_error(e)
602
603
  end
603
604
 
604
605
  ##
605
606
  # Updates/Creates multiple intents in the specified agent.
606
607
  #
607
- # Operation <response: {Google::Cloud::Dialogflow::V2::BatchUpdateIntentsResponse BatchUpdateIntentsResponse}>
608
+ # Operation <response: {::Google::Cloud::Dialogflow::V2::BatchUpdateIntentsResponse BatchUpdateIntentsResponse}>
608
609
  #
609
610
  # @overload batch_update_intents(request, options = nil)
610
611
  # Pass arguments to `batch_update_intents` via a request object, either of type
611
- # {Google::Cloud::Dialogflow::V2::BatchUpdateIntentsRequest} or an equivalent Hash.
612
+ # {::Google::Cloud::Dialogflow::V2::BatchUpdateIntentsRequest} or an equivalent Hash.
612
613
  #
613
- # @param request [Google::Cloud::Dialogflow::V2::BatchUpdateIntentsRequest, Hash]
614
+ # @param request [::Google::Cloud::Dialogflow::V2::BatchUpdateIntentsRequest, ::Hash]
614
615
  # A request object representing the call parameters. Required. To specify no
615
616
  # parameters, or to keep all the default parameter values, pass an empty Hash.
616
- # @param options [Gapic::CallOptions, Hash]
617
+ # @param options [::Gapic::CallOptions, ::Hash]
617
618
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
618
619
  #
619
620
  # @overload batch_update_intents(parent: nil, intent_batch_uri: nil, intent_batch_inline: nil, language_code: nil, update_mask: nil, intent_view: nil)
@@ -621,47 +622,47 @@ module Google
621
622
  # least one keyword argument is required. To specify no parameters, or to keep all
622
623
  # the default parameter values, pass an empty Hash as a request object (see above).
623
624
  #
624
- # @param parent [String]
625
+ # @param parent [::String]
625
626
  # Required. The name of the agent to update or create intents in.
626
627
  # Format: `projects/<Project ID>/agent`.
627
- # @param intent_batch_uri [String]
628
+ # @param intent_batch_uri [::String]
628
629
  # The URI to a Google Cloud Storage file containing intents to update or
629
630
  # create. The file format can either be a serialized proto (of IntentBatch
630
631
  # type) or JSON object. Note: The URI must start with "gs://".
631
- # @param intent_batch_inline [Google::Cloud::Dialogflow::V2::IntentBatch, Hash]
632
+ # @param intent_batch_inline [::Google::Cloud::Dialogflow::V2::IntentBatch, ::Hash]
632
633
  # The collection of intents to update or create.
633
- # @param language_code [String]
634
+ # @param language_code [::String]
634
635
  # Optional. The language used to access language-specific data.
635
636
  # If not specified, the agent's default language is used.
636
637
  # For more information, see
637
638
  # [Multilingual intent and entity
638
639
  # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
639
- # @param update_mask [Google::Protobuf::FieldMask, Hash]
640
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
640
641
  # Optional. The mask to control which fields get updated.
641
- # @param intent_view [Google::Cloud::Dialogflow::V2::IntentView]
642
+ # @param intent_view [::Google::Cloud::Dialogflow::V2::IntentView]
642
643
  # Optional. The resource view to apply to the returned intent.
643
644
  #
644
645
  # @yield [response, operation] Access the result along with the RPC operation
645
- # @yieldparam response [Gapic::Operation]
646
- # @yieldparam operation [GRPC::ActiveCall::Operation]
646
+ # @yieldparam response [::Gapic::Operation]
647
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
647
648
  #
648
- # @return [Gapic::Operation]
649
+ # @return [::Gapic::Operation]
649
650
  #
650
- # @raise [Google::Cloud::Error] if the RPC is aborted.
651
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
651
652
  #
652
653
  def batch_update_intents request, options = nil
653
- raise ArgumentError, "request must be provided" if request.nil?
654
+ raise ::ArgumentError, "request must be provided" if request.nil?
654
655
 
655
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::BatchUpdateIntentsRequest
656
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::BatchUpdateIntentsRequest
656
657
 
657
658
  # Converts hash and nil to an options object
658
- 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
659
660
 
660
661
  # Customize the options with defaults
661
662
  metadata = @config.rpcs.batch_update_intents.metadata.to_h
662
663
 
663
664
  # Set x-goog-api-client and x-goog-user-project headers
664
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
665
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
665
666
  lib_name: @config.lib_name, lib_version: @config.lib_version,
666
667
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
667
668
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -679,27 +680,27 @@ module Google
679
680
  retry_policy: @config.retry_policy
680
681
 
681
682
  @intents_stub.call_rpc :batch_update_intents, request, options: options do |response, operation|
682
- response = Gapic::Operation.new response, @operations_client, options: options
683
+ response = ::Gapic::Operation.new response, @operations_client, options: options
683
684
  yield response, operation if block_given?
684
685
  return response
685
686
  end
686
- rescue GRPC::BadStatus => e
687
- raise Google::Cloud::Error.from_error(e)
687
+ rescue ::GRPC::BadStatus => e
688
+ raise ::Google::Cloud::Error.from_error(e)
688
689
  end
689
690
 
690
691
  ##
691
692
  # Deletes intents in the specified agent.
692
693
  #
693
- # Operation <response: {Google::Protobuf::Empty google.protobuf.Empty}>
694
+ # Operation <response: {::Google::Protobuf::Empty google.protobuf.Empty}>
694
695
  #
695
696
  # @overload batch_delete_intents(request, options = nil)
696
697
  # Pass arguments to `batch_delete_intents` via a request object, either of type
697
- # {Google::Cloud::Dialogflow::V2::BatchDeleteIntentsRequest} or an equivalent Hash.
698
+ # {::Google::Cloud::Dialogflow::V2::BatchDeleteIntentsRequest} or an equivalent Hash.
698
699
  #
699
- # @param request [Google::Cloud::Dialogflow::V2::BatchDeleteIntentsRequest, Hash]
700
+ # @param request [::Google::Cloud::Dialogflow::V2::BatchDeleteIntentsRequest, ::Hash]
700
701
  # A request object representing the call parameters. Required. To specify no
701
702
  # parameters, or to keep all the default parameter values, pass an empty Hash.
702
- # @param options [Gapic::CallOptions, Hash]
703
+ # @param options [::Gapic::CallOptions, ::Hash]
703
704
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
704
705
  #
705
706
  # @overload batch_delete_intents(parent: nil, intents: nil)
@@ -707,34 +708,34 @@ module Google
707
708
  # least one keyword argument is required. To specify no parameters, or to keep all
708
709
  # the default parameter values, pass an empty Hash as a request object (see above).
709
710
  #
710
- # @param parent [String]
711
+ # @param parent [::String]
711
712
  # Required. The name of the agent to delete all entities types for. Format:
712
713
  # `projects/<Project ID>/agent`.
713
- # @param intents [Array<Google::Cloud::Dialogflow::V2::Intent, Hash>]
714
+ # @param intents [::Array<::Google::Cloud::Dialogflow::V2::Intent, ::Hash>]
714
715
  # Required. The collection of intents to delete. Only intent `name` must be
715
716
  # filled in.
716
717
  #
717
718
  # @yield [response, operation] Access the result along with the RPC operation
718
- # @yieldparam response [Gapic::Operation]
719
- # @yieldparam operation [GRPC::ActiveCall::Operation]
719
+ # @yieldparam response [::Gapic::Operation]
720
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
720
721
  #
721
- # @return [Gapic::Operation]
722
+ # @return [::Gapic::Operation]
722
723
  #
723
- # @raise [Google::Cloud::Error] if the RPC is aborted.
724
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
724
725
  #
725
726
  def batch_delete_intents request, options = nil
726
- raise ArgumentError, "request must be provided" if request.nil?
727
+ raise ::ArgumentError, "request must be provided" if request.nil?
727
728
 
728
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::BatchDeleteIntentsRequest
729
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::BatchDeleteIntentsRequest
729
730
 
730
731
  # Converts hash and nil to an options object
731
- 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
732
733
 
733
734
  # Customize the options with defaults
734
735
  metadata = @config.rpcs.batch_delete_intents.metadata.to_h
735
736
 
736
737
  # Set x-goog-api-client and x-goog-user-project headers
737
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
738
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
738
739
  lib_name: @config.lib_name, lib_version: @config.lib_version,
739
740
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
740
741
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -752,12 +753,12 @@ module Google
752
753
  retry_policy: @config.retry_policy
753
754
 
754
755
  @intents_stub.call_rpc :batch_delete_intents, request, options: options do |response, operation|
755
- response = Gapic::Operation.new response, @operations_client, options: options
756
+ response = ::Gapic::Operation.new response, @operations_client, options: options
756
757
  yield response, operation if block_given?
757
758
  return response
758
759
  end
759
- rescue GRPC::BadStatus => e
760
- raise Google::Cloud::Error.from_error(e)
760
+ rescue ::GRPC::BadStatus => e
761
+ raise ::Google::Cloud::Error.from_error(e)
761
762
  end
762
763
 
763
764
  ##
@@ -767,7 +768,7 @@ module Google
767
768
  # providing control over timeouts, retry behavior, logging, transport
768
769
  # parameters, and other low-level controls. Certain parameters can also be
769
770
  # applied individually to specific RPCs. See
770
- # {Google::Cloud::Dialogflow::V2::Intents::Client::Configuration::Rpcs}
771
+ # {::Google::Cloud::Dialogflow::V2::Intents::Client::Configuration::Rpcs}
771
772
  # for a list of RPCs that can be configured independently.
772
773
  #
773
774
  # Configuration can be applied globally to all clients, or to a single client
@@ -778,22 +779,22 @@ module Google
778
779
  # To modify the global config, setting the timeout for list_intents
779
780
  # to 20 seconds, and all remaining timeouts to 10 seconds:
780
781
  #
781
- # Google::Cloud::Dialogflow::V2::Intents::Client.configure do |config|
782
- # config.timeout = 10_000
783
- # 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
784
785
  # end
785
786
  #
786
787
  # To apply the above configuration only to a new client:
787
788
  #
788
- # client = Google::Cloud::Dialogflow::V2::Intents::Client.new do |config|
789
- # config.timeout = 10_000
790
- # 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
791
792
  # end
792
793
  #
793
794
  # @!attribute [rw] endpoint
794
795
  # The hostname or hostname:port of the service endpoint.
795
796
  # Defaults to `"dialogflow.googleapis.com"`.
796
- # @return [String]
797
+ # @return [::String]
797
798
  # @!attribute [rw] credentials
798
799
  # Credentials to send with calls. You may provide any of the following types:
799
800
  # * (`String`) The path to a service account key file in JSON format
@@ -805,29 +806,29 @@ module Google
805
806
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
806
807
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
807
808
  # * (`nil`) indicating no credentials
808
- # @return [Object]
809
+ # @return [::Object]
809
810
  # @!attribute [rw] scope
810
811
  # The OAuth scopes
811
- # @return [Array<String>]
812
+ # @return [::Array<::String>]
812
813
  # @!attribute [rw] lib_name
813
814
  # The library name as recorded in instrumentation and logging
814
- # @return [String]
815
+ # @return [::String]
815
816
  # @!attribute [rw] lib_version
816
817
  # The library version as recorded in instrumentation and logging
817
- # @return [String]
818
+ # @return [::String]
818
819
  # @!attribute [rw] channel_args
819
820
  # Extra parameters passed to the gRPC channel. Note: this is ignored if a
820
821
  # `GRPC::Core::Channel` object is provided as the credential.
821
- # @return [Hash]
822
+ # @return [::Hash]
822
823
  # @!attribute [rw] interceptors
823
824
  # An array of interceptors that are run before calls are executed.
824
- # @return [Array<GRPC::ClientInterceptor>]
825
+ # @return [::Array<::GRPC::ClientInterceptor>]
825
826
  # @!attribute [rw] timeout
826
- # The call timeout in milliseconds.
827
- # @return [Numeric]
827
+ # The call timeout in seconds.
828
+ # @return [::Numeric]
828
829
  # @!attribute [rw] metadata
829
830
  # Additional gRPC headers to be sent with the call.
830
- # @return [Hash{Symbol=>String}]
831
+ # @return [::Hash{::Symbol=>::String}]
831
832
  # @!attribute [rw] retry_policy
832
833
  # The retry policy. The value is a hash with the following keys:
833
834
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
@@ -835,25 +836,29 @@ module Google
835
836
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
836
837
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
837
838
  # trigger a retry.
838
- # @return [Hash]
839
+ # @return [::Hash]
840
+ # @!attribute [rw] quota_project
841
+ # A separate project against which to charge quota.
842
+ # @return [::String]
839
843
  #
840
844
  class Configuration
841
- extend Gapic::Config
845
+ extend ::Gapic::Config
842
846
 
843
- config_attr :endpoint, "dialogflow.googleapis.com", String
844
- config_attr :credentials, nil do |value|
847
+ config_attr :endpoint, "dialogflow.googleapis.com", ::String
848
+ config_attr :credentials, nil do |value|
845
849
  allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
846
850
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
847
851
  allowed.any? { |klass| klass === value }
848
852
  end
849
- config_attr :scope, nil, String, Array, nil
850
- config_attr :lib_name, nil, String, nil
851
- config_attr :lib_version, nil, String, nil
852
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, Hash, nil)
853
- config_attr :interceptors, nil, Array, nil
854
- config_attr :timeout, nil, Numeric, nil
855
- config_attr :metadata, nil, Hash, nil
856
- 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
857
862
 
858
863
  # @private
859
864
  def initialize parent_config = nil
@@ -869,7 +874,7 @@ module Google
869
874
  def rpcs
870
875
  @rpcs ||= begin
871
876
  parent_rpcs = nil
872
- parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to? :rpcs
877
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
873
878
  Rpcs.new parent_rpcs
874
879
  end
875
880
  end
@@ -894,56 +899,56 @@ module Google
894
899
  class Rpcs
895
900
  ##
896
901
  # RPC-specific configuration for `list_intents`
897
- # @return [Gapic::Config::Method]
902
+ # @return [::Gapic::Config::Method]
898
903
  #
899
904
  attr_reader :list_intents
900
905
  ##
901
906
  # RPC-specific configuration for `get_intent`
902
- # @return [Gapic::Config::Method]
907
+ # @return [::Gapic::Config::Method]
903
908
  #
904
909
  attr_reader :get_intent
905
910
  ##
906
911
  # RPC-specific configuration for `create_intent`
907
- # @return [Gapic::Config::Method]
912
+ # @return [::Gapic::Config::Method]
908
913
  #
909
914
  attr_reader :create_intent
910
915
  ##
911
916
  # RPC-specific configuration for `update_intent`
912
- # @return [Gapic::Config::Method]
917
+ # @return [::Gapic::Config::Method]
913
918
  #
914
919
  attr_reader :update_intent
915
920
  ##
916
921
  # RPC-specific configuration for `delete_intent`
917
- # @return [Gapic::Config::Method]
922
+ # @return [::Gapic::Config::Method]
918
923
  #
919
924
  attr_reader :delete_intent
920
925
  ##
921
926
  # RPC-specific configuration for `batch_update_intents`
922
- # @return [Gapic::Config::Method]
927
+ # @return [::Gapic::Config::Method]
923
928
  #
924
929
  attr_reader :batch_update_intents
925
930
  ##
926
931
  # RPC-specific configuration for `batch_delete_intents`
927
- # @return [Gapic::Config::Method]
932
+ # @return [::Gapic::Config::Method]
928
933
  #
929
934
  attr_reader :batch_delete_intents
930
935
 
931
936
  # @private
932
937
  def initialize parent_rpcs = nil
933
938
  list_intents_config = parent_rpcs&.list_intents if parent_rpcs&.respond_to? :list_intents
934
- @list_intents = Gapic::Config::Method.new list_intents_config
939
+ @list_intents = ::Gapic::Config::Method.new list_intents_config
935
940
  get_intent_config = parent_rpcs&.get_intent if parent_rpcs&.respond_to? :get_intent
936
- @get_intent = Gapic::Config::Method.new get_intent_config
941
+ @get_intent = ::Gapic::Config::Method.new get_intent_config
937
942
  create_intent_config = parent_rpcs&.create_intent if parent_rpcs&.respond_to? :create_intent
938
- @create_intent = Gapic::Config::Method.new create_intent_config
943
+ @create_intent = ::Gapic::Config::Method.new create_intent_config
939
944
  update_intent_config = parent_rpcs&.update_intent if parent_rpcs&.respond_to? :update_intent
940
- @update_intent = Gapic::Config::Method.new update_intent_config
945
+ @update_intent = ::Gapic::Config::Method.new update_intent_config
941
946
  delete_intent_config = parent_rpcs&.delete_intent if parent_rpcs&.respond_to? :delete_intent
942
- @delete_intent = Gapic::Config::Method.new delete_intent_config
947
+ @delete_intent = ::Gapic::Config::Method.new delete_intent_config
943
948
  batch_update_intents_config = parent_rpcs&.batch_update_intents if parent_rpcs&.respond_to? :batch_update_intents
944
- @batch_update_intents = Gapic::Config::Method.new batch_update_intents_config
949
+ @batch_update_intents = ::Gapic::Config::Method.new batch_update_intents_config
945
950
  batch_delete_intents_config = parent_rpcs&.batch_delete_intents if parent_rpcs&.respond_to? :batch_delete_intents
946
- @batch_delete_intents = Gapic::Config::Method.new batch_delete_intents_config
951
+ @batch_delete_intents = ::Gapic::Config::Method.new batch_delete_intents_config
947
952
 
948
953
  yield self if block_given?
949
954
  end