google-cloud-dialogflow-v2 0.5.1 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/lib/google/cloud/dialogflow/v2/agent_services_pb.rb +15 -30
- data/lib/google/cloud/dialogflow/v2/agents.rb +1 -28
- data/lib/google/cloud/dialogflow/v2/agents/client.rb +35 -95
- data/lib/google/cloud/dialogflow/v2/agents/operations.rb +17 -11
- data/lib/google/cloud/dialogflow/v2/contexts/client.rb +20 -43
- data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +20 -57
- data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +17 -11
- data/lib/google/cloud/dialogflow/v2/environments/client.rb +20 -15
- data/lib/google/cloud/dialogflow/v2/intents/client.rb +20 -45
- data/lib/google/cloud/dialogflow/v2/intents/operations.rb +17 -11
- data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +20 -35
- data/lib/google/cloud/dialogflow/v2/sessions/client.rb +31 -12
- data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
- data/proto_docs/google/cloud/dialogflow/v2/agent.rb +10 -1
- data/proto_docs/google/cloud/dialogflow/v2/environment.rb +1 -1
- data/proto_docs/google/cloud/dialogflow/v2/intent.rb +1 -0
- data/proto_docs/google/cloud/dialogflow/v2/session.rb +8 -0
- metadata +35 -8
- data/lib/google/cloud/common_resources_pb.rb +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1614879f4c9224b78c0a043d60281229aa4d2acbf06e3d4d2eb1044ae8816124
|
4
|
+
data.tar.gz: df39f3a7f75f480a3381c091c21407949c75c46a54351d0bc73fbb39ad0f96e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d20a03c7a9294c62d38a5d84779d91391c5fa4c88e7e64b196ac105898a4c9c13891d25c0a915ab5f3632ee9421ce2d4cdeb5eacfd8c9973caf8094f1a5c1154
|
7
|
+
data.tar.gz: 2bcbcf5548130b61b32d2ba968923e7799081781ad33d383403ab3279fb09f56abc8f7c4467a54c3383f6e38e0693fd894a4e0eea51bd2aebb295753d87b006b
|
data/README.md
CHANGED
@@ -18,6 +18,7 @@ In order to use this library, you first need to go through the following steps:
|
|
18
18
|
|
19
19
|
1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
20
20
|
1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
21
|
+
1. [Enable the API.](https://console.cloud.google.com/apis/library/dialogflow.googleapis.com)
|
21
22
|
1. {file:AUTHENTICATION.md Set up authentication.}
|
22
23
|
|
23
24
|
## Quick Start
|
@@ -33,6 +34,9 @@ response = client.get_agent request
|
|
33
34
|
View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-dialogflow-v2/latest)
|
34
35
|
for class and method documentation.
|
35
36
|
|
37
|
+
See also the [Product Documentation](https://cloud.google.com/dialogflow)
|
38
|
+
for general usage information.
|
39
|
+
|
36
40
|
## Enabling Logging
|
37
41
|
|
38
42
|
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
@@ -24,34 +24,7 @@ module Google
|
|
24
24
|
module Dialogflow
|
25
25
|
module V2
|
26
26
|
module Agents
|
27
|
-
#
|
28
|
-
# that transform user requests into actionable data. You can include agents
|
29
|
-
# in your app, product, or service to determine user intent and respond to the
|
30
|
-
# user in a natural way.
|
31
|
-
#
|
32
|
-
# After you create an agent, you can add [Intents][google.cloud.dialogflow.v2.Intents], [Contexts][google.cloud.dialogflow.v2.Contexts],
|
33
|
-
# [Entity Types][google.cloud.dialogflow.v2.EntityTypes], [Webhooks][google.cloud.dialogflow.v2.WebhookRequest], and so on to
|
34
|
-
# manage the flow of a conversation and match user input to predefined intents
|
35
|
-
# and actions.
|
36
|
-
#
|
37
|
-
# You can create an agent using both Dialogflow Standard Edition and
|
38
|
-
# Dialogflow Enterprise Edition. For details, see
|
39
|
-
# [Dialogflow
|
40
|
-
# Editions](https://cloud.google.com/dialogflow/docs/editions).
|
41
|
-
#
|
42
|
-
# You can save your agent for backup or versioning by exporting the agent by
|
43
|
-
# using the [ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent] method. You can import a saved
|
44
|
-
# agent by using the [ImportAgent][google.cloud.dialogflow.v2.Agents.ImportAgent] method.
|
45
|
-
#
|
46
|
-
# Dialogflow provides several
|
47
|
-
# [prebuilt
|
48
|
-
# agents](https://cloud.google.com/dialogflow/docs/agents-prebuilt)
|
49
|
-
# for common conversation scenarios such as determining a date and time,
|
50
|
-
# converting currency, and so on.
|
51
|
-
#
|
52
|
-
# For more information about agents, see the
|
53
|
-
# [Dialogflow
|
54
|
-
# documentation](https://cloud.google.com/dialogflow/docs/agents-overview).
|
27
|
+
# Service for managing [Agents][google.cloud.dialogflow.v2.Agent].
|
55
28
|
class Service
|
56
29
|
|
57
30
|
include GRPC::GenericService
|
@@ -86,16 +59,28 @@ module Google
|
|
86
59
|
#
|
87
60
|
# Uploads new intents and entity types without deleting the existing ones.
|
88
61
|
# Intents and entity types with the same name are replaced with the new
|
89
|
-
# versions from ImportAgentRequest.
|
62
|
+
# versions from [ImportAgentRequest][google.cloud.dialogflow.v2.ImportAgentRequest]. After the import, the imported draft
|
63
|
+
# agent will be trained automatically (unless disabled in agent settings).
|
64
|
+
# However, once the import is done, training may not be completed yet. Please
|
65
|
+
# call [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the operation it returns in order to train
|
66
|
+
# explicitly.
|
90
67
|
#
|
91
68
|
# Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
|
69
|
+
# An operation which tracks when importing is complete. It only tracks
|
70
|
+
# when the draft agent is updated not when it is done training.
|
92
71
|
rpc :ImportAgent, ImportAgentRequest, Google::Longrunning::Operation
|
93
72
|
# Restores the specified agent from a ZIP file.
|
94
73
|
#
|
95
74
|
# Replaces the current agent version with a new one. All the intents and
|
96
|
-
# entity types in the older version are deleted.
|
75
|
+
# entity types in the older version are deleted. After the restore, the
|
76
|
+
# restored draft agent will be trained automatically (unless disabled in
|
77
|
+
# agent settings). However, once the restore is done, training may not be
|
78
|
+
# completed yet. Please call [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the operation it
|
79
|
+
# returns in order to train explicitly.
|
97
80
|
#
|
98
81
|
# Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
|
82
|
+
# An operation which tracks when restoring is complete. It only tracks
|
83
|
+
# when the draft agent is updated not when it is done training.
|
99
84
|
rpc :RestoreAgent, RestoreAgentRequest, Google::Longrunning::Operation
|
100
85
|
# Gets agent validation result. Agent validation is performed during
|
101
86
|
# training time and is updated automatically when training is completed.
|
@@ -32,34 +32,7 @@ module Google
|
|
32
32
|
module Dialogflow
|
33
33
|
module V2
|
34
34
|
##
|
35
|
-
#
|
36
|
-
# that transform user requests into actionable data. You can include agents
|
37
|
-
# in your app, product, or service to determine user intent and respond to the
|
38
|
-
# user in a natural way.
|
39
|
-
#
|
40
|
-
# After you create an agent, you can add {::Google::Cloud::Dialogflow::V2::Intents::Client Intents}, {::Google::Cloud::Dialogflow::V2::Contexts::Client Contexts},
|
41
|
-
# {::Google::Cloud::Dialogflow::V2::EntityTypes::Client Entity Types}, {::Google::Cloud::Dialogflow::V2::WebhookRequest Webhooks}, and so on to
|
42
|
-
# manage the flow of a conversation and match user input to predefined intents
|
43
|
-
# and actions.
|
44
|
-
#
|
45
|
-
# You can create an agent using both Dialogflow Standard Edition and
|
46
|
-
# Dialogflow Enterprise Edition. For details, see
|
47
|
-
# [Dialogflow
|
48
|
-
# Editions](https://cloud.google.com/dialogflow/docs/editions).
|
49
|
-
#
|
50
|
-
# You can save your agent for backup or versioning by exporting the agent by
|
51
|
-
# using the {::Google::Cloud::Dialogflow::V2::Agents::Client#export_agent ExportAgent} method. You can import a saved
|
52
|
-
# agent by using the {::Google::Cloud::Dialogflow::V2::Agents::Client#import_agent ImportAgent} method.
|
53
|
-
#
|
54
|
-
# Dialogflow provides several
|
55
|
-
# [prebuilt
|
56
|
-
# agents](https://cloud.google.com/dialogflow/docs/agents-prebuilt)
|
57
|
-
# for common conversation scenarios such as determining a date and time,
|
58
|
-
# converting currency, and so on.
|
59
|
-
#
|
60
|
-
# For more information about agents, see the
|
61
|
-
# [Dialogflow
|
62
|
-
# documentation](https://cloud.google.com/dialogflow/docs/agents-overview).
|
35
|
+
# Service for managing {::Google::Cloud::Dialogflow::V2::Agent Agents}.
|
63
36
|
#
|
64
37
|
# To load this service and instantiate a client:
|
65
38
|
#
|
@@ -27,34 +27,7 @@ module Google
|
|
27
27
|
##
|
28
28
|
# Client for the Agents service.
|
29
29
|
#
|
30
|
-
#
|
31
|
-
# that transform user requests into actionable data. You can include agents
|
32
|
-
# in your app, product, or service to determine user intent and respond to the
|
33
|
-
# user in a natural way.
|
34
|
-
#
|
35
|
-
# After you create an agent, you can add {::Google::Cloud::Dialogflow::V2::Intents::Client Intents}, {::Google::Cloud::Dialogflow::V2::Contexts::Client Contexts},
|
36
|
-
# {::Google::Cloud::Dialogflow::V2::EntityTypes::Client Entity Types}, {::Google::Cloud::Dialogflow::V2::WebhookRequest Webhooks}, and so on to
|
37
|
-
# manage the flow of a conversation and match user input to predefined intents
|
38
|
-
# and actions.
|
39
|
-
#
|
40
|
-
# You can create an agent using both Dialogflow Standard Edition and
|
41
|
-
# Dialogflow Enterprise Edition. For details, see
|
42
|
-
# [Dialogflow
|
43
|
-
# Editions](https://cloud.google.com/dialogflow/docs/editions).
|
44
|
-
#
|
45
|
-
# You can save your agent for backup or versioning by exporting the agent by
|
46
|
-
# using the {::Google::Cloud::Dialogflow::V2::Agents::Client#export_agent ExportAgent} method. You can import a saved
|
47
|
-
# agent by using the {::Google::Cloud::Dialogflow::V2::Agents::Client#import_agent ImportAgent} method.
|
48
|
-
#
|
49
|
-
# Dialogflow provides several
|
50
|
-
# [prebuilt
|
51
|
-
# agents](https://cloud.google.com/dialogflow/docs/agents-prebuilt)
|
52
|
-
# for common conversation scenarios such as determining a date and time,
|
53
|
-
# converting currency, and so on.
|
54
|
-
#
|
55
|
-
# For more information about agents, see the
|
56
|
-
# [Dialogflow
|
57
|
-
# documentation](https://cloud.google.com/dialogflow/docs/agents-overview).
|
30
|
+
# Service for managing {::Google::Cloud::Dialogflow::V2::Agent Agents}.
|
58
31
|
#
|
59
32
|
class Client
|
60
33
|
include Paths
|
@@ -92,62 +65,12 @@ module Google
|
|
92
65
|
end
|
93
66
|
default_config = Client::Configuration.new parent_config
|
94
67
|
|
95
|
-
default_config.
|
96
|
-
default_config.
|
97
|
-
initial_delay: 0.1,
|
98
|
-
max_delay: 60.0,
|
99
|
-
multiplier: 1.3,
|
100
|
-
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
101
|
-
}
|
102
|
-
|
103
|
-
default_config.rpcs.set_agent.timeout = 60.0
|
104
|
-
default_config.rpcs.set_agent.retry_policy = {
|
68
|
+
default_config.timeout = 60.0
|
69
|
+
default_config.retry_policy = {
|
105
70
|
initial_delay: 0.1,
|
106
71
|
max_delay: 60.0,
|
107
72
|
multiplier: 1.3,
|
108
|
-
retry_codes: ["UNAVAILABLE"
|
109
|
-
}
|
110
|
-
|
111
|
-
default_config.rpcs.delete_agent.timeout = 60.0
|
112
|
-
default_config.rpcs.delete_agent.retry_policy = {
|
113
|
-
initial_delay: 0.1,
|
114
|
-
max_delay: 60.0,
|
115
|
-
multiplier: 1.3,
|
116
|
-
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
117
|
-
}
|
118
|
-
|
119
|
-
default_config.rpcs.search_agents.timeout = 60.0
|
120
|
-
default_config.rpcs.search_agents.retry_policy = {
|
121
|
-
initial_delay: 0.1,
|
122
|
-
max_delay: 60.0,
|
123
|
-
multiplier: 1.3,
|
124
|
-
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
125
|
-
}
|
126
|
-
|
127
|
-
default_config.rpcs.train_agent.timeout = 60.0
|
128
|
-
default_config.rpcs.train_agent.retry_policy = {
|
129
|
-
initial_delay: 0.1,
|
130
|
-
max_delay: 60.0,
|
131
|
-
multiplier: 1.3,
|
132
|
-
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
133
|
-
}
|
134
|
-
|
135
|
-
default_config.rpcs.export_agent.timeout = 60.0
|
136
|
-
default_config.rpcs.export_agent.retry_policy = {
|
137
|
-
initial_delay: 0.1,
|
138
|
-
max_delay: 60.0,
|
139
|
-
multiplier: 1.3,
|
140
|
-
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
141
|
-
}
|
142
|
-
|
143
|
-
default_config.rpcs.import_agent.timeout = 60.0
|
144
|
-
|
145
|
-
default_config.rpcs.restore_agent.timeout = 60.0
|
146
|
-
default_config.rpcs.restore_agent.retry_policy = {
|
147
|
-
initial_delay: 0.1,
|
148
|
-
max_delay: 60.0,
|
149
|
-
multiplier: 1.3,
|
150
|
-
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
73
|
+
retry_codes: ["UNAVAILABLE"]
|
151
74
|
}
|
152
75
|
|
153
76
|
default_config
|
@@ -215,7 +138,8 @@ module Google
|
|
215
138
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
216
139
|
credentials = Credentials.new credentials, scope: @config.scope
|
217
140
|
end
|
218
|
-
@quota_project_id =
|
141
|
+
@quota_project_id = @config.quota_project
|
142
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
219
143
|
|
220
144
|
@operations_client = Operations.new do |config|
|
221
145
|
config.credentials = credentials
|
@@ -671,9 +595,15 @@ module Google
|
|
671
595
|
#
|
672
596
|
# Uploads new intents and entity types without deleting the existing ones.
|
673
597
|
# Intents and entity types with the same name are replaced with the new
|
674
|
-
# versions from ImportAgentRequest.
|
598
|
+
# versions from {::Google::Cloud::Dialogflow::V2::ImportAgentRequest ImportAgentRequest}. After the import, the imported draft
|
599
|
+
# agent will be trained automatically (unless disabled in agent settings).
|
600
|
+
# However, once the import is done, training may not be completed yet. Please
|
601
|
+
# call {::Google::Cloud::Dialogflow::V2::Agents::Client#train_agent TrainAgent} and wait for the operation it returns in order to train
|
602
|
+
# explicitly.
|
675
603
|
#
|
676
604
|
# Operation <response: {::Google::Protobuf::Empty google.protobuf.Empty}>
|
605
|
+
# An operation which tracks when importing is complete. It only tracks
|
606
|
+
# when the draft agent is updated not when it is done training.
|
677
607
|
#
|
678
608
|
# @overload import_agent(request, options = nil)
|
679
609
|
# Pass arguments to `import_agent` via a request object, either of type
|
@@ -749,9 +679,15 @@ module Google
|
|
749
679
|
# Restores the specified agent from a ZIP file.
|
750
680
|
#
|
751
681
|
# Replaces the current agent version with a new one. All the intents and
|
752
|
-
# entity types in the older version are deleted.
|
682
|
+
# entity types in the older version are deleted. After the restore, the
|
683
|
+
# restored draft agent will be trained automatically (unless disabled in
|
684
|
+
# agent settings). However, once the restore is done, training may not be
|
685
|
+
# completed yet. Please call {::Google::Cloud::Dialogflow::V2::Agents::Client#train_agent TrainAgent} and wait for the operation it
|
686
|
+
# returns in order to train explicitly.
|
753
687
|
#
|
754
688
|
# Operation <response: {::Google::Protobuf::Empty google.protobuf.Empty}>
|
689
|
+
# An operation which tracks when restoring is complete. It only tracks
|
690
|
+
# when the draft agent is updated not when it is done training.
|
755
691
|
#
|
756
692
|
# @overload restore_agent(request, options = nil)
|
757
693
|
# Pass arguments to `restore_agent` via a request object, either of type
|
@@ -973,24 +909,28 @@ module Google
|
|
973
909
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
974
910
|
# trigger a retry.
|
975
911
|
# @return [::Hash]
|
912
|
+
# @!attribute [rw] quota_project
|
913
|
+
# A separate project against which to charge quota.
|
914
|
+
# @return [::String]
|
976
915
|
#
|
977
916
|
class Configuration
|
978
917
|
extend ::Gapic::Config
|
979
918
|
|
980
|
-
config_attr :endpoint,
|
981
|
-
config_attr :credentials,
|
919
|
+
config_attr :endpoint, "dialogflow.googleapis.com", ::String
|
920
|
+
config_attr :credentials, nil do |value|
|
982
921
|
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
983
922
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
984
923
|
allowed.any? { |klass| klass === value }
|
985
924
|
end
|
986
|
-
config_attr :scope,
|
987
|
-
config_attr :lib_name,
|
988
|
-
config_attr :lib_version,
|
989
|
-
config_attr(:channel_args,
|
990
|
-
config_attr :interceptors,
|
991
|
-
config_attr :timeout,
|
992
|
-
config_attr :metadata,
|
993
|
-
config_attr :retry_policy,
|
925
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
926
|
+
config_attr :lib_name, nil, ::String, nil
|
927
|
+
config_attr :lib_version, nil, ::String, nil
|
928
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
929
|
+
config_attr :interceptors, nil, ::Array, nil
|
930
|
+
config_attr :timeout, nil, ::Numeric, nil
|
931
|
+
config_attr :metadata, nil, ::Hash, nil
|
932
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
933
|
+
config_attr :quota_project, nil, ::String, nil
|
994
934
|
|
995
935
|
# @private
|
996
936
|
def initialize parent_config = nil
|
@@ -1006,7 +946,7 @@ module Google
|
|
1006
946
|
def rpcs
|
1007
947
|
@rpcs ||= begin
|
1008
948
|
parent_rpcs = nil
|
1009
|
-
parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to?
|
949
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
|
1010
950
|
Rpcs.new parent_rpcs
|
1011
951
|
end
|
1012
952
|
end
|
@@ -85,6 +85,8 @@ module Google
|
|
85
85
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
86
86
|
credentials = Credentials.new credentials, scope: @config.scope
|
87
87
|
end
|
88
|
+
@quota_project_id = @config.quota_project
|
89
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
88
90
|
|
89
91
|
@operations_stub = ::Gapic::ServiceStub.new(
|
90
92
|
::Google::Longrunning::Operations::Stub,
|
@@ -464,24 +466,28 @@ module Google
|
|
464
466
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
465
467
|
# trigger a retry.
|
466
468
|
# @return [::Hash]
|
469
|
+
# @!attribute [rw] quota_project
|
470
|
+
# A separate project against which to charge quota.
|
471
|
+
# @return [::String]
|
467
472
|
#
|
468
473
|
class Configuration
|
469
474
|
extend ::Gapic::Config
|
470
475
|
|
471
|
-
config_attr :endpoint,
|
472
|
-
config_attr :credentials,
|
476
|
+
config_attr :endpoint, "dialogflow.googleapis.com", ::String
|
477
|
+
config_attr :credentials, nil do |value|
|
473
478
|
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
474
479
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
475
480
|
allowed.any? { |klass| klass === value }
|
476
481
|
end
|
477
|
-
config_attr :scope,
|
478
|
-
config_attr :lib_name,
|
479
|
-
config_attr :lib_version,
|
480
|
-
config_attr(:channel_args,
|
481
|
-
config_attr :interceptors,
|
482
|
-
config_attr :timeout,
|
483
|
-
config_attr :metadata,
|
484
|
-
config_attr :retry_policy,
|
482
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
483
|
+
config_attr :lib_name, nil, ::String, nil
|
484
|
+
config_attr :lib_version, nil, ::String, nil
|
485
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
486
|
+
config_attr :interceptors, nil, ::Array, nil
|
487
|
+
config_attr :timeout, nil, ::Numeric, nil
|
488
|
+
config_attr :metadata, nil, ::Hash, nil
|
489
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
490
|
+
config_attr :quota_project, nil, ::String, nil
|
485
491
|
|
486
492
|
# @private
|
487
493
|
def initialize parent_config = nil
|
@@ -497,7 +503,7 @@ module Google
|
|
497
503
|
def rpcs
|
498
504
|
@rpcs ||= begin
|
499
505
|
parent_rpcs = nil
|
500
|
-
parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to?
|
506
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
|
501
507
|
Rpcs.new parent_rpcs
|
502
508
|
end
|
503
509
|
end
|
@@ -82,40 +82,12 @@ module Google
|
|
82
82
|
end
|
83
83
|
default_config = Client::Configuration.new parent_config
|
84
84
|
|
85
|
-
default_config.
|
86
|
-
default_config.
|
85
|
+
default_config.timeout = 60.0
|
86
|
+
default_config.retry_policy = {
|
87
87
|
initial_delay: 0.1,
|
88
88
|
max_delay: 60.0,
|
89
89
|
multiplier: 1.3,
|
90
|
-
retry_codes: ["UNAVAILABLE"
|
91
|
-
}
|
92
|
-
|
93
|
-
default_config.rpcs.get_context.timeout = 60.0
|
94
|
-
default_config.rpcs.get_context.retry_policy = {
|
95
|
-
initial_delay: 0.1,
|
96
|
-
max_delay: 60.0,
|
97
|
-
multiplier: 1.3,
|
98
|
-
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
99
|
-
}
|
100
|
-
|
101
|
-
default_config.rpcs.create_context.timeout = 60.0
|
102
|
-
|
103
|
-
default_config.rpcs.update_context.timeout = 60.0
|
104
|
-
|
105
|
-
default_config.rpcs.delete_context.timeout = 60.0
|
106
|
-
default_config.rpcs.delete_context.retry_policy = {
|
107
|
-
initial_delay: 0.1,
|
108
|
-
max_delay: 60.0,
|
109
|
-
multiplier: 1.3,
|
110
|
-
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
111
|
-
}
|
112
|
-
|
113
|
-
default_config.rpcs.delete_all_contexts.timeout = 60.0
|
114
|
-
default_config.rpcs.delete_all_contexts.retry_policy = {
|
115
|
-
initial_delay: 0.1,
|
116
|
-
max_delay: 60.0,
|
117
|
-
multiplier: 1.3,
|
118
|
-
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
90
|
+
retry_codes: ["UNAVAILABLE"]
|
119
91
|
}
|
120
92
|
|
121
93
|
default_config
|
@@ -183,7 +155,8 @@ module Google
|
|
183
155
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
184
156
|
credentials = Credentials.new credentials, scope: @config.scope
|
185
157
|
end
|
186
|
-
@quota_project_id =
|
158
|
+
@quota_project_id = @config.quota_project
|
159
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
187
160
|
|
188
161
|
@contexts_stub = ::Gapic::ServiceStub.new(
|
189
162
|
::Google::Cloud::Dialogflow::V2::Contexts::Stub,
|
@@ -705,24 +678,28 @@ module Google
|
|
705
678
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
706
679
|
# trigger a retry.
|
707
680
|
# @return [::Hash]
|
681
|
+
# @!attribute [rw] quota_project
|
682
|
+
# A separate project against which to charge quota.
|
683
|
+
# @return [::String]
|
708
684
|
#
|
709
685
|
class Configuration
|
710
686
|
extend ::Gapic::Config
|
711
687
|
|
712
|
-
config_attr :endpoint,
|
713
|
-
config_attr :credentials,
|
688
|
+
config_attr :endpoint, "dialogflow.googleapis.com", ::String
|
689
|
+
config_attr :credentials, nil do |value|
|
714
690
|
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
715
691
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
716
692
|
allowed.any? { |klass| klass === value }
|
717
693
|
end
|
718
|
-
config_attr :scope,
|
719
|
-
config_attr :lib_name,
|
720
|
-
config_attr :lib_version,
|
721
|
-
config_attr(:channel_args,
|
722
|
-
config_attr :interceptors,
|
723
|
-
config_attr :timeout,
|
724
|
-
config_attr :metadata,
|
725
|
-
config_attr :retry_policy,
|
694
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
695
|
+
config_attr :lib_name, nil, ::String, nil
|
696
|
+
config_attr :lib_version, nil, ::String, nil
|
697
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
698
|
+
config_attr :interceptors, nil, ::Array, nil
|
699
|
+
config_attr :timeout, nil, ::Numeric, nil
|
700
|
+
config_attr :metadata, nil, ::Hash, nil
|
701
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
702
|
+
config_attr :quota_project, nil, ::String, nil
|
726
703
|
|
727
704
|
# @private
|
728
705
|
def initialize parent_config = nil
|
@@ -738,7 +715,7 @@ module Google
|
|
738
715
|
def rpcs
|
739
716
|
@rpcs ||= begin
|
740
717
|
parent_rpcs = nil
|
741
|
-
parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to?
|
718
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
|
742
719
|
Rpcs.new parent_rpcs
|
743
720
|
end
|
744
721
|
end
|
@@ -92,54 +92,12 @@ module Google
|
|
92
92
|
end
|
93
93
|
default_config = Client::Configuration.new parent_config
|
94
94
|
|
95
|
-
default_config.
|
96
|
-
default_config.
|
95
|
+
default_config.timeout = 60.0
|
96
|
+
default_config.retry_policy = {
|
97
97
|
initial_delay: 0.1,
|
98
98
|
max_delay: 60.0,
|
99
99
|
multiplier: 1.3,
|
100
|
-
retry_codes: ["UNAVAILABLE"
|
101
|
-
}
|
102
|
-
|
103
|
-
default_config.rpcs.get_entity_type.timeout = 60.0
|
104
|
-
default_config.rpcs.get_entity_type.retry_policy = {
|
105
|
-
initial_delay: 0.1,
|
106
|
-
max_delay: 60.0,
|
107
|
-
multiplier: 1.3,
|
108
|
-
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
109
|
-
}
|
110
|
-
|
111
|
-
default_config.rpcs.create_entity_type.timeout = 60.0
|
112
|
-
|
113
|
-
default_config.rpcs.update_entity_type.timeout = 60.0
|
114
|
-
|
115
|
-
default_config.rpcs.delete_entity_type.timeout = 60.0
|
116
|
-
default_config.rpcs.delete_entity_type.retry_policy = {
|
117
|
-
initial_delay: 0.1,
|
118
|
-
max_delay: 60.0,
|
119
|
-
multiplier: 1.3,
|
120
|
-
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
121
|
-
}
|
122
|
-
|
123
|
-
default_config.rpcs.batch_update_entity_types.timeout = 60.0
|
124
|
-
|
125
|
-
default_config.rpcs.batch_delete_entity_types.timeout = 60.0
|
126
|
-
default_config.rpcs.batch_delete_entity_types.retry_policy = {
|
127
|
-
initial_delay: 0.1,
|
128
|
-
max_delay: 60.0,
|
129
|
-
multiplier: 1.3,
|
130
|
-
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
131
|
-
}
|
132
|
-
|
133
|
-
default_config.rpcs.batch_create_entities.timeout = 60.0
|
134
|
-
|
135
|
-
default_config.rpcs.batch_update_entities.timeout = 60.0
|
136
|
-
|
137
|
-
default_config.rpcs.batch_delete_entities.timeout = 60.0
|
138
|
-
default_config.rpcs.batch_delete_entities.retry_policy = {
|
139
|
-
initial_delay: 0.1,
|
140
|
-
max_delay: 60.0,
|
141
|
-
multiplier: 1.3,
|
142
|
-
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
100
|
+
retry_codes: ["UNAVAILABLE"]
|
143
101
|
}
|
144
102
|
|
145
103
|
default_config
|
@@ -207,7 +165,8 @@ module Google
|
|
207
165
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
208
166
|
credentials = Credentials.new credentials, scope: @config.scope
|
209
167
|
end
|
210
|
-
@quota_project_id =
|
168
|
+
@quota_project_id = @config.quota_project
|
169
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
211
170
|
|
212
171
|
@operations_client = Operations.new do |config|
|
213
172
|
config.credentials = credentials
|
@@ -1076,24 +1035,28 @@ module Google
|
|
1076
1035
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1077
1036
|
# trigger a retry.
|
1078
1037
|
# @return [::Hash]
|
1038
|
+
# @!attribute [rw] quota_project
|
1039
|
+
# A separate project against which to charge quota.
|
1040
|
+
# @return [::String]
|
1079
1041
|
#
|
1080
1042
|
class Configuration
|
1081
1043
|
extend ::Gapic::Config
|
1082
1044
|
|
1083
|
-
config_attr :endpoint,
|
1084
|
-
config_attr :credentials,
|
1045
|
+
config_attr :endpoint, "dialogflow.googleapis.com", ::String
|
1046
|
+
config_attr :credentials, nil do |value|
|
1085
1047
|
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1086
1048
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
1087
1049
|
allowed.any? { |klass| klass === value }
|
1088
1050
|
end
|
1089
|
-
config_attr :scope,
|
1090
|
-
config_attr :lib_name,
|
1091
|
-
config_attr :lib_version,
|
1092
|
-
config_attr(:channel_args,
|
1093
|
-
config_attr :interceptors,
|
1094
|
-
config_attr :timeout,
|
1095
|
-
config_attr :metadata,
|
1096
|
-
config_attr :retry_policy,
|
1051
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
1052
|
+
config_attr :lib_name, nil, ::String, nil
|
1053
|
+
config_attr :lib_version, nil, ::String, nil
|
1054
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
1055
|
+
config_attr :interceptors, nil, ::Array, nil
|
1056
|
+
config_attr :timeout, nil, ::Numeric, nil
|
1057
|
+
config_attr :metadata, nil, ::Hash, nil
|
1058
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1059
|
+
config_attr :quota_project, nil, ::String, nil
|
1097
1060
|
|
1098
1061
|
# @private
|
1099
1062
|
def initialize parent_config = nil
|
@@ -1109,7 +1072,7 @@ module Google
|
|
1109
1072
|
def rpcs
|
1110
1073
|
@rpcs ||= begin
|
1111
1074
|
parent_rpcs = nil
|
1112
|
-
parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to?
|
1075
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
|
1113
1076
|
Rpcs.new parent_rpcs
|
1114
1077
|
end
|
1115
1078
|
end
|
@@ -85,6 +85,8 @@ module Google
|
|
85
85
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
86
86
|
credentials = Credentials.new credentials, scope: @config.scope
|
87
87
|
end
|
88
|
+
@quota_project_id = @config.quota_project
|
89
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
88
90
|
|
89
91
|
@operations_stub = ::Gapic::ServiceStub.new(
|
90
92
|
::Google::Longrunning::Operations::Stub,
|
@@ -464,24 +466,28 @@ module Google
|
|
464
466
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
465
467
|
# trigger a retry.
|
466
468
|
# @return [::Hash]
|
469
|
+
# @!attribute [rw] quota_project
|
470
|
+
# A separate project against which to charge quota.
|
471
|
+
# @return [::String]
|
467
472
|
#
|
468
473
|
class Configuration
|
469
474
|
extend ::Gapic::Config
|
470
475
|
|
471
|
-
config_attr :endpoint,
|
472
|
-
config_attr :credentials,
|
476
|
+
config_attr :endpoint, "dialogflow.googleapis.com", ::String
|
477
|
+
config_attr :credentials, nil do |value|
|
473
478
|
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
474
479
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
475
480
|
allowed.any? { |klass| klass === value }
|
476
481
|
end
|
477
|
-
config_attr :scope,
|
478
|
-
config_attr :lib_name,
|
479
|
-
config_attr :lib_version,
|
480
|
-
config_attr(:channel_args,
|
481
|
-
config_attr :interceptors,
|
482
|
-
config_attr :timeout,
|
483
|
-
config_attr :metadata,
|
484
|
-
config_attr :retry_policy,
|
482
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
483
|
+
config_attr :lib_name, nil, ::String, nil
|
484
|
+
config_attr :lib_version, nil, ::String, nil
|
485
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
486
|
+
config_attr :interceptors, nil, ::Array, nil
|
487
|
+
config_attr :timeout, nil, ::Numeric, nil
|
488
|
+
config_attr :metadata, nil, ::Hash, nil
|
489
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
490
|
+
config_attr :quota_project, nil, ::String, nil
|
485
491
|
|
486
492
|
# @private
|
487
493
|
def initialize parent_config = nil
|
@@ -497,7 +503,7 @@ module Google
|
|
497
503
|
def rpcs
|
498
504
|
@rpcs ||= begin
|
499
505
|
parent_rpcs = nil
|
500
|
-
parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to?
|
506
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
|
501
507
|
Rpcs.new parent_rpcs
|
502
508
|
end
|
503
509
|
end
|
@@ -65,12 +65,12 @@ module Google
|
|
65
65
|
end
|
66
66
|
default_config = Client::Configuration.new parent_config
|
67
67
|
|
68
|
-
default_config.
|
69
|
-
default_config.
|
68
|
+
default_config.timeout = 60.0
|
69
|
+
default_config.retry_policy = {
|
70
70
|
initial_delay: 0.1,
|
71
71
|
max_delay: 60.0,
|
72
72
|
multiplier: 1.3,
|
73
|
-
retry_codes: ["UNAVAILABLE"
|
73
|
+
retry_codes: ["UNAVAILABLE"]
|
74
74
|
}
|
75
75
|
|
76
76
|
default_config
|
@@ -138,7 +138,8 @@ module Google
|
|
138
138
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
139
139
|
credentials = Credentials.new credentials, scope: @config.scope
|
140
140
|
end
|
141
|
-
@quota_project_id =
|
141
|
+
@quota_project_id = @config.quota_project
|
142
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
142
143
|
|
143
144
|
@environments_stub = ::Gapic::ServiceStub.new(
|
144
145
|
::Google::Cloud::Dialogflow::V2::Environments::Stub,
|
@@ -300,24 +301,28 @@ module Google
|
|
300
301
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
301
302
|
# trigger a retry.
|
302
303
|
# @return [::Hash]
|
304
|
+
# @!attribute [rw] quota_project
|
305
|
+
# A separate project against which to charge quota.
|
306
|
+
# @return [::String]
|
303
307
|
#
|
304
308
|
class Configuration
|
305
309
|
extend ::Gapic::Config
|
306
310
|
|
307
|
-
config_attr :endpoint,
|
308
|
-
config_attr :credentials,
|
311
|
+
config_attr :endpoint, "dialogflow.googleapis.com", ::String
|
312
|
+
config_attr :credentials, nil do |value|
|
309
313
|
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
310
314
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
311
315
|
allowed.any? { |klass| klass === value }
|
312
316
|
end
|
313
|
-
config_attr :scope,
|
314
|
-
config_attr :lib_name,
|
315
|
-
config_attr :lib_version,
|
316
|
-
config_attr(:channel_args,
|
317
|
-
config_attr :interceptors,
|
318
|
-
config_attr :timeout,
|
319
|
-
config_attr :metadata,
|
320
|
-
config_attr :retry_policy,
|
317
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
318
|
+
config_attr :lib_name, nil, ::String, nil
|
319
|
+
config_attr :lib_version, nil, ::String, nil
|
320
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
321
|
+
config_attr :interceptors, nil, ::Array, nil
|
322
|
+
config_attr :timeout, nil, ::Numeric, nil
|
323
|
+
config_attr :metadata, nil, ::Hash, nil
|
324
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
325
|
+
config_attr :quota_project, nil, ::String, nil
|
321
326
|
|
322
327
|
# @private
|
323
328
|
def initialize parent_config = nil
|
@@ -333,7 +338,7 @@ module Google
|
|
333
338
|
def rpcs
|
334
339
|
@rpcs ||= begin
|
335
340
|
parent_rpcs = nil
|
336
|
-
parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to?
|
341
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
|
337
342
|
Rpcs.new parent_rpcs
|
338
343
|
end
|
339
344
|
end
|
@@ -96,42 +96,12 @@ module Google
|
|
96
96
|
end
|
97
97
|
default_config = Client::Configuration.new parent_config
|
98
98
|
|
99
|
-
default_config.
|
100
|
-
default_config.
|
99
|
+
default_config.timeout = 60.0
|
100
|
+
default_config.retry_policy = {
|
101
101
|
initial_delay: 0.1,
|
102
102
|
max_delay: 60.0,
|
103
103
|
multiplier: 1.3,
|
104
|
-
retry_codes: ["UNAVAILABLE"
|
105
|
-
}
|
106
|
-
|
107
|
-
default_config.rpcs.get_intent.timeout = 60.0
|
108
|
-
default_config.rpcs.get_intent.retry_policy = {
|
109
|
-
initial_delay: 0.1,
|
110
|
-
max_delay: 60.0,
|
111
|
-
multiplier: 1.3,
|
112
|
-
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
113
|
-
}
|
114
|
-
|
115
|
-
default_config.rpcs.create_intent.timeout = 60.0
|
116
|
-
|
117
|
-
default_config.rpcs.update_intent.timeout = 60.0
|
118
|
-
|
119
|
-
default_config.rpcs.delete_intent.timeout = 60.0
|
120
|
-
default_config.rpcs.delete_intent.retry_policy = {
|
121
|
-
initial_delay: 0.1,
|
122
|
-
max_delay: 60.0,
|
123
|
-
multiplier: 1.3,
|
124
|
-
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
125
|
-
}
|
126
|
-
|
127
|
-
default_config.rpcs.batch_update_intents.timeout = 60.0
|
128
|
-
|
129
|
-
default_config.rpcs.batch_delete_intents.timeout = 60.0
|
130
|
-
default_config.rpcs.batch_delete_intents.retry_policy = {
|
131
|
-
initial_delay: 0.1,
|
132
|
-
max_delay: 60.0,
|
133
|
-
multiplier: 1.3,
|
134
|
-
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
104
|
+
retry_codes: ["UNAVAILABLE"]
|
135
105
|
}
|
136
106
|
|
137
107
|
default_config
|
@@ -199,7 +169,8 @@ module Google
|
|
199
169
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
200
170
|
credentials = Credentials.new credentials, scope: @config.scope
|
201
171
|
end
|
202
|
-
@quota_project_id =
|
172
|
+
@quota_project_id = @config.quota_project
|
173
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
203
174
|
|
204
175
|
@operations_client = Operations.new do |config|
|
205
176
|
config.credentials = credentials
|
@@ -836,24 +807,28 @@ module Google
|
|
836
807
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
837
808
|
# trigger a retry.
|
838
809
|
# @return [::Hash]
|
810
|
+
# @!attribute [rw] quota_project
|
811
|
+
# A separate project against which to charge quota.
|
812
|
+
# @return [::String]
|
839
813
|
#
|
840
814
|
class Configuration
|
841
815
|
extend ::Gapic::Config
|
842
816
|
|
843
|
-
config_attr :endpoint,
|
844
|
-
config_attr :credentials,
|
817
|
+
config_attr :endpoint, "dialogflow.googleapis.com", ::String
|
818
|
+
config_attr :credentials, nil do |value|
|
845
819
|
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
846
820
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
847
821
|
allowed.any? { |klass| klass === value }
|
848
822
|
end
|
849
|
-
config_attr :scope,
|
850
|
-
config_attr :lib_name,
|
851
|
-
config_attr :lib_version,
|
852
|
-
config_attr(:channel_args,
|
853
|
-
config_attr :interceptors,
|
854
|
-
config_attr :timeout,
|
855
|
-
config_attr :metadata,
|
856
|
-
config_attr :retry_policy,
|
823
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
824
|
+
config_attr :lib_name, nil, ::String, nil
|
825
|
+
config_attr :lib_version, nil, ::String, nil
|
826
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
827
|
+
config_attr :interceptors, nil, ::Array, nil
|
828
|
+
config_attr :timeout, nil, ::Numeric, nil
|
829
|
+
config_attr :metadata, nil, ::Hash, nil
|
830
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
831
|
+
config_attr :quota_project, nil, ::String, nil
|
857
832
|
|
858
833
|
# @private
|
859
834
|
def initialize parent_config = nil
|
@@ -869,7 +844,7 @@ module Google
|
|
869
844
|
def rpcs
|
870
845
|
@rpcs ||= begin
|
871
846
|
parent_rpcs = nil
|
872
|
-
parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to?
|
847
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
|
873
848
|
Rpcs.new parent_rpcs
|
874
849
|
end
|
875
850
|
end
|
@@ -85,6 +85,8 @@ module Google
|
|
85
85
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
86
86
|
credentials = Credentials.new credentials, scope: @config.scope
|
87
87
|
end
|
88
|
+
@quota_project_id = @config.quota_project
|
89
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
88
90
|
|
89
91
|
@operations_stub = ::Gapic::ServiceStub.new(
|
90
92
|
::Google::Longrunning::Operations::Stub,
|
@@ -464,24 +466,28 @@ module Google
|
|
464
466
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
465
467
|
# trigger a retry.
|
466
468
|
# @return [::Hash]
|
469
|
+
# @!attribute [rw] quota_project
|
470
|
+
# A separate project against which to charge quota.
|
471
|
+
# @return [::String]
|
467
472
|
#
|
468
473
|
class Configuration
|
469
474
|
extend ::Gapic::Config
|
470
475
|
|
471
|
-
config_attr :endpoint,
|
472
|
-
config_attr :credentials,
|
476
|
+
config_attr :endpoint, "dialogflow.googleapis.com", ::String
|
477
|
+
config_attr :credentials, nil do |value|
|
473
478
|
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
474
479
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
475
480
|
allowed.any? { |klass| klass === value }
|
476
481
|
end
|
477
|
-
config_attr :scope,
|
478
|
-
config_attr :lib_name,
|
479
|
-
config_attr :lib_version,
|
480
|
-
config_attr(:channel_args,
|
481
|
-
config_attr :interceptors,
|
482
|
-
config_attr :timeout,
|
483
|
-
config_attr :metadata,
|
484
|
-
config_attr :retry_policy,
|
482
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
483
|
+
config_attr :lib_name, nil, ::String, nil
|
484
|
+
config_attr :lib_version, nil, ::String, nil
|
485
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
486
|
+
config_attr :interceptors, nil, ::Array, nil
|
487
|
+
config_attr :timeout, nil, ::Numeric, nil
|
488
|
+
config_attr :metadata, nil, ::Hash, nil
|
489
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
490
|
+
config_attr :quota_project, nil, ::String, nil
|
485
491
|
|
486
492
|
# @private
|
487
493
|
def initialize parent_config = nil
|
@@ -497,7 +503,7 @@ module Google
|
|
497
503
|
def rpcs
|
498
504
|
@rpcs ||= begin
|
499
505
|
parent_rpcs = nil
|
500
|
-
parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to?
|
506
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
|
501
507
|
Rpcs.new parent_rpcs
|
502
508
|
end
|
503
509
|
end
|
@@ -81,32 +81,12 @@ module Google
|
|
81
81
|
end
|
82
82
|
default_config = Client::Configuration.new parent_config
|
83
83
|
|
84
|
-
default_config.
|
85
|
-
default_config.
|
84
|
+
default_config.timeout = 60.0
|
85
|
+
default_config.retry_policy = {
|
86
86
|
initial_delay: 0.1,
|
87
87
|
max_delay: 60.0,
|
88
88
|
multiplier: 1.3,
|
89
|
-
retry_codes: ["UNAVAILABLE"
|
90
|
-
}
|
91
|
-
|
92
|
-
default_config.rpcs.get_session_entity_type.timeout = 60.0
|
93
|
-
default_config.rpcs.get_session_entity_type.retry_policy = {
|
94
|
-
initial_delay: 0.1,
|
95
|
-
max_delay: 60.0,
|
96
|
-
multiplier: 1.3,
|
97
|
-
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
98
|
-
}
|
99
|
-
|
100
|
-
default_config.rpcs.create_session_entity_type.timeout = 60.0
|
101
|
-
|
102
|
-
default_config.rpcs.update_session_entity_type.timeout = 60.0
|
103
|
-
|
104
|
-
default_config.rpcs.delete_session_entity_type.timeout = 60.0
|
105
|
-
default_config.rpcs.delete_session_entity_type.retry_policy = {
|
106
|
-
initial_delay: 0.1,
|
107
|
-
max_delay: 60.0,
|
108
|
-
multiplier: 1.3,
|
109
|
-
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
89
|
+
retry_codes: ["UNAVAILABLE"]
|
110
90
|
}
|
111
91
|
|
112
92
|
default_config
|
@@ -174,7 +154,8 @@ module Google
|
|
174
154
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
175
155
|
credentials = Credentials.new credentials, scope: @config.scope
|
176
156
|
end
|
177
|
-
@quota_project_id =
|
157
|
+
@quota_project_id = @config.quota_project
|
158
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
178
159
|
|
179
160
|
@session_entity_types_stub = ::Gapic::ServiceStub.new(
|
180
161
|
::Google::Cloud::Dialogflow::V2::SessionEntityTypes::Stub,
|
@@ -648,24 +629,28 @@ module Google
|
|
648
629
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
649
630
|
# trigger a retry.
|
650
631
|
# @return [::Hash]
|
632
|
+
# @!attribute [rw] quota_project
|
633
|
+
# A separate project against which to charge quota.
|
634
|
+
# @return [::String]
|
651
635
|
#
|
652
636
|
class Configuration
|
653
637
|
extend ::Gapic::Config
|
654
638
|
|
655
|
-
config_attr :endpoint,
|
656
|
-
config_attr :credentials,
|
639
|
+
config_attr :endpoint, "dialogflow.googleapis.com", ::String
|
640
|
+
config_attr :credentials, nil do |value|
|
657
641
|
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
658
642
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
659
643
|
allowed.any? { |klass| klass === value }
|
660
644
|
end
|
661
|
-
config_attr :scope,
|
662
|
-
config_attr :lib_name,
|
663
|
-
config_attr :lib_version,
|
664
|
-
config_attr(:channel_args,
|
665
|
-
config_attr :interceptors,
|
666
|
-
config_attr :timeout,
|
667
|
-
config_attr :metadata,
|
668
|
-
config_attr :retry_policy,
|
645
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
646
|
+
config_attr :lib_name, nil, ::String, nil
|
647
|
+
config_attr :lib_version, nil, ::String, nil
|
648
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
649
|
+
config_attr :interceptors, nil, ::Array, nil
|
650
|
+
config_attr :timeout, nil, ::Numeric, nil
|
651
|
+
config_attr :metadata, nil, ::Hash, nil
|
652
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
653
|
+
config_attr :quota_project, nil, ::String, nil
|
669
654
|
|
670
655
|
# @private
|
671
656
|
def initialize parent_config = nil
|
@@ -681,7 +666,7 @@ module Google
|
|
681
666
|
def rpcs
|
682
667
|
@rpcs ||= begin
|
683
668
|
parent_rpcs = nil
|
684
|
-
parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to?
|
669
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
|
685
670
|
Rpcs.new parent_rpcs
|
686
671
|
end
|
687
672
|
end
|
@@ -68,7 +68,21 @@ module Google
|
|
68
68
|
end
|
69
69
|
default_config = Client::Configuration.new parent_config
|
70
70
|
|
71
|
+
default_config.timeout = 60.0
|
72
|
+
default_config.retry_policy = {
|
73
|
+
initial_delay: 0.1,
|
74
|
+
max_delay: 60.0,
|
75
|
+
multiplier: 1.3,
|
76
|
+
retry_codes: ["UNAVAILABLE"]
|
77
|
+
}
|
78
|
+
|
71
79
|
default_config.rpcs.detect_intent.timeout = 220.0
|
80
|
+
default_config.rpcs.detect_intent.retry_policy = {
|
81
|
+
initial_delay: 0.1,
|
82
|
+
max_delay: 60.0,
|
83
|
+
multiplier: 1.3,
|
84
|
+
retry_codes: ["UNAVAILABLE"]
|
85
|
+
}
|
72
86
|
|
73
87
|
default_config.rpcs.streaming_detect_intent.timeout = 220.0
|
74
88
|
|
@@ -137,7 +151,8 @@ module Google
|
|
137
151
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
138
152
|
credentials = Credentials.new credentials, scope: @config.scope
|
139
153
|
end
|
140
|
-
@quota_project_id =
|
154
|
+
@quota_project_id = @config.quota_project
|
155
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
141
156
|
|
142
157
|
@sessions_stub = ::Gapic::ServiceStub.new(
|
143
158
|
::Google::Cloud::Dialogflow::V2::Sessions::Stub,
|
@@ -383,24 +398,28 @@ module Google
|
|
383
398
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
384
399
|
# trigger a retry.
|
385
400
|
# @return [::Hash]
|
401
|
+
# @!attribute [rw] quota_project
|
402
|
+
# A separate project against which to charge quota.
|
403
|
+
# @return [::String]
|
386
404
|
#
|
387
405
|
class Configuration
|
388
406
|
extend ::Gapic::Config
|
389
407
|
|
390
|
-
config_attr :endpoint,
|
391
|
-
config_attr :credentials,
|
408
|
+
config_attr :endpoint, "dialogflow.googleapis.com", ::String
|
409
|
+
config_attr :credentials, nil do |value|
|
392
410
|
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
393
411
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
394
412
|
allowed.any? { |klass| klass === value }
|
395
413
|
end
|
396
|
-
config_attr :scope,
|
397
|
-
config_attr :lib_name,
|
398
|
-
config_attr :lib_version,
|
399
|
-
config_attr(:channel_args,
|
400
|
-
config_attr :interceptors,
|
401
|
-
config_attr :timeout,
|
402
|
-
config_attr :metadata,
|
403
|
-
config_attr :retry_policy,
|
414
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
415
|
+
config_attr :lib_name, nil, ::String, nil
|
416
|
+
config_attr :lib_version, nil, ::String, nil
|
417
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
418
|
+
config_attr :interceptors, nil, ::Array, nil
|
419
|
+
config_attr :timeout, nil, ::Numeric, nil
|
420
|
+
config_attr :metadata, nil, ::Hash, nil
|
421
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
422
|
+
config_attr :quota_project, nil, ::String, nil
|
404
423
|
|
405
424
|
# @private
|
406
425
|
def initialize parent_config = nil
|
@@ -416,7 +435,7 @@ module Google
|
|
416
435
|
def rpcs
|
417
436
|
@rpcs ||= begin
|
418
437
|
parent_rpcs = nil
|
419
|
-
parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to?
|
438
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
|
420
439
|
Rpcs.new parent_rpcs
|
421
440
|
end
|
422
441
|
end
|
@@ -21,7 +21,16 @@ module Google
|
|
21
21
|
module Cloud
|
22
22
|
module Dialogflow
|
23
23
|
module V2
|
24
|
-
#
|
24
|
+
# A Dialogflow agent is a virtual agent that handles conversations with your
|
25
|
+
# end-users. It is a natural language understanding module that understands the
|
26
|
+
# nuances of human language. Dialogflow translates end-user text or audio
|
27
|
+
# during a conversation to structured data that your apps and services can
|
28
|
+
# understand. You design and build a Dialogflow agent to handle the types of
|
29
|
+
# conversations required for your system.
|
30
|
+
#
|
31
|
+
# For more information about agents, see the
|
32
|
+
# [Agents
|
33
|
+
# documentation](https://cloud.google.com/dialogflow/docs/agents-overview).
|
25
34
|
# @!attribute [rw] parent
|
26
35
|
# @return [::String]
|
27
36
|
# Required. The project of this agent.
|
@@ -47,7 +47,7 @@ module Google
|
|
47
47
|
include ::Google::Protobuf::MessageExts
|
48
48
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
49
49
|
|
50
|
-
# Represents an environment state. When
|
50
|
+
# Represents an environment state. When an environment is pointed to a new
|
51
51
|
# agent version, the environment is temporarily set to the `LOADING` state.
|
52
52
|
# During that time, the environment keeps on serving the previous version of
|
53
53
|
# the agent. After the new agent version is done loading, the environment is
|
@@ -211,6 +211,7 @@ module Google
|
|
211
211
|
# @!attribute [rw] value
|
212
212
|
# @return [::String]
|
213
213
|
# Optional. The definition of the parameter value. It can be:
|
214
|
+
#
|
214
215
|
# - a constant string,
|
215
216
|
# - a parameter value defined as `$parameter_name`,
|
216
217
|
# - an original parameter value defined as `$parameter_name.original`,
|
@@ -89,6 +89,10 @@ module Google
|
|
89
89
|
# multiple default text responses exist, they will be concatenated when
|
90
90
|
# generating audio. If no default platform text responses exist, the
|
91
91
|
# generated audio content will be empty.
|
92
|
+
#
|
93
|
+
# In some scenarios, multiple output audio fields may be present in the
|
94
|
+
# response structure. In these cases, only the top-most-level audio output
|
95
|
+
# has content.
|
92
96
|
# @!attribute [rw] output_audio_config
|
93
97
|
# @return [::Google::Cloud::Dialogflow::V2::OutputAudioConfig]
|
94
98
|
# The config used by the speech synthesizer to generate the output audio.
|
@@ -390,6 +394,10 @@ module Google
|
|
390
394
|
# multiple default text responses exist, they will be concatenated when
|
391
395
|
# generating audio. If no default platform text responses exist, the
|
392
396
|
# generated audio content will be empty.
|
397
|
+
#
|
398
|
+
# In some scenarios, multiple output audio fields may be present in the
|
399
|
+
# response structure. In these cases, only the top-most-level audio output
|
400
|
+
# has content.
|
393
401
|
# @!attribute [rw] output_audio_config
|
394
402
|
# @return [::Google::Cloud::Dialogflow::V2::OutputAudioConfig]
|
395
403
|
# The config used by the speech synthesizer to generate the output audio.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-dialogflow-v2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.3'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0.
|
26
|
+
version: '0.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: google-cloud-errors
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +58,42 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '5.
|
61
|
+
version: '5.14'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '5.
|
68
|
+
version: '5.14'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: minitest-focus
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.1'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.1'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: minitest-rg
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '5.2'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '5.2'
|
69
97
|
- !ruby/object:Gem::Dependency
|
70
98
|
name: rake
|
71
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -137,7 +165,6 @@ files:
|
|
137
165
|
- LICENSE.md
|
138
166
|
- README.md
|
139
167
|
- lib/google-cloud-dialogflow-v2.rb
|
140
|
-
- lib/google/cloud/common_resources_pb.rb
|
141
168
|
- lib/google/cloud/dialogflow/v2.rb
|
142
169
|
- lib/google/cloud/dialogflow/v2/agent_pb.rb
|
143
170
|
- lib/google/cloud/dialogflow/v2/agent_services_pb.rb
|
@@ -229,7 +256,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
229
256
|
- !ruby/object:Gem::Version
|
230
257
|
version: '0'
|
231
258
|
requirements: []
|
232
|
-
rubygems_version: 3.
|
259
|
+
rubygems_version: 3.1.3
|
233
260
|
signing_key:
|
234
261
|
specification_version: 4
|
235
262
|
summary: API Client library for the Dialogflow V2 API
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
-
# source: google/cloud/common_resources.proto
|
3
|
-
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
|
-
require 'google/api/resource_pb'
|
7
|
-
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
|
-
add_file("google/cloud/common_resources.proto", :syntax => :proto3) do
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
module Google
|
13
|
-
module Cloud
|
14
|
-
end
|
15
|
-
end
|