google-cloud-dialogflow-v2 0.10.0 → 0.11.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +8 -8
  3. data/README.md +2 -2
  4. data/lib/google/cloud/dialogflow/v2/agent_services_pb.rb +39 -5
  5. data/lib/google/cloud/dialogflow/v2/agents/client.rb +96 -54
  6. data/lib/google/cloud/dialogflow/v2/agents/operations.rb +34 -25
  7. data/lib/google/cloud/dialogflow/v2/answer_record_services_pb.rb +1 -1
  8. data/lib/google/cloud/dialogflow/v2/answer_records/client.rb +37 -43
  9. data/lib/google/cloud/dialogflow/v2/audio_config_pb.rb +1 -0
  10. data/lib/google/cloud/dialogflow/v2/context_services_pb.rb +1 -1
  11. data/lib/google/cloud/dialogflow/v2/contexts/client.rb +49 -47
  12. data/lib/google/cloud/dialogflow/v2/conversation_profile_services_pb.rb +1 -1
  13. data/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb +46 -46
  14. data/lib/google/cloud/dialogflow/v2/conversation_services_pb.rb +1 -1
  15. data/lib/google/cloud/dialogflow/v2/conversations/client.rb +46 -46
  16. data/lib/google/cloud/dialogflow/v2/document_services_pb.rb +27 -10
  17. data/lib/google/cloud/dialogflow/v2/documents/client.rb +75 -56
  18. data/lib/google/cloud/dialogflow/v2/documents/operations.rb +34 -25
  19. data/lib/google/cloud/dialogflow/v2/entity_type_services_pb.rb +45 -1
  20. data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +104 -51
  21. data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +34 -25
  22. data/lib/google/cloud/dialogflow/v2/environment_services_pb.rb +7 -7
  23. data/lib/google/cloud/dialogflow/v2/environments/client.rb +69 -56
  24. data/lib/google/cloud/dialogflow/v2/fulfillment_services_pb.rb +1 -1
  25. data/lib/google/cloud/dialogflow/v2/fulfillments/client.rb +37 -43
  26. data/lib/google/cloud/dialogflow/v2/intent_services_pb.rb +16 -1
  27. data/lib/google/cloud/dialogflow/v2/intents/client.rb +67 -48
  28. data/lib/google/cloud/dialogflow/v2/intents/operations.rb +34 -25
  29. data/lib/google/cloud/dialogflow/v2/knowledge_base_services_pb.rb +1 -1
  30. data/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +46 -46
  31. data/lib/google/cloud/dialogflow/v2/participant_services_pb.rb +1 -1
  32. data/lib/google/cloud/dialogflow/v2/participants/client.rb +53 -52
  33. data/lib/google/cloud/dialogflow/v2/session_entity_type_services_pb.rb +1 -1
  34. data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +46 -46
  35. data/lib/google/cloud/dialogflow/v2/session_pb.rb +1 -0
  36. data/lib/google/cloud/dialogflow/v2/session_services_pb.rb +1 -1
  37. data/lib/google/cloud/dialogflow/v2/sessions/client.rb +38 -47
  38. data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
  39. data/lib/google/cloud/dialogflow/v2/version_services_pb.rb +1 -1
  40. data/lib/google/cloud/dialogflow/v2/versions/client.rb +51 -46
  41. data/proto_docs/google/api/field_behavior.rb +7 -1
  42. data/proto_docs/google/cloud/dialogflow/v2/environment.rb +22 -4
  43. data/proto_docs/google/cloud/dialogflow/v2/intent.rb +4 -3
  44. data/proto_docs/google/cloud/dialogflow/v2/session.rb +3 -0
  45. data/proto_docs/google/cloud/dialogflow/v2/validation_result.rb +1 -1
  46. data/proto_docs/google/cloud/dialogflow/v2/version.rb +6 -0
  47. metadata +8 -7
@@ -27,7 +27,7 @@ module Google
27
27
  # Service for managing [Conversations][google.cloud.dialogflow.v2.Conversation].
28
28
  class Service
29
29
 
30
- include ::GRPC::GenericService
30
+ include GRPC::GenericService
31
31
 
32
32
  self.marshal_class_method = :encode
33
33
  self.unmarshal_class_method = :decode
@@ -41,13 +41,12 @@ module Google
41
41
  # See {::Google::Cloud::Dialogflow::V2::Conversations::Client::Configuration}
42
42
  # for a description of the configuration fields.
43
43
  #
44
- # ## Example
44
+ # @example
45
45
  #
46
- # To modify the configuration for all Conversations clients:
47
- #
48
- # ::Google::Cloud::Dialogflow::V2::Conversations::Client.configure do |config|
49
- # config.timeout = 10.0
50
- # end
46
+ # # Modify the configuration for all Conversations clients
47
+ # ::Google::Cloud::Dialogflow::V2::Conversations::Client.configure do |config|
48
+ # config.timeout = 10.0
49
+ # end
51
50
  #
52
51
  # @yield [config] Configure the Client client.
53
52
  # @yieldparam config [Client::Configuration]
@@ -67,10 +66,7 @@ module Google
67
66
 
68
67
  default_config.timeout = 60.0
69
68
  default_config.retry_policy = {
70
- initial_delay: 0.1,
71
- max_delay: 60.0,
72
- multiplier: 1.3,
73
- retry_codes: [14]
69
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
74
70
  }
75
71
 
76
72
  default_config
@@ -102,19 +98,15 @@ module Google
102
98
  ##
103
99
  # Create a new Conversations client object.
104
100
  #
105
- # ## Examples
106
- #
107
- # To create a new Conversations client with the default
108
- # configuration:
109
- #
110
- # client = ::Google::Cloud::Dialogflow::V2::Conversations::Client.new
101
+ # @example
111
102
  #
112
- # To create a new Conversations client with a custom
113
- # configuration:
103
+ # # Create a client using the default configuration
104
+ # client = ::Google::Cloud::Dialogflow::V2::Conversations::Client.new
114
105
  #
115
- # client = ::Google::Cloud::Dialogflow::V2::Conversations::Client.new do |config|
116
- # config.timeout = 10.0
117
- # end
106
+ # # Create a client using a custom configuration
107
+ # client = ::Google::Cloud::Dialogflow::V2::Conversations::Client.new do |config|
108
+ # config.timeout = 10.0
109
+ # end
118
110
  #
119
111
  # @yield [config] Configure the Conversations client.
120
112
  # @yieldparam config [Client::Configuration]
@@ -134,14 +126,13 @@ module Google
134
126
 
135
127
  # Create credentials
136
128
  credentials = @config.credentials
137
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
129
+ # Use self-signed JWT if the endpoint is unchanged from default,
138
130
  # but only if the default endpoint does not have a region prefix.
139
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
140
- @config.endpoint == Client.configure.endpoint &&
131
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
141
132
  !@config.endpoint.split(".").first.include?("-")
142
133
  credentials ||= Credentials.default scope: @config.scope,
143
134
  enable_self_signed_jwt: enable_self_signed_jwt
144
- if credentials.is_a?(String) || credentials.is_a?(Hash)
135
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
145
136
  credentials = Credentials.new credentials, scope: @config.scope
146
137
  end
147
138
  @quota_project_id = @config.quota_project
@@ -244,7 +235,9 @@ module Google
244
235
  options.apply_defaults timeout: @config.rpcs.create_conversation.timeout,
245
236
  metadata: metadata,
246
237
  retry_policy: @config.rpcs.create_conversation.retry_policy
247
- options.apply_defaults metadata: @config.metadata,
238
+
239
+ options.apply_defaults timeout: @config.timeout,
240
+ metadata: @config.metadata,
248
241
  retry_policy: @config.retry_policy
249
242
 
250
243
  @conversations_stub.call_rpc :create_conversation, request, options: options do |response, operation|
@@ -334,7 +327,9 @@ module Google
334
327
  options.apply_defaults timeout: @config.rpcs.list_conversations.timeout,
335
328
  metadata: metadata,
336
329
  retry_policy: @config.rpcs.list_conversations.retry_policy
337
- options.apply_defaults metadata: @config.metadata,
330
+
331
+ options.apply_defaults timeout: @config.timeout,
332
+ metadata: @config.metadata,
338
333
  retry_policy: @config.retry_policy
339
334
 
340
335
  @conversations_stub.call_rpc :list_conversations, request, options: options do |response, operation|
@@ -403,7 +398,9 @@ module Google
403
398
  options.apply_defaults timeout: @config.rpcs.get_conversation.timeout,
404
399
  metadata: metadata,
405
400
  retry_policy: @config.rpcs.get_conversation.retry_policy
406
- options.apply_defaults metadata: @config.metadata,
401
+
402
+ options.apply_defaults timeout: @config.timeout,
403
+ metadata: @config.metadata,
407
404
  retry_policy: @config.retry_policy
408
405
 
409
406
  @conversations_stub.call_rpc :get_conversation, request, options: options do |response, operation|
@@ -472,7 +469,9 @@ module Google
472
469
  options.apply_defaults timeout: @config.rpcs.complete_conversation.timeout,
473
470
  metadata: metadata,
474
471
  retry_policy: @config.rpcs.complete_conversation.retry_policy
475
- options.apply_defaults metadata: @config.metadata,
472
+
473
+ options.apply_defaults timeout: @config.timeout,
474
+ metadata: @config.metadata,
476
475
  retry_policy: @config.retry_policy
477
476
 
478
477
  @conversations_stub.call_rpc :complete_conversation, request, options: options do |response, operation|
@@ -558,7 +557,9 @@ module Google
558
557
  options.apply_defaults timeout: @config.rpcs.list_messages.timeout,
559
558
  metadata: metadata,
560
559
  retry_policy: @config.rpcs.list_messages.retry_policy
561
- options.apply_defaults metadata: @config.metadata,
560
+
561
+ options.apply_defaults timeout: @config.timeout,
562
+ metadata: @config.metadata,
562
563
  retry_policy: @config.retry_policy
563
564
 
564
565
  @conversations_stub.call_rpc :list_messages, request, options: options do |response, operation|
@@ -583,22 +584,21 @@ module Google
583
584
  # Configuration can be applied globally to all clients, or to a single client
584
585
  # on construction.
585
586
  #
586
- # # Examples
587
- #
588
- # To modify the global config, setting the timeout for create_conversation
589
- # to 20 seconds, and all remaining timeouts to 10 seconds:
590
- #
591
- # ::Google::Cloud::Dialogflow::V2::Conversations::Client.configure do |config|
592
- # config.timeout = 10.0
593
- # config.rpcs.create_conversation.timeout = 20.0
594
- # end
595
- #
596
- # To apply the above configuration only to a new client:
597
- #
598
- # client = ::Google::Cloud::Dialogflow::V2::Conversations::Client.new do |config|
599
- # config.timeout = 10.0
600
- # config.rpcs.create_conversation.timeout = 20.0
601
- # end
587
+ # @example
588
+ #
589
+ # # Modify the global config, setting the timeout for
590
+ # # create_conversation to 20 seconds,
591
+ # # and all remaining timeouts to 10 seconds.
592
+ # ::Google::Cloud::Dialogflow::V2::Conversations::Client.configure do |config|
593
+ # config.timeout = 10.0
594
+ # config.rpcs.create_conversation.timeout = 20.0
595
+ # end
596
+ #
597
+ # # Apply the above configuration only to a new client.
598
+ # client = ::Google::Cloud::Dialogflow::V2::Conversations::Client.new do |config|
599
+ # config.timeout = 10.0
600
+ # config.rpcs.create_conversation.timeout = 20.0
601
+ # end
602
602
  #
603
603
  # @!attribute [rw] endpoint
604
604
  # The hostname or hostname:port of the service endpoint.
@@ -27,7 +27,7 @@ module Google
27
27
  # Service for managing knowledge [Documents][google.cloud.dialogflow.v2.Document].
28
28
  class Service
29
29
 
30
- include ::GRPC::GenericService
30
+ include GRPC::GenericService
31
31
 
32
32
  self.marshal_class_method = :encode
33
33
  self.unmarshal_class_method = :decode
@@ -39,29 +39,46 @@ module Google
39
39
  rpc :GetDocument, ::Google::Cloud::Dialogflow::V2::GetDocumentRequest, ::Google::Cloud::Dialogflow::V2::Document
40
40
  # Creates a new document.
41
41
  #
42
- # Operation <response: [Document][google.cloud.dialogflow.v2.Document],
43
- # metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]>
42
+ # This method is a [long-running
43
+ # operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
44
+ # The returned `Operation` type has the following method-specific fields:
45
+ #
46
+ # - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
47
+ # - `response`: [Document][google.cloud.dialogflow.v2.Document]
44
48
  rpc :CreateDocument, ::Google::Cloud::Dialogflow::V2::CreateDocumentRequest, ::Google::Longrunning::Operation
45
49
  # Deletes the specified document.
46
50
  #
47
- # Operation <response: [google.protobuf.Empty][google.protobuf.Empty],
48
- # metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]>
51
+ # This method is a [long-running
52
+ # operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
53
+ # The returned `Operation` type has the following method-specific fields:
54
+ #
55
+ # - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
56
+ # - `response`: An [Empty
57
+ # message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
49
58
  rpc :DeleteDocument, ::Google::Cloud::Dialogflow::V2::DeleteDocumentRequest, ::Google::Longrunning::Operation
50
59
  # Updates the specified document.
51
60
  #
52
- # Operation <response: [Document][google.cloud.dialogflow.v2.Document],
53
- # metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]>
61
+ # This method is a [long-running
62
+ # operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
63
+ # The returned `Operation` type has the following method-specific fields:
64
+ #
65
+ # - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
66
+ # - `response`: [Document][google.cloud.dialogflow.v2.Document]
54
67
  rpc :UpdateDocument, ::Google::Cloud::Dialogflow::V2::UpdateDocumentRequest, ::Google::Longrunning::Operation
55
68
  # Reloads the specified document from its specified source, content_uri or
56
69
  # content. The previously loaded content of the document will be deleted.
57
70
  # Note: Even when the content of the document has not changed, there still
58
71
  # may be side effects because of internal implementation changes.
59
72
  #
73
+ # This method is a [long-running
74
+ # operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
75
+ # The returned `Operation` type has the following method-specific fields:
76
+ #
77
+ # - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
78
+ # - `response`: [Document][google.cloud.dialogflow.v2.Document]
79
+ #
60
80
  # Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
61
81
  # only use `projects.knowledgeBases.documents`.
62
- #
63
- # Operation <response: [Document][google.cloud.dialogflow.v2.Document],
64
- # metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]>
65
82
  rpc :ReloadDocument, ::Google::Cloud::Dialogflow::V2::ReloadDocumentRequest, ::Google::Longrunning::Operation
66
83
  end
67
84
 
@@ -41,13 +41,12 @@ module Google
41
41
  # See {::Google::Cloud::Dialogflow::V2::Documents::Client::Configuration}
42
42
  # for a description of the configuration fields.
43
43
  #
44
- # ## Example
44
+ # @example
45
45
  #
46
- # To modify the configuration for all Documents clients:
47
- #
48
- # ::Google::Cloud::Dialogflow::V2::Documents::Client.configure do |config|
49
- # config.timeout = 10.0
50
- # end
46
+ # # Modify the configuration for all Documents clients
47
+ # ::Google::Cloud::Dialogflow::V2::Documents::Client.configure do |config|
48
+ # config.timeout = 10.0
49
+ # end
51
50
  #
52
51
  # @yield [config] Configure the Client client.
53
52
  # @yieldparam config [Client::Configuration]
@@ -67,10 +66,7 @@ module Google
67
66
 
68
67
  default_config.timeout = 60.0
69
68
  default_config.retry_policy = {
70
- initial_delay: 0.1,
71
- max_delay: 60.0,
72
- multiplier: 1.3,
73
- retry_codes: [14]
69
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
74
70
  }
75
71
 
76
72
  default_config
@@ -102,19 +98,15 @@ module Google
102
98
  ##
103
99
  # Create a new Documents client object.
104
100
  #
105
- # ## Examples
106
- #
107
- # To create a new Documents client with the default
108
- # configuration:
109
- #
110
- # client = ::Google::Cloud::Dialogflow::V2::Documents::Client.new
101
+ # @example
111
102
  #
112
- # To create a new Documents client with a custom
113
- # configuration:
103
+ # # Create a client using the default configuration
104
+ # client = ::Google::Cloud::Dialogflow::V2::Documents::Client.new
114
105
  #
115
- # client = ::Google::Cloud::Dialogflow::V2::Documents::Client.new do |config|
116
- # config.timeout = 10.0
117
- # end
106
+ # # Create a client using a custom configuration
107
+ # client = ::Google::Cloud::Dialogflow::V2::Documents::Client.new do |config|
108
+ # config.timeout = 10.0
109
+ # end
118
110
  #
119
111
  # @yield [config] Configure the Documents client.
120
112
  # @yieldparam config [Client::Configuration]
@@ -134,14 +126,13 @@ module Google
134
126
 
135
127
  # Create credentials
136
128
  credentials = @config.credentials
137
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
129
+ # Use self-signed JWT if the endpoint is unchanged from default,
138
130
  # but only if the default endpoint does not have a region prefix.
139
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
140
- @config.endpoint == Client.configure.endpoint &&
131
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
141
132
  !@config.endpoint.split(".").first.include?("-")
142
133
  credentials ||= Credentials.default scope: @config.scope,
143
134
  enable_self_signed_jwt: enable_self_signed_jwt
144
- if credentials.is_a?(String) || credentials.is_a?(Hash)
135
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
145
136
  credentials = Credentials.new credentials, scope: @config.scope
146
137
  end
147
138
  @quota_project_id = @config.quota_project
@@ -232,7 +223,9 @@ module Google
232
223
  options.apply_defaults timeout: @config.rpcs.list_documents.timeout,
233
224
  metadata: metadata,
234
225
  retry_policy: @config.rpcs.list_documents.retry_policy
235
- options.apply_defaults metadata: @config.metadata,
226
+
227
+ options.apply_defaults timeout: @config.timeout,
228
+ metadata: @config.metadata,
236
229
  retry_policy: @config.retry_policy
237
230
 
238
231
  @documents_stub.call_rpc :list_documents, request, options: options do |response, operation|
@@ -301,7 +294,9 @@ module Google
301
294
  options.apply_defaults timeout: @config.rpcs.get_document.timeout,
302
295
  metadata: metadata,
303
296
  retry_policy: @config.rpcs.get_document.retry_policy
304
- options.apply_defaults metadata: @config.metadata,
297
+
298
+ options.apply_defaults timeout: @config.timeout,
299
+ metadata: @config.metadata,
305
300
  retry_policy: @config.retry_policy
306
301
 
307
302
  @documents_stub.call_rpc :get_document, request, options: options do |response, operation|
@@ -315,8 +310,12 @@ module Google
315
310
  ##
316
311
  # Creates a new document.
317
312
  #
318
- # Operation <response: {::Google::Cloud::Dialogflow::V2::Document Document},
319
- # metadata: {::Google::Cloud::Dialogflow::V2::KnowledgeOperationMetadata KnowledgeOperationMetadata}>
313
+ # This method is a [long-running
314
+ # operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
315
+ # The returned `Operation` type has the following method-specific fields:
316
+ #
317
+ # - `metadata`: {::Google::Cloud::Dialogflow::V2::KnowledgeOperationMetadata KnowledgeOperationMetadata}
318
+ # - `response`: {::Google::Cloud::Dialogflow::V2::Document Document}
320
319
  #
321
320
  # @overload create_document(request, options = nil)
322
321
  # Pass arguments to `create_document` via a request object, either of type
@@ -374,7 +373,9 @@ module Google
374
373
  options.apply_defaults timeout: @config.rpcs.create_document.timeout,
375
374
  metadata: metadata,
376
375
  retry_policy: @config.rpcs.create_document.retry_policy
377
- options.apply_defaults metadata: @config.metadata,
376
+
377
+ options.apply_defaults timeout: @config.timeout,
378
+ metadata: @config.metadata,
378
379
  retry_policy: @config.retry_policy
379
380
 
380
381
  @documents_stub.call_rpc :create_document, request, options: options do |response, operation|
@@ -389,8 +390,13 @@ module Google
389
390
  ##
390
391
  # Deletes the specified document.
391
392
  #
392
- # Operation <response: {::Google::Protobuf::Empty google.protobuf.Empty},
393
- # metadata: {::Google::Cloud::Dialogflow::V2::KnowledgeOperationMetadata KnowledgeOperationMetadata}>
393
+ # This method is a [long-running
394
+ # operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
395
+ # The returned `Operation` type has the following method-specific fields:
396
+ #
397
+ # - `metadata`: {::Google::Cloud::Dialogflow::V2::KnowledgeOperationMetadata KnowledgeOperationMetadata}
398
+ # - `response`: An [Empty
399
+ # message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
394
400
  #
395
401
  # @overload delete_document(request, options = nil)
396
402
  # Pass arguments to `delete_document` via a request object, either of type
@@ -446,7 +452,9 @@ module Google
446
452
  options.apply_defaults timeout: @config.rpcs.delete_document.timeout,
447
453
  metadata: metadata,
448
454
  retry_policy: @config.rpcs.delete_document.retry_policy
449
- options.apply_defaults metadata: @config.metadata,
455
+
456
+ options.apply_defaults timeout: @config.timeout,
457
+ metadata: @config.metadata,
450
458
  retry_policy: @config.retry_policy
451
459
 
452
460
  @documents_stub.call_rpc :delete_document, request, options: options do |response, operation|
@@ -461,8 +469,12 @@ module Google
461
469
  ##
462
470
  # Updates the specified document.
463
471
  #
464
- # Operation <response: {::Google::Cloud::Dialogflow::V2::Document Document},
465
- # metadata: {::Google::Cloud::Dialogflow::V2::KnowledgeOperationMetadata KnowledgeOperationMetadata}>
472
+ # This method is a [long-running
473
+ # operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
474
+ # The returned `Operation` type has the following method-specific fields:
475
+ #
476
+ # - `metadata`: {::Google::Cloud::Dialogflow::V2::KnowledgeOperationMetadata KnowledgeOperationMetadata}
477
+ # - `response`: {::Google::Cloud::Dialogflow::V2::Document Document}
466
478
  #
467
479
  # @overload update_document(request, options = nil)
468
480
  # Pass arguments to `update_document` via a request object, either of type
@@ -520,7 +532,9 @@ module Google
520
532
  options.apply_defaults timeout: @config.rpcs.update_document.timeout,
521
533
  metadata: metadata,
522
534
  retry_policy: @config.rpcs.update_document.retry_policy
523
- options.apply_defaults metadata: @config.metadata,
535
+
536
+ options.apply_defaults timeout: @config.timeout,
537
+ metadata: @config.metadata,
524
538
  retry_policy: @config.retry_policy
525
539
 
526
540
  @documents_stub.call_rpc :update_document, request, options: options do |response, operation|
@@ -538,12 +552,16 @@ module Google
538
552
  # Note: Even when the content of the document has not changed, there still
539
553
  # may be side effects because of internal implementation changes.
540
554
  #
555
+ # This method is a [long-running
556
+ # operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
557
+ # The returned `Operation` type has the following method-specific fields:
558
+ #
559
+ # - `metadata`: {::Google::Cloud::Dialogflow::V2::KnowledgeOperationMetadata KnowledgeOperationMetadata}
560
+ # - `response`: {::Google::Cloud::Dialogflow::V2::Document Document}
561
+ #
541
562
  # Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
542
563
  # only use `projects.knowledgeBases.documents`.
543
564
  #
544
- # Operation <response: {::Google::Cloud::Dialogflow::V2::Document Document},
545
- # metadata: {::Google::Cloud::Dialogflow::V2::KnowledgeOperationMetadata KnowledgeOperationMetadata}>
546
- #
547
565
  # @overload reload_document(request, options = nil)
548
566
  # Pass arguments to `reload_document` via a request object, either of type
549
567
  # {::Google::Cloud::Dialogflow::V2::ReloadDocumentRequest} or an equivalent Hash.
@@ -604,7 +622,9 @@ module Google
604
622
  options.apply_defaults timeout: @config.rpcs.reload_document.timeout,
605
623
  metadata: metadata,
606
624
  retry_policy: @config.rpcs.reload_document.retry_policy
607
- options.apply_defaults metadata: @config.metadata,
625
+
626
+ options.apply_defaults timeout: @config.timeout,
627
+ metadata: @config.metadata,
608
628
  retry_policy: @config.retry_policy
609
629
 
610
630
  @documents_stub.call_rpc :reload_document, request, options: options do |response, operation|
@@ -629,22 +649,21 @@ module Google
629
649
  # Configuration can be applied globally to all clients, or to a single client
630
650
  # on construction.
631
651
  #
632
- # # Examples
633
- #
634
- # To modify the global config, setting the timeout for list_documents
635
- # to 20 seconds, and all remaining timeouts to 10 seconds:
636
- #
637
- # ::Google::Cloud::Dialogflow::V2::Documents::Client.configure do |config|
638
- # config.timeout = 10.0
639
- # config.rpcs.list_documents.timeout = 20.0
640
- # end
641
- #
642
- # To apply the above configuration only to a new client:
643
- #
644
- # client = ::Google::Cloud::Dialogflow::V2::Documents::Client.new do |config|
645
- # config.timeout = 10.0
646
- # config.rpcs.list_documents.timeout = 20.0
647
- # end
652
+ # @example
653
+ #
654
+ # # Modify the global config, setting the timeout for
655
+ # # list_documents to 20 seconds,
656
+ # # and all remaining timeouts to 10 seconds.
657
+ # ::Google::Cloud::Dialogflow::V2::Documents::Client.configure do |config|
658
+ # config.timeout = 10.0
659
+ # config.rpcs.list_documents.timeout = 20.0
660
+ # end
661
+ #
662
+ # # Apply the above configuration only to a new client.
663
+ # client = ::Google::Cloud::Dialogflow::V2::Documents::Client.new do |config|
664
+ # config.timeout = 10.0
665
+ # config.rpcs.list_documents.timeout = 20.0
666
+ # end
648
667
  #
649
668
  # @!attribute [rw] endpoint
650
669
  # The hostname or hostname:port of the service endpoint.