google-cloud-dialogflow-v2 0.9.0 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/cloud/dialogflow/v2/agent_services_pb.rb +17 -6
- data/lib/google/cloud/dialogflow/v2/agents/client.rb +74 -55
- data/lib/google/cloud/dialogflow/v2/agents/operations.rb +34 -25
- data/lib/google/cloud/dialogflow/v2/answer_record_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/answer_records/client.rb +37 -43
- data/lib/google/cloud/dialogflow/v2/context_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/contexts/client.rb +49 -47
- data/lib/google/cloud/dialogflow/v2/conversation_profile_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb +46 -46
- data/lib/google/cloud/dialogflow/v2/conversation_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/conversations/client.rb +46 -46
- data/lib/google/cloud/dialogflow/v2/document_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/documents/client.rb +49 -47
- data/lib/google/cloud/dialogflow/v2/documents/operations.rb +34 -25
- data/lib/google/cloud/dialogflow/v2/entity_type_services_pb.rb +29 -8
- data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +89 -58
- data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +34 -25
- data/lib/google/cloud/dialogflow/v2/environment_services_pb.rb +7 -7
- data/lib/google/cloud/dialogflow/v2/environments/client.rb +69 -56
- data/lib/google/cloud/dialogflow/v2/environments/paths.rb +41 -0
- data/lib/google/cloud/dialogflow/v2/fulfillment_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/fulfillments/client.rb +37 -43
- data/lib/google/cloud/dialogflow/v2/intent_services_pb.rb +21 -3
- data/lib/google/cloud/dialogflow/v2/intents/client.rb +72 -50
- data/lib/google/cloud/dialogflow/v2/intents/operations.rb +34 -25
- data/lib/google/cloud/dialogflow/v2/knowledge_base_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +46 -46
- data/lib/google/cloud/dialogflow/v2/participant_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/participants/client.rb +53 -52
- data/lib/google/cloud/dialogflow/v2/session_entity_type_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +46 -46
- data/lib/google/cloud/dialogflow/v2/session_pb.rb +1 -0
- data/lib/google/cloud/dialogflow/v2/session_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/sessions/client.rb +38 -47
- data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/version_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/versions/client.rb +51 -46
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/cloud/dialogflow/v2/environment.rb +21 -3
- data/proto_docs/google/cloud/dialogflow/v2/intent.rb +4 -3
- data/proto_docs/google/cloud/dialogflow/v2/session.rb +3 -0
- data/proto_docs/google/cloud/dialogflow/v2/validation_result.rb +1 -1
- data/proto_docs/google/cloud/dialogflow/v2/version.rb +6 -0
- metadata +4 -4
@@ -27,7 +27,7 @@ module Google
|
|
27
27
|
# Service for managing [EntityTypes][google.cloud.dialogflow.v2.EntityType].
|
28
28
|
class Service
|
29
29
|
|
30
|
-
include
|
30
|
+
include GRPC::GenericService
|
31
31
|
|
32
32
|
self.marshal_class_method = :encode
|
33
33
|
self.unmarshal_class_method = :decode
|
@@ -38,34 +38,55 @@ module Google
|
|
38
38
|
# Retrieves the specified entity type.
|
39
39
|
rpc :GetEntityType, ::Google::Cloud::Dialogflow::V2::GetEntityTypeRequest, ::Google::Cloud::Dialogflow::V2::EntityType
|
40
40
|
# Creates an entity type in the specified agent.
|
41
|
+
#
|
42
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
43
|
+
# [training
|
44
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
41
45
|
rpc :CreateEntityType, ::Google::Cloud::Dialogflow::V2::CreateEntityTypeRequest, ::Google::Cloud::Dialogflow::V2::EntityType
|
42
46
|
# Updates the specified entity type.
|
47
|
+
#
|
48
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
49
|
+
# [training
|
50
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
43
51
|
rpc :UpdateEntityType, ::Google::Cloud::Dialogflow::V2::UpdateEntityTypeRequest, ::Google::Cloud::Dialogflow::V2::EntityType
|
44
52
|
# Deletes the specified entity type.
|
53
|
+
#
|
54
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
55
|
+
# [training
|
56
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
45
57
|
rpc :DeleteEntityType, ::Google::Cloud::Dialogflow::V2::DeleteEntityTypeRequest, ::Google::Protobuf::Empty
|
46
58
|
# Updates/Creates multiple entity types in the specified agent.
|
47
59
|
#
|
48
|
-
#
|
60
|
+
#
|
61
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
62
|
+
# [training
|
63
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
49
64
|
rpc :BatchUpdateEntityTypes, ::Google::Cloud::Dialogflow::V2::BatchUpdateEntityTypesRequest, ::Google::Longrunning::Operation
|
50
65
|
# Deletes entity types in the specified agent.
|
51
66
|
#
|
52
|
-
#
|
67
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
68
|
+
# [training
|
69
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
53
70
|
rpc :BatchDeleteEntityTypes, ::Google::Cloud::Dialogflow::V2::BatchDeleteEntityTypesRequest, ::Google::Longrunning::Operation
|
54
71
|
# Creates multiple new entities in the specified entity type.
|
55
72
|
#
|
56
|
-
#
|
73
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
74
|
+
# [training
|
75
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
57
76
|
rpc :BatchCreateEntities, ::Google::Cloud::Dialogflow::V2::BatchCreateEntitiesRequest, ::Google::Longrunning::Operation
|
58
77
|
# Updates or creates multiple entities in the specified entity type. This
|
59
78
|
# method does not affect entities in the entity type that aren't explicitly
|
60
79
|
# specified in the request.
|
61
80
|
#
|
62
|
-
#
|
63
|
-
#
|
81
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
82
|
+
# [training
|
83
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
64
84
|
rpc :BatchUpdateEntities, ::Google::Cloud::Dialogflow::V2::BatchUpdateEntitiesRequest, ::Google::Longrunning::Operation
|
65
85
|
# Deletes entities in the specified entity type.
|
66
86
|
#
|
67
|
-
#
|
68
|
-
#
|
87
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
88
|
+
# [training
|
89
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
69
90
|
rpc :BatchDeleteEntities, ::Google::Cloud::Dialogflow::V2::BatchDeleteEntitiesRequest, ::Google::Longrunning::Operation
|
70
91
|
end
|
71
92
|
|
@@ -41,13 +41,12 @@ module Google
|
|
41
41
|
# See {::Google::Cloud::Dialogflow::V2::EntityTypes::Client::Configuration}
|
42
42
|
# for a description of the configuration fields.
|
43
43
|
#
|
44
|
-
#
|
44
|
+
# @example
|
45
45
|
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
# end
|
46
|
+
# # Modify the configuration for all EntityTypes clients
|
47
|
+
# ::Google::Cloud::Dialogflow::V2::EntityTypes::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 EntityTypes client object.
|
104
100
|
#
|
105
|
-
#
|
106
|
-
#
|
107
|
-
# To create a new EntityTypes client with the default
|
108
|
-
# configuration:
|
109
|
-
#
|
110
|
-
# client = ::Google::Cloud::Dialogflow::V2::EntityTypes::Client.new
|
101
|
+
# @example
|
111
102
|
#
|
112
|
-
#
|
113
|
-
#
|
103
|
+
# # Create a client using the default configuration
|
104
|
+
# client = ::Google::Cloud::Dialogflow::V2::EntityTypes::Client.new
|
114
105
|
#
|
115
|
-
#
|
116
|
-
#
|
117
|
-
#
|
106
|
+
# # Create a client using a custom configuration
|
107
|
+
# client = ::Google::Cloud::Dialogflow::V2::EntityTypes::Client.new do |config|
|
108
|
+
# config.timeout = 10.0
|
109
|
+
# end
|
118
110
|
#
|
119
111
|
# @yield [config] Configure the EntityTypes 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
|
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.
|
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
|
@@ -237,7 +228,9 @@ module Google
|
|
237
228
|
options.apply_defaults timeout: @config.rpcs.list_entity_types.timeout,
|
238
229
|
metadata: metadata,
|
239
230
|
retry_policy: @config.rpcs.list_entity_types.retry_policy
|
240
|
-
|
231
|
+
|
232
|
+
options.apply_defaults timeout: @config.timeout,
|
233
|
+
metadata: @config.metadata,
|
241
234
|
retry_policy: @config.retry_policy
|
242
235
|
|
243
236
|
@entity_types_stub.call_rpc :list_entity_types, request, options: options do |response, operation|
|
@@ -311,7 +304,9 @@ module Google
|
|
311
304
|
options.apply_defaults timeout: @config.rpcs.get_entity_type.timeout,
|
312
305
|
metadata: metadata,
|
313
306
|
retry_policy: @config.rpcs.get_entity_type.retry_policy
|
314
|
-
|
307
|
+
|
308
|
+
options.apply_defaults timeout: @config.timeout,
|
309
|
+
metadata: @config.metadata,
|
315
310
|
retry_policy: @config.retry_policy
|
316
311
|
|
317
312
|
@entity_types_stub.call_rpc :get_entity_type, request, options: options do |response, operation|
|
@@ -325,6 +320,10 @@ module Google
|
|
325
320
|
##
|
326
321
|
# Creates an entity type in the specified agent.
|
327
322
|
#
|
323
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
324
|
+
# [training
|
325
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
326
|
+
#
|
328
327
|
# @overload create_entity_type(request, options = nil)
|
329
328
|
# Pass arguments to `create_entity_type` via a request object, either of type
|
330
329
|
# {::Google::Cloud::Dialogflow::V2::CreateEntityTypeRequest} or an equivalent Hash.
|
@@ -386,7 +385,9 @@ module Google
|
|
386
385
|
options.apply_defaults timeout: @config.rpcs.create_entity_type.timeout,
|
387
386
|
metadata: metadata,
|
388
387
|
retry_policy: @config.rpcs.create_entity_type.retry_policy
|
389
|
-
|
388
|
+
|
389
|
+
options.apply_defaults timeout: @config.timeout,
|
390
|
+
metadata: @config.metadata,
|
390
391
|
retry_policy: @config.retry_policy
|
391
392
|
|
392
393
|
@entity_types_stub.call_rpc :create_entity_type, request, options: options do |response, operation|
|
@@ -400,6 +401,10 @@ module Google
|
|
400
401
|
##
|
401
402
|
# Updates the specified entity type.
|
402
403
|
#
|
404
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
405
|
+
# [training
|
406
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
407
|
+
#
|
403
408
|
# @overload update_entity_type(request, options = nil)
|
404
409
|
# Pass arguments to `update_entity_type` via a request object, either of type
|
405
410
|
# {::Google::Cloud::Dialogflow::V2::UpdateEntityTypeRequest} or an equivalent Hash.
|
@@ -460,7 +465,9 @@ module Google
|
|
460
465
|
options.apply_defaults timeout: @config.rpcs.update_entity_type.timeout,
|
461
466
|
metadata: metadata,
|
462
467
|
retry_policy: @config.rpcs.update_entity_type.retry_policy
|
463
|
-
|
468
|
+
|
469
|
+
options.apply_defaults timeout: @config.timeout,
|
470
|
+
metadata: @config.metadata,
|
464
471
|
retry_policy: @config.retry_policy
|
465
472
|
|
466
473
|
@entity_types_stub.call_rpc :update_entity_type, request, options: options do |response, operation|
|
@@ -474,6 +481,10 @@ module Google
|
|
474
481
|
##
|
475
482
|
# Deletes the specified entity type.
|
476
483
|
#
|
484
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
485
|
+
# [training
|
486
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
487
|
+
#
|
477
488
|
# @overload delete_entity_type(request, options = nil)
|
478
489
|
# Pass arguments to `delete_entity_type` via a request object, either of type
|
479
490
|
# {::Google::Cloud::Dialogflow::V2::DeleteEntityTypeRequest} or an equivalent Hash.
|
@@ -527,7 +538,9 @@ module Google
|
|
527
538
|
options.apply_defaults timeout: @config.rpcs.delete_entity_type.timeout,
|
528
539
|
metadata: metadata,
|
529
540
|
retry_policy: @config.rpcs.delete_entity_type.retry_policy
|
530
|
-
|
541
|
+
|
542
|
+
options.apply_defaults timeout: @config.timeout,
|
543
|
+
metadata: @config.metadata,
|
531
544
|
retry_policy: @config.retry_policy
|
532
545
|
|
533
546
|
@entity_types_stub.call_rpc :delete_entity_type, request, options: options do |response, operation|
|
@@ -541,7 +554,10 @@ module Google
|
|
541
554
|
##
|
542
555
|
# Updates/Creates multiple entity types in the specified agent.
|
543
556
|
#
|
544
|
-
#
|
557
|
+
#
|
558
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
559
|
+
# [training
|
560
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
545
561
|
#
|
546
562
|
# @overload batch_update_entity_types(request, options = nil)
|
547
563
|
# Pass arguments to `batch_update_entity_types` via a request object, either of type
|
@@ -611,7 +627,9 @@ module Google
|
|
611
627
|
options.apply_defaults timeout: @config.rpcs.batch_update_entity_types.timeout,
|
612
628
|
metadata: metadata,
|
613
629
|
retry_policy: @config.rpcs.batch_update_entity_types.retry_policy
|
614
|
-
|
630
|
+
|
631
|
+
options.apply_defaults timeout: @config.timeout,
|
632
|
+
metadata: @config.metadata,
|
615
633
|
retry_policy: @config.retry_policy
|
616
634
|
|
617
635
|
@entity_types_stub.call_rpc :batch_update_entity_types, request, options: options do |response, operation|
|
@@ -626,7 +644,9 @@ module Google
|
|
626
644
|
##
|
627
645
|
# Deletes entity types in the specified agent.
|
628
646
|
#
|
629
|
-
#
|
647
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
648
|
+
# [training
|
649
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
630
650
|
#
|
631
651
|
# @overload batch_delete_entity_types(request, options = nil)
|
632
652
|
# Pass arguments to `batch_delete_entity_types` via a request object, either of type
|
@@ -684,7 +704,9 @@ module Google
|
|
684
704
|
options.apply_defaults timeout: @config.rpcs.batch_delete_entity_types.timeout,
|
685
705
|
metadata: metadata,
|
686
706
|
retry_policy: @config.rpcs.batch_delete_entity_types.retry_policy
|
687
|
-
|
707
|
+
|
708
|
+
options.apply_defaults timeout: @config.timeout,
|
709
|
+
metadata: @config.metadata,
|
688
710
|
retry_policy: @config.retry_policy
|
689
711
|
|
690
712
|
@entity_types_stub.call_rpc :batch_delete_entity_types, request, options: options do |response, operation|
|
@@ -699,7 +721,9 @@ module Google
|
|
699
721
|
##
|
700
722
|
# Creates multiple new entities in the specified entity type.
|
701
723
|
#
|
702
|
-
#
|
724
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
725
|
+
# [training
|
726
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
703
727
|
#
|
704
728
|
# @overload batch_create_entities(request, options = nil)
|
705
729
|
# Pass arguments to `batch_create_entities` via a request object, either of type
|
@@ -762,7 +786,9 @@ module Google
|
|
762
786
|
options.apply_defaults timeout: @config.rpcs.batch_create_entities.timeout,
|
763
787
|
metadata: metadata,
|
764
788
|
retry_policy: @config.rpcs.batch_create_entities.retry_policy
|
765
|
-
|
789
|
+
|
790
|
+
options.apply_defaults timeout: @config.timeout,
|
791
|
+
metadata: @config.metadata,
|
766
792
|
retry_policy: @config.retry_policy
|
767
793
|
|
768
794
|
@entity_types_stub.call_rpc :batch_create_entities, request, options: options do |response, operation|
|
@@ -779,8 +805,9 @@ module Google
|
|
779
805
|
# method does not affect entities in the entity type that aren't explicitly
|
780
806
|
# specified in the request.
|
781
807
|
#
|
782
|
-
#
|
783
|
-
#
|
808
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
809
|
+
# [training
|
810
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
784
811
|
#
|
785
812
|
# @overload batch_update_entities(request, options = nil)
|
786
813
|
# Pass arguments to `batch_update_entities` via a request object, either of type
|
@@ -845,7 +872,9 @@ module Google
|
|
845
872
|
options.apply_defaults timeout: @config.rpcs.batch_update_entities.timeout,
|
846
873
|
metadata: metadata,
|
847
874
|
retry_policy: @config.rpcs.batch_update_entities.retry_policy
|
848
|
-
|
875
|
+
|
876
|
+
options.apply_defaults timeout: @config.timeout,
|
877
|
+
metadata: @config.metadata,
|
849
878
|
retry_policy: @config.retry_policy
|
850
879
|
|
851
880
|
@entity_types_stub.call_rpc :batch_update_entities, request, options: options do |response, operation|
|
@@ -860,8 +889,9 @@ module Google
|
|
860
889
|
##
|
861
890
|
# Deletes entities in the specified entity type.
|
862
891
|
#
|
863
|
-
#
|
864
|
-
#
|
892
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
893
|
+
# [training
|
894
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
865
895
|
#
|
866
896
|
# @overload batch_delete_entities(request, options = nil)
|
867
897
|
# Pass arguments to `batch_delete_entities` via a request object, either of type
|
@@ -926,7 +956,9 @@ module Google
|
|
926
956
|
options.apply_defaults timeout: @config.rpcs.batch_delete_entities.timeout,
|
927
957
|
metadata: metadata,
|
928
958
|
retry_policy: @config.rpcs.batch_delete_entities.retry_policy
|
929
|
-
|
959
|
+
|
960
|
+
options.apply_defaults timeout: @config.timeout,
|
961
|
+
metadata: @config.metadata,
|
930
962
|
retry_policy: @config.retry_policy
|
931
963
|
|
932
964
|
@entity_types_stub.call_rpc :batch_delete_entities, request, options: options do |response, operation|
|
@@ -951,22 +983,21 @@ module Google
|
|
951
983
|
# Configuration can be applied globally to all clients, or to a single client
|
952
984
|
# on construction.
|
953
985
|
#
|
954
|
-
#
|
955
|
-
#
|
956
|
-
#
|
957
|
-
# to 20 seconds,
|
958
|
-
#
|
959
|
-
#
|
960
|
-
#
|
961
|
-
#
|
962
|
-
#
|
963
|
-
#
|
964
|
-
#
|
965
|
-
#
|
966
|
-
#
|
967
|
-
#
|
968
|
-
#
|
969
|
-
# end
|
986
|
+
# @example
|
987
|
+
#
|
988
|
+
# # Modify the global config, setting the timeout for
|
989
|
+
# # list_entity_types to 20 seconds,
|
990
|
+
# # and all remaining timeouts to 10 seconds.
|
991
|
+
# ::Google::Cloud::Dialogflow::V2::EntityTypes::Client.configure do |config|
|
992
|
+
# config.timeout = 10.0
|
993
|
+
# config.rpcs.list_entity_types.timeout = 20.0
|
994
|
+
# end
|
995
|
+
#
|
996
|
+
# # Apply the above configuration only to a new client.
|
997
|
+
# client = ::Google::Cloud::Dialogflow::V2::EntityTypes::Client.new do |config|
|
998
|
+
# config.timeout = 10.0
|
999
|
+
# config.rpcs.list_entity_types.timeout = 20.0
|
1000
|
+
# end
|
970
1001
|
#
|
971
1002
|
# @!attribute [rw] endpoint
|
972
1003
|
# The hostname or hostname:port of the service endpoint.
|
@@ -82,7 +82,7 @@ module Google
|
|
82
82
|
# Create credentials
|
83
83
|
credentials = @config.credentials
|
84
84
|
credentials ||= Credentials.default scope: @config.scope
|
85
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
85
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
86
86
|
credentials = Credentials.new credentials, scope: @config.scope
|
87
87
|
end
|
88
88
|
@quota_project_id = @config.quota_project
|
@@ -169,7 +169,9 @@ module Google
|
|
169
169
|
options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
|
170
170
|
metadata: metadata,
|
171
171
|
retry_policy: @config.rpcs.list_operations.retry_policy
|
172
|
-
|
172
|
+
|
173
|
+
options.apply_defaults timeout: @config.timeout,
|
174
|
+
metadata: @config.metadata,
|
173
175
|
retry_policy: @config.retry_policy
|
174
176
|
|
175
177
|
@operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
|
@@ -239,7 +241,9 @@ module Google
|
|
239
241
|
options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
|
240
242
|
metadata: metadata,
|
241
243
|
retry_policy: @config.rpcs.get_operation.retry_policy
|
242
|
-
|
244
|
+
|
245
|
+
options.apply_defaults timeout: @config.timeout,
|
246
|
+
metadata: @config.metadata,
|
243
247
|
retry_policy: @config.retry_policy
|
244
248
|
|
245
249
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
@@ -309,7 +313,9 @@ module Google
|
|
309
313
|
options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
|
310
314
|
metadata: metadata,
|
311
315
|
retry_policy: @config.rpcs.delete_operation.retry_policy
|
312
|
-
|
316
|
+
|
317
|
+
options.apply_defaults timeout: @config.timeout,
|
318
|
+
metadata: @config.metadata,
|
313
319
|
retry_policy: @config.retry_policy
|
314
320
|
|
315
321
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
@@ -384,7 +390,9 @@ module Google
|
|
384
390
|
options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
|
385
391
|
metadata: metadata,
|
386
392
|
retry_policy: @config.rpcs.cancel_operation.retry_policy
|
387
|
-
|
393
|
+
|
394
|
+
options.apply_defaults timeout: @config.timeout,
|
395
|
+
metadata: @config.metadata,
|
388
396
|
retry_policy: @config.retry_policy
|
389
397
|
|
390
398
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
@@ -396,9 +404,9 @@ module Google
|
|
396
404
|
end
|
397
405
|
|
398
406
|
##
|
399
|
-
# Waits
|
400
|
-
#
|
401
|
-
#
|
407
|
+
# Waits until the specified long-running operation is done or reaches at most
|
408
|
+
# a specified timeout, returning the latest state. If the operation is
|
409
|
+
# already done, the latest state is immediately returned. If the timeout
|
402
410
|
# specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
|
403
411
|
# timeout is used. If the server does not support this method, it returns
|
404
412
|
# `google.rpc.Code.UNIMPLEMENTED`.
|
@@ -456,7 +464,9 @@ module Google
|
|
456
464
|
options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
|
457
465
|
metadata: metadata,
|
458
466
|
retry_policy: @config.rpcs.wait_operation.retry_policy
|
459
|
-
|
467
|
+
|
468
|
+
options.apply_defaults timeout: @config.timeout,
|
469
|
+
metadata: @config.metadata,
|
460
470
|
retry_policy: @config.retry_policy
|
461
471
|
|
462
472
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
@@ -481,22 +491,21 @@ module Google
|
|
481
491
|
# Configuration can be applied globally to all clients, or to a single client
|
482
492
|
# on construction.
|
483
493
|
#
|
484
|
-
#
|
485
|
-
#
|
486
|
-
#
|
487
|
-
# to 20 seconds,
|
488
|
-
#
|
489
|
-
#
|
490
|
-
#
|
491
|
-
#
|
492
|
-
#
|
493
|
-
#
|
494
|
-
#
|
495
|
-
#
|
496
|
-
#
|
497
|
-
#
|
498
|
-
#
|
499
|
-
# end
|
494
|
+
# @example
|
495
|
+
#
|
496
|
+
# # Modify the global config, setting the timeout for
|
497
|
+
# # list_operations to 20 seconds,
|
498
|
+
# # and all remaining timeouts to 10 seconds.
|
499
|
+
# ::Google::Longrunning::Operations::Client.configure do |config|
|
500
|
+
# config.timeout = 10.0
|
501
|
+
# config.rpcs.list_operations.timeout = 20.0
|
502
|
+
# end
|
503
|
+
#
|
504
|
+
# # Apply the above configuration only to a new client.
|
505
|
+
# client = ::Google::Longrunning::Operations::Client.new do |config|
|
506
|
+
# config.timeout = 10.0
|
507
|
+
# config.rpcs.list_operations.timeout = 20.0
|
508
|
+
# end
|
500
509
|
#
|
501
510
|
# @!attribute [rw] endpoint
|
502
511
|
# The hostname or hostname:port of the service endpoint.
|