google-cloud-dialogflow-v2 0.8.1 → 0.11.0
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 +18 -10
- data/lib/google/cloud/dialogflow/v2/agents/operations.rb +4 -4
- data/lib/google/cloud/dialogflow/v2/answer_record_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/answer_records/client.rb +2 -5
- data/lib/google/cloud/dialogflow/v2/context_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/contexts/client.rb +2 -5
- data/lib/google/cloud/dialogflow/v2/conversation_profile_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb +2 -5
- data/lib/google/cloud/dialogflow/v2/conversation_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/conversations/client.rb +2 -5
- data/lib/google/cloud/dialogflow/v2/document_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/documents/client.rb +2 -5
- data/lib/google/cloud/dialogflow/v2/documents/operations.rb +4 -4
- data/lib/google/cloud/dialogflow/v2/entity_type_services_pb.rb +29 -8
- data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +30 -12
- data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +4 -4
- data/lib/google/cloud/dialogflow/v2/environment_services_pb.rb +7 -7
- data/lib/google/cloud/dialogflow/v2/environments/client.rb +22 -14
- 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 +2 -5
- data/lib/google/cloud/dialogflow/v2/intent_services_pb.rb +21 -3
- data/lib/google/cloud/dialogflow/v2/intents/client.rb +22 -7
- data/lib/google/cloud/dialogflow/v2/intents/operations.rb +4 -4
- data/lib/google/cloud/dialogflow/v2/knowledge_base_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +2 -5
- data/lib/google/cloud/dialogflow/v2/participant_pb.rb +9 -0
- data/lib/google/cloud/dialogflow/v2/participant_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/participants/client.rb +3 -9
- 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 +2 -5
- data/lib/google/cloud/dialogflow/v2/session_pb.rb +2 -0
- data/lib/google/cloud/dialogflow/v2/session_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/sessions/client.rb +3 -9
- 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 +7 -5
- 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/participant.rb +22 -0
- data/proto_docs/google/cloud/dialogflow/v2/session.rb +7 -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 +12 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f6a922385ad3d34527ce31b2d3cbb0ade12123fbf31a3049276b31243f15e05
|
4
|
+
data.tar.gz: d68611727d8dbe3cdef29d8db1ea8c654314ca1278cc8fb0e83f7366b09ec006
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66cdf0854441fdca937e45dbf73dcacd49444ff269358fec0a572bb197c6d07088093246e8a537d211ee321bdad3d4054131ad39511ce7e1ef05e1ae8a9d6c19
|
7
|
+
data.tar.gz: 8ccbda725c796781f7fc883ab79a5689ed8166ae1278aeac1e59b042e129e812bd67b0df9488b3296915e92b07d760dd514e13feb9feba1563dc1f39576365d7
|
data/AUTHENTICATION.md
CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-dialogflow-v2
|
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
67
|
{::Google::Cloud::Dialogflow::V2::Agents::Credentials}):
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
* `DIALOGFLOW_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
|
+
* `DIALOGFLOW_KEYFILE` - Path to JSON file, or JSON contents
|
71
|
+
* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
|
72
|
+
* `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
|
73
|
+
* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
|
74
74
|
|
75
75
|
```ruby
|
76
76
|
require "google/cloud/dialogflow/v2"
|
@@ -82,8 +82,8 @@ client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new
|
|
82
82
|
|
83
83
|
### Configuration
|
84
84
|
|
85
|
-
The **Credentials JSON** can be configured instead of
|
86
|
-
environment
|
85
|
+
The path to the **Credentials JSON** file can be configured instead of storing
|
86
|
+
it in an environment variable. Either on an individual client initialization:
|
87
87
|
|
88
88
|
```ruby
|
89
89
|
require "google/cloud/dialogflow/v2"
|
@@ -93,7 +93,7 @@ client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new do |config|
|
|
93
93
|
end
|
94
94
|
```
|
95
95
|
|
96
|
-
Or
|
96
|
+
Or globally for all clients:
|
97
97
|
|
98
98
|
```ruby
|
99
99
|
require "google/cloud/dialogflow/v2"
|
data/README.md
CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
|
|
33
33
|
require "google/cloud/dialogflow/v2"
|
34
34
|
|
35
35
|
client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new
|
36
|
-
request =
|
36
|
+
request = ::Google::Cloud::Dialogflow::V2::GetAgentRequest.new # (request fields as keyword arguments...)
|
37
37
|
response = client.get_agent request
|
38
38
|
```
|
39
39
|
|
@@ -27,7 +27,7 @@ module Google
|
|
27
27
|
# Service for managing [Agents][google.cloud.dialogflow.v2.Agent].
|
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
|
@@ -36,6 +36,10 @@ module Google
|
|
36
36
|
# Retrieves the specified agent.
|
37
37
|
rpc :GetAgent, ::Google::Cloud::Dialogflow::V2::GetAgentRequest, ::Google::Cloud::Dialogflow::V2::Agent
|
38
38
|
# Creates/updates the specified agent.
|
39
|
+
#
|
40
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
41
|
+
# [training
|
42
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
39
43
|
rpc :SetAgent, ::Google::Cloud::Dialogflow::V2::SetAgentRequest, ::Google::Cloud::Dialogflow::V2::Agent
|
40
44
|
# Deletes the specified agent.
|
41
45
|
rpc :DeleteAgent, ::Google::Cloud::Dialogflow::V2::DeleteAgentRequest, ::Google::Protobuf::Empty
|
@@ -49,11 +53,12 @@ module Google
|
|
49
53
|
rpc :SearchAgents, ::Google::Cloud::Dialogflow::V2::SearchAgentsRequest, ::Google::Cloud::Dialogflow::V2::SearchAgentsResponse
|
50
54
|
# Trains the specified agent.
|
51
55
|
#
|
52
|
-
#
|
56
|
+
#
|
57
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
58
|
+
# [training
|
59
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
53
60
|
rpc :TrainAgent, ::Google::Cloud::Dialogflow::V2::TrainAgentRequest, ::Google::Longrunning::Operation
|
54
61
|
# Exports the specified agent to a ZIP file.
|
55
|
-
#
|
56
|
-
# Operation <response: [ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse]>
|
57
62
|
rpc :ExportAgent, ::Google::Cloud::Dialogflow::V2::ExportAgentRequest, ::Google::Longrunning::Operation
|
58
63
|
# Imports the specified agent from a ZIP file.
|
59
64
|
#
|
@@ -65,9 +70,12 @@ module Google
|
|
65
70
|
# call [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the operation it returns in order to train
|
66
71
|
# explicitly.
|
67
72
|
#
|
68
|
-
# Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
|
69
73
|
# An operation which tracks when importing is complete. It only tracks
|
70
74
|
# when the draft agent is updated not when it is done training.
|
75
|
+
#
|
76
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
77
|
+
# [training
|
78
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
71
79
|
rpc :ImportAgent, ::Google::Cloud::Dialogflow::V2::ImportAgentRequest, ::Google::Longrunning::Operation
|
72
80
|
# Restores the specified agent from a ZIP file.
|
73
81
|
#
|
@@ -78,9 +86,12 @@ module Google
|
|
78
86
|
# completed yet. Please call [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the operation it
|
79
87
|
# returns in order to train explicitly.
|
80
88
|
#
|
81
|
-
# Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
|
82
89
|
# An operation which tracks when restoring is complete. It only tracks
|
83
90
|
# when the draft agent is updated not when it is done training.
|
91
|
+
#
|
92
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
93
|
+
# [training
|
94
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
84
95
|
rpc :RestoreAgent, ::Google::Cloud::Dialogflow::V2::RestoreAgentRequest, ::Google::Longrunning::Operation
|
85
96
|
# Gets agent validation result. Agent validation is performed during
|
86
97
|
# training time and is updated automatically when training is completed.
|
@@ -67,10 +67,7 @@ module Google
|
|
67
67
|
|
68
68
|
default_config.timeout = 60.0
|
69
69
|
default_config.retry_policy = {
|
70
|
-
initial_delay: 0.1,
|
71
|
-
max_delay: 60.0,
|
72
|
-
multiplier: 1.3,
|
73
|
-
retry_codes: [14]
|
70
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
74
71
|
}
|
75
72
|
|
76
73
|
default_config
|
@@ -141,7 +138,7 @@ module Google
|
|
141
138
|
!@config.endpoint.split(".").first.include?("-")
|
142
139
|
credentials ||= Credentials.default scope: @config.scope,
|
143
140
|
enable_self_signed_jwt: enable_self_signed_jwt
|
144
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
141
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
145
142
|
credentials = Credentials.new credentials, scope: @config.scope
|
146
143
|
end
|
147
144
|
@quota_project_id = @config.quota_project
|
@@ -240,6 +237,10 @@ module Google
|
|
240
237
|
##
|
241
238
|
# Creates/updates the specified agent.
|
242
239
|
#
|
240
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
241
|
+
# [training
|
242
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
243
|
+
#
|
243
244
|
# @overload set_agent(request, options = nil)
|
244
245
|
# Pass arguments to `set_agent` via a request object, either of type
|
245
246
|
# {::Google::Cloud::Dialogflow::V2::SetAgentRequest} or an equivalent Hash.
|
@@ -454,7 +455,10 @@ module Google
|
|
454
455
|
##
|
455
456
|
# Trains the specified agent.
|
456
457
|
#
|
457
|
-
#
|
458
|
+
#
|
459
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
460
|
+
# [training
|
461
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
458
462
|
#
|
459
463
|
# @overload train_agent(request, options = nil)
|
460
464
|
# Pass arguments to `train_agent` via a request object, either of type
|
@@ -524,8 +528,6 @@ module Google
|
|
524
528
|
##
|
525
529
|
# Exports the specified agent to a ZIP file.
|
526
530
|
#
|
527
|
-
# Operation <response: {::Google::Cloud::Dialogflow::V2::ExportAgentResponse ExportAgentResponse}>
|
528
|
-
#
|
529
531
|
# @overload export_agent(request, options = nil)
|
530
532
|
# Pass arguments to `export_agent` via a request object, either of type
|
531
533
|
# {::Google::Cloud::Dialogflow::V2::ExportAgentRequest} or an equivalent Hash.
|
@@ -607,10 +609,13 @@ module Google
|
|
607
609
|
# call {::Google::Cloud::Dialogflow::V2::Agents::Client#train_agent TrainAgent} and wait for the operation it returns in order to train
|
608
610
|
# explicitly.
|
609
611
|
#
|
610
|
-
# Operation <response: {::Google::Protobuf::Empty google.protobuf.Empty}>
|
611
612
|
# An operation which tracks when importing is complete. It only tracks
|
612
613
|
# when the draft agent is updated not when it is done training.
|
613
614
|
#
|
615
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
616
|
+
# [training
|
617
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
618
|
+
#
|
614
619
|
# @overload import_agent(request, options = nil)
|
615
620
|
# Pass arguments to `import_agent` via a request object, either of type
|
616
621
|
# {::Google::Cloud::Dialogflow::V2::ImportAgentRequest} or an equivalent Hash.
|
@@ -691,10 +696,13 @@ module Google
|
|
691
696
|
# completed yet. Please call {::Google::Cloud::Dialogflow::V2::Agents::Client#train_agent TrainAgent} and wait for the operation it
|
692
697
|
# returns in order to train explicitly.
|
693
698
|
#
|
694
|
-
# Operation <response: {::Google::Protobuf::Empty google.protobuf.Empty}>
|
695
699
|
# An operation which tracks when restoring is complete. It only tracks
|
696
700
|
# when the draft agent is updated not when it is done training.
|
697
701
|
#
|
702
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
703
|
+
# [training
|
704
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
705
|
+
#
|
698
706
|
# @overload restore_agent(request, options = nil)
|
699
707
|
# Pass arguments to `restore_agent` via a request object, either of type
|
700
708
|
# {::Google::Cloud::Dialogflow::V2::RestoreAgentRequest} or an equivalent Hash.
|
@@ -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
|
@@ -396,9 +396,9 @@ module Google
|
|
396
396
|
end
|
397
397
|
|
398
398
|
##
|
399
|
-
# Waits
|
400
|
-
#
|
401
|
-
#
|
399
|
+
# Waits until the specified long-running operation is done or reaches at most
|
400
|
+
# a specified timeout, returning the latest state. If the operation is
|
401
|
+
# already done, the latest state is immediately returned. If the timeout
|
402
402
|
# specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
|
403
403
|
# timeout is used. If the server does not support this method, it returns
|
404
404
|
# `google.rpc.Code.UNIMPLEMENTED`.
|
@@ -27,7 +27,7 @@ module Google
|
|
27
27
|
# Service for managing [AnswerRecords][google.cloud.dialogflow.v2.AnswerRecord].
|
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
|
@@ -67,10 +67,7 @@ module Google
|
|
67
67
|
|
68
68
|
default_config.timeout = 60.0
|
69
69
|
default_config.retry_policy = {
|
70
|
-
initial_delay: 0.1,
|
71
|
-
max_delay: 60.0,
|
72
|
-
multiplier: 1.3,
|
73
|
-
retry_codes: [14]
|
70
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
74
71
|
}
|
75
72
|
|
76
73
|
default_config
|
@@ -141,7 +138,7 @@ module Google
|
|
141
138
|
!@config.endpoint.split(".").first.include?("-")
|
142
139
|
credentials ||= Credentials.default scope: @config.scope,
|
143
140
|
enable_self_signed_jwt: enable_self_signed_jwt
|
144
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
141
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
145
142
|
credentials = Credentials.new credentials, scope: @config.scope
|
146
143
|
end
|
147
144
|
@quota_project_id = @config.quota_project
|
@@ -67,10 +67,7 @@ module Google
|
|
67
67
|
|
68
68
|
default_config.timeout = 60.0
|
69
69
|
default_config.retry_policy = {
|
70
|
-
initial_delay: 0.1,
|
71
|
-
max_delay: 60.0,
|
72
|
-
multiplier: 1.3,
|
73
|
-
retry_codes: [14]
|
70
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
74
71
|
}
|
75
72
|
|
76
73
|
default_config
|
@@ -141,7 +138,7 @@ module Google
|
|
141
138
|
!@config.endpoint.split(".").first.include?("-")
|
142
139
|
credentials ||= Credentials.default scope: @config.scope,
|
143
140
|
enable_self_signed_jwt: enable_self_signed_jwt
|
144
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
141
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
145
142
|
credentials = Credentials.new credentials, scope: @config.scope
|
146
143
|
end
|
147
144
|
@quota_project_id = @config.quota_project
|
@@ -27,7 +27,7 @@ module Google
|
|
27
27
|
# Service for managing [ConversationProfiles][google.cloud.dialogflow.v2.ConversationProfile].
|
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
|
@@ -67,10 +67,7 @@ module Google
|
|
67
67
|
|
68
68
|
default_config.timeout = 60.0
|
69
69
|
default_config.retry_policy = {
|
70
|
-
initial_delay: 0.1,
|
71
|
-
max_delay: 60.0,
|
72
|
-
multiplier: 1.3,
|
73
|
-
retry_codes: [14]
|
70
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
74
71
|
}
|
75
72
|
|
76
73
|
default_config
|
@@ -141,7 +138,7 @@ module Google
|
|
141
138
|
!@config.endpoint.split(".").first.include?("-")
|
142
139
|
credentials ||= Credentials.default scope: @config.scope,
|
143
140
|
enable_self_signed_jwt: enable_self_signed_jwt
|
144
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
141
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
145
142
|
credentials = Credentials.new credentials, scope: @config.scope
|
146
143
|
end
|
147
144
|
@quota_project_id = @config.quota_project
|
@@ -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
|
30
|
+
include GRPC::GenericService
|
31
31
|
|
32
32
|
self.marshal_class_method = :encode
|
33
33
|
self.unmarshal_class_method = :decode
|
@@ -67,10 +67,7 @@ module Google
|
|
67
67
|
|
68
68
|
default_config.timeout = 60.0
|
69
69
|
default_config.retry_policy = {
|
70
|
-
initial_delay: 0.1,
|
71
|
-
max_delay: 60.0,
|
72
|
-
multiplier: 1.3,
|
73
|
-
retry_codes: [14]
|
70
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
74
71
|
}
|
75
72
|
|
76
73
|
default_config
|
@@ -141,7 +138,7 @@ module Google
|
|
141
138
|
!@config.endpoint.split(".").first.include?("-")
|
142
139
|
credentials ||= Credentials.default scope: @config.scope,
|
143
140
|
enable_self_signed_jwt: enable_self_signed_jwt
|
144
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
141
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
145
142
|
credentials = Credentials.new credentials, scope: @config.scope
|
146
143
|
end
|
147
144
|
@quota_project_id = @config.quota_project
|
@@ -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
|
30
|
+
include GRPC::GenericService
|
31
31
|
|
32
32
|
self.marshal_class_method = :encode
|
33
33
|
self.unmarshal_class_method = :decode
|
@@ -67,10 +67,7 @@ module Google
|
|
67
67
|
|
68
68
|
default_config.timeout = 60.0
|
69
69
|
default_config.retry_policy = {
|
70
|
-
initial_delay: 0.1,
|
71
|
-
max_delay: 60.0,
|
72
|
-
multiplier: 1.3,
|
73
|
-
retry_codes: [14]
|
70
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
74
71
|
}
|
75
72
|
|
76
73
|
default_config
|
@@ -141,7 +138,7 @@ module Google
|
|
141
138
|
!@config.endpoint.split(".").first.include?("-")
|
142
139
|
credentials ||= Credentials.default scope: @config.scope,
|
143
140
|
enable_self_signed_jwt: enable_self_signed_jwt
|
144
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
141
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
145
142
|
credentials = Credentials.new credentials, scope: @config.scope
|
146
143
|
end
|
147
144
|
@quota_project_id = @config.quota_project
|
@@ -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
|
@@ -396,9 +396,9 @@ module Google
|
|
396
396
|
end
|
397
397
|
|
398
398
|
##
|
399
|
-
# Waits
|
400
|
-
#
|
401
|
-
#
|
399
|
+
# Waits until the specified long-running operation is done or reaches at most
|
400
|
+
# a specified timeout, returning the latest state. If the operation is
|
401
|
+
# already done, the latest state is immediately returned. If the timeout
|
402
402
|
# specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
|
403
403
|
# timeout is used. If the server does not support this method, it returns
|
404
404
|
# `google.rpc.Code.UNIMPLEMENTED`.
|
@@ -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
|
|