google-cloud-dialogflow-v2 0.8.1 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
@@ -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
|
@@ -325,6 +322,10 @@ module Google
|
|
325
322
|
##
|
326
323
|
# Creates an entity type in the specified agent.
|
327
324
|
#
|
325
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
326
|
+
# [training
|
327
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
328
|
+
#
|
328
329
|
# @overload create_entity_type(request, options = nil)
|
329
330
|
# Pass arguments to `create_entity_type` via a request object, either of type
|
330
331
|
# {::Google::Cloud::Dialogflow::V2::CreateEntityTypeRequest} or an equivalent Hash.
|
@@ -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.
|
@@ -474,6 +479,10 @@ module Google
|
|
474
479
|
##
|
475
480
|
# Deletes the specified entity type.
|
476
481
|
#
|
482
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
483
|
+
# [training
|
484
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
485
|
+
#
|
477
486
|
# @overload delete_entity_type(request, options = nil)
|
478
487
|
# Pass arguments to `delete_entity_type` via a request object, either of type
|
479
488
|
# {::Google::Cloud::Dialogflow::V2::DeleteEntityTypeRequest} or an equivalent Hash.
|
@@ -541,7 +550,10 @@ module Google
|
|
541
550
|
##
|
542
551
|
# Updates/Creates multiple entity types in the specified agent.
|
543
552
|
#
|
544
|
-
#
|
553
|
+
#
|
554
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
555
|
+
# [training
|
556
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
545
557
|
#
|
546
558
|
# @overload batch_update_entity_types(request, options = nil)
|
547
559
|
# Pass arguments to `batch_update_entity_types` via a request object, either of type
|
@@ -626,7 +638,9 @@ module Google
|
|
626
638
|
##
|
627
639
|
# Deletes entity types in the specified agent.
|
628
640
|
#
|
629
|
-
#
|
641
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
642
|
+
# [training
|
643
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
630
644
|
#
|
631
645
|
# @overload batch_delete_entity_types(request, options = nil)
|
632
646
|
# Pass arguments to `batch_delete_entity_types` via a request object, either of type
|
@@ -699,7 +713,9 @@ module Google
|
|
699
713
|
##
|
700
714
|
# Creates multiple new entities in the specified entity type.
|
701
715
|
#
|
702
|
-
#
|
716
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
717
|
+
# [training
|
718
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
703
719
|
#
|
704
720
|
# @overload batch_create_entities(request, options = nil)
|
705
721
|
# Pass arguments to `batch_create_entities` via a request object, either of type
|
@@ -779,8 +795,9 @@ module Google
|
|
779
795
|
# method does not affect entities in the entity type that aren't explicitly
|
780
796
|
# specified in the request.
|
781
797
|
#
|
782
|
-
#
|
783
|
-
#
|
798
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
799
|
+
# [training
|
800
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
784
801
|
#
|
785
802
|
# @overload batch_update_entities(request, options = nil)
|
786
803
|
# Pass arguments to `batch_update_entities` via a request object, either of type
|
@@ -860,8 +877,9 @@ module Google
|
|
860
877
|
##
|
861
878
|
# Deletes entities in the specified entity type.
|
862
879
|
#
|
863
|
-
#
|
864
|
-
#
|
880
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
881
|
+
# [training
|
882
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
865
883
|
#
|
866
884
|
# @overload batch_delete_entities(request, options = nil)
|
867
885
|
# Pass arguments to `batch_delete_entities` via a request object, either of type
|
@@ -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,13 +27,13 @@ module Google
|
|
27
27
|
# Service for managing [Environments][google.cloud.dialogflow.v2.Environment].
|
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
|
34
34
|
self.service_name = 'google.cloud.dialogflow.v2.Environments'
|
35
35
|
|
36
|
-
# Returns the list of all non-
|
36
|
+
# Returns the list of all non-default environments of the specified agent.
|
37
37
|
rpc :ListEnvironments, ::Google::Cloud::Dialogflow::V2::ListEnvironmentsRequest, ::Google::Cloud::Dialogflow::V2::ListEnvironmentsResponse
|
38
38
|
# Retrieves the specified agent environment.
|
39
39
|
rpc :GetEnvironment, ::Google::Cloud::Dialogflow::V2::GetEnvironmentRequest, ::Google::Cloud::Dialogflow::V2::Environment
|
@@ -44,13 +44,13 @@ module Google
|
|
44
44
|
# This method allows you to deploy new agent versions into the environment.
|
45
45
|
# When an environment is pointed to a new agent version by setting
|
46
46
|
# `environment.agent_version`, the environment is temporarily set to the
|
47
|
-
# `LOADING` state. During that time, the environment
|
47
|
+
# `LOADING` state. During that time, the environment continues serving the
|
48
48
|
# previous version of the agent. After the new agent version is done loading,
|
49
49
|
# the environment is set back to the `RUNNING` state.
|
50
|
-
# You can use "-" as Environment ID in environment name to update
|
51
|
-
# in
|
52
|
-
# draft and can't be undone. You may want to save the
|
53
|
-
# before calling this
|
50
|
+
# You can use "-" as Environment ID in environment name to update an agent
|
51
|
+
# version in the default environment. WARNING: this will negate all recent
|
52
|
+
# changes to the draft agent and can't be undone. You may want to save the
|
53
|
+
# draft agent to a version before calling this method.
|
54
54
|
rpc :UpdateEnvironment, ::Google::Cloud::Dialogflow::V2::UpdateEnvironmentRequest, ::Google::Cloud::Dialogflow::V2::Environment
|
55
55
|
# Deletes the specified agent environment.
|
56
56
|
rpc :DeleteEnvironment, ::Google::Cloud::Dialogflow::V2::DeleteEnvironmentRequest, ::Google::Protobuf::Empty
|
@@ -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
|
@@ -159,7 +156,7 @@ module Google
|
|
159
156
|
# Service calls
|
160
157
|
|
161
158
|
##
|
162
|
-
# Returns the list of all non-
|
159
|
+
# Returns the list of all non-default environments of the specified agent.
|
163
160
|
#
|
164
161
|
# @overload list_environments(request, options = nil)
|
165
162
|
# Pass arguments to `list_environments` via a request object, either of type
|
@@ -179,6 +176,7 @@ module Google
|
|
179
176
|
# @param parent [::String]
|
180
177
|
# Required. The agent to list all environments from.
|
181
178
|
# Format:
|
179
|
+
#
|
182
180
|
# - `projects/<Project ID>/agent`
|
183
181
|
# - `projects/<Project ID>/locations/<Location ID>/agent`
|
184
182
|
# @param page_size [::Integer]
|
@@ -254,10 +252,13 @@ module Google
|
|
254
252
|
# @param name [::String]
|
255
253
|
# Required. The name of the environment.
|
256
254
|
# Supported formats:
|
255
|
+
#
|
257
256
|
# - `projects/<Project ID>/agent/environments/<Environment ID>`
|
258
257
|
# - `projects/<Project ID>/locations/<Location
|
259
258
|
# ID>/agent/environments/<Environment ID>`
|
260
259
|
#
|
260
|
+
# The environment ID for the default environment is `-`.
|
261
|
+
#
|
261
262
|
# @yield [response, operation] Access the result along with the RPC operation
|
262
263
|
# @yieldparam response [::Google::Cloud::Dialogflow::V2::Environment]
|
263
264
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
@@ -324,6 +325,7 @@ module Google
|
|
324
325
|
# @param parent [::String]
|
325
326
|
# Required. The agent to create an environment for.
|
326
327
|
# Supported formats:
|
328
|
+
#
|
327
329
|
# - `projects/<Project ID>/agent`
|
328
330
|
# - `projects/<Project ID>/locations/<Location ID>/agent`
|
329
331
|
# @param environment [::Google::Cloud::Dialogflow::V2::Environment, ::Hash]
|
@@ -382,13 +384,13 @@ module Google
|
|
382
384
|
# This method allows you to deploy new agent versions into the environment.
|
383
385
|
# When an environment is pointed to a new agent version by setting
|
384
386
|
# `environment.agent_version`, the environment is temporarily set to the
|
385
|
-
# `LOADING` state. During that time, the environment
|
387
|
+
# `LOADING` state. During that time, the environment continues serving the
|
386
388
|
# previous version of the agent. After the new agent version is done loading,
|
387
389
|
# the environment is set back to the `RUNNING` state.
|
388
|
-
# You can use "-" as Environment ID in environment name to update
|
389
|
-
# in
|
390
|
-
# draft and can't be undone. You may want to save the
|
391
|
-
# before calling this
|
390
|
+
# You can use "-" as Environment ID in environment name to update an agent
|
391
|
+
# version in the default environment. WARNING: this will negate all recent
|
392
|
+
# changes to the draft agent and can't be undone. You may want to save the
|
393
|
+
# draft agent to a version before calling this method.
|
392
394
|
#
|
393
395
|
# @overload update_environment(request, options = nil)
|
394
396
|
# Pass arguments to `update_environment` via a request object, either of type
|
@@ -410,10 +412,10 @@ module Google
|
|
410
412
|
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
411
413
|
# Required. The mask to control which fields get updated.
|
412
414
|
# @param allow_load_to_draft_and_discard_changes [::Boolean]
|
413
|
-
# Optional. This field is used to prevent accidental overwrite of the
|
415
|
+
# Optional. This field is used to prevent accidental overwrite of the default
|
414
416
|
# environment, which is an operation that cannot be undone. To confirm that
|
415
417
|
# the caller desires this overwrite, this field must be explicitly set to
|
416
|
-
# true when updating the
|
418
|
+
# true when updating the default environment (environment ID = `-`).
|
417
419
|
#
|
418
420
|
# @yield [response, operation] Access the result along with the RPC operation
|
419
421
|
# @yieldparam response [::Google::Cloud::Dialogflow::V2::Environment]
|
@@ -481,9 +483,12 @@ module Google
|
|
481
483
|
# @param name [::String]
|
482
484
|
# Required. The name of the environment to delete.
|
483
485
|
# / Format:
|
486
|
+
#
|
484
487
|
# - `projects/<Project ID>/agent/environments/<Environment ID>`
|
485
488
|
# - `projects/<Project ID>/locations/<Location
|
486
|
-
#
|
489
|
+
# ID>/agent/environments/<Environment ID>`
|
490
|
+
#
|
491
|
+
# The environment ID for the default environment is `-`.
|
487
492
|
#
|
488
493
|
# @yield [response, operation] Access the result along with the RPC operation
|
489
494
|
# @yieldparam response [::Google::Protobuf::Empty]
|
@@ -551,9 +556,12 @@ module Google
|
|
551
556
|
# @param parent [::String]
|
552
557
|
# Required. The name of the environment to retrieve history for.
|
553
558
|
# Supported formats:
|
559
|
+
#
|
554
560
|
# - `projects/<Project ID>/agent/environments/<Environment ID>`
|
555
561
|
# - `projects/<Project ID>/locations/<Location
|
556
562
|
# ID>/agent/environments/<Environment ID>`
|
563
|
+
#
|
564
|
+
# The environment ID for the default environment is `-`.
|
557
565
|
# @param page_size [::Integer]
|
558
566
|
# Optional. The maximum number of items to return in a single page. By default 100 and
|
559
567
|
# at most 1000.
|
@@ -137,6 +137,47 @@ module Google
|
|
137
137
|
resource.call(**args)
|
138
138
|
end
|
139
139
|
|
140
|
+
##
|
141
|
+
# Create a fully-qualified Version resource string.
|
142
|
+
#
|
143
|
+
# @overload version_path(project:, version:)
|
144
|
+
# The resource will be in the following format:
|
145
|
+
#
|
146
|
+
# `projects/{project}/agent/versions/{version}`
|
147
|
+
#
|
148
|
+
# @param project [String]
|
149
|
+
# @param version [String]
|
150
|
+
#
|
151
|
+
# @overload version_path(project:, location:, version:)
|
152
|
+
# The resource will be in the following format:
|
153
|
+
#
|
154
|
+
# `projects/{project}/locations/{location}/agent/versions/{version}`
|
155
|
+
#
|
156
|
+
# @param project [String]
|
157
|
+
# @param location [String]
|
158
|
+
# @param version [String]
|
159
|
+
#
|
160
|
+
# @return [::String]
|
161
|
+
def version_path **args
|
162
|
+
resources = {
|
163
|
+
"project:version" => (proc do |project:, version:|
|
164
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
165
|
+
|
166
|
+
"projects/#{project}/agent/versions/#{version}"
|
167
|
+
end),
|
168
|
+
"location:project:version" => (proc do |project:, location:, version:|
|
169
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
170
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
171
|
+
|
172
|
+
"projects/#{project}/locations/#{location}/agent/versions/#{version}"
|
173
|
+
end)
|
174
|
+
}
|
175
|
+
|
176
|
+
resource = resources[args.keys.sort.join(":")]
|
177
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
178
|
+
resource.call(**args)
|
179
|
+
end
|
180
|
+
|
140
181
|
extend self
|
141
182
|
end
|
142
183
|
end
|
@@ -27,7 +27,7 @@ module Google
|
|
27
27
|
# Service for managing [Fulfillments][google.cloud.dialogflow.v2.Fulfillment].
|
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 [Intents][google.cloud.dialogflow.v2.Intent].
|
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,18 +38,36 @@ module Google
|
|
38
38
|
# Retrieves the specified intent.
|
39
39
|
rpc :GetIntent, ::Google::Cloud::Dialogflow::V2::GetIntentRequest, ::Google::Cloud::Dialogflow::V2::Intent
|
40
40
|
# Creates an intent 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 :CreateIntent, ::Google::Cloud::Dialogflow::V2::CreateIntentRequest, ::Google::Cloud::Dialogflow::V2::Intent
|
42
46
|
# Updates the specified intent.
|
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 :UpdateIntent, ::Google::Cloud::Dialogflow::V2::UpdateIntentRequest, ::Google::Cloud::Dialogflow::V2::Intent
|
44
52
|
# Deletes the specified intent and its direct or indirect followup intents.
|
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 :DeleteIntent, ::Google::Cloud::Dialogflow::V2::DeleteIntentRequest, ::Google::Protobuf::Empty
|
46
58
|
# Updates/Creates multiple intents 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 :BatchUpdateIntents, ::Google::Cloud::Dialogflow::V2::BatchUpdateIntentsRequest, ::Google::Longrunning::Operation
|
50
65
|
# Deletes intents in the specified agent.
|
51
66
|
#
|
52
|
-
#
|
67
|
+
#
|
68
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
69
|
+
# [training
|
70
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
53
71
|
rpc :BatchDeleteIntents, ::Google::Cloud::Dialogflow::V2::BatchDeleteIntentsRequest, ::Google::Longrunning::Operation
|
54
72
|
end
|
55
73
|
|
@@ -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
|
@@ -337,6 +334,10 @@ module Google
|
|
337
334
|
##
|
338
335
|
# Creates an intent in the specified agent.
|
339
336
|
#
|
337
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
338
|
+
# [training
|
339
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
340
|
+
#
|
340
341
|
# @overload create_intent(request, options = nil)
|
341
342
|
# Pass arguments to `create_intent` via a request object, either of type
|
342
343
|
# {::Google::Cloud::Dialogflow::V2::CreateIntentRequest} or an equivalent Hash.
|
@@ -414,6 +415,10 @@ module Google
|
|
414
415
|
##
|
415
416
|
# Updates the specified intent.
|
416
417
|
#
|
418
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
419
|
+
# [training
|
420
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
421
|
+
#
|
417
422
|
# @overload update_intent(request, options = nil)
|
418
423
|
# Pass arguments to `update_intent` via a request object, either of type
|
419
424
|
# {::Google::Cloud::Dialogflow::V2::UpdateIntentRequest} or an equivalent Hash.
|
@@ -490,6 +495,10 @@ module Google
|
|
490
495
|
##
|
491
496
|
# Deletes the specified intent and its direct or indirect followup intents.
|
492
497
|
#
|
498
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
499
|
+
# [training
|
500
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
501
|
+
#
|
493
502
|
# @overload delete_intent(request, options = nil)
|
494
503
|
# Pass arguments to `delete_intent` via a request object, either of type
|
495
504
|
# {::Google::Cloud::Dialogflow::V2::DeleteIntentRequest} or an equivalent Hash.
|
@@ -558,7 +567,10 @@ module Google
|
|
558
567
|
##
|
559
568
|
# Updates/Creates multiple intents in the specified agent.
|
560
569
|
#
|
561
|
-
#
|
570
|
+
#
|
571
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
572
|
+
# [training
|
573
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
562
574
|
#
|
563
575
|
# @overload batch_update_intents(request, options = nil)
|
564
576
|
# Pass arguments to `batch_update_intents` via a request object, either of type
|
@@ -644,7 +656,10 @@ module Google
|
|
644
656
|
##
|
645
657
|
# Deletes intents in the specified agent.
|
646
658
|
#
|
647
|
-
#
|
659
|
+
#
|
660
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
661
|
+
# [training
|
662
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
648
663
|
#
|
649
664
|
# @overload batch_delete_intents(request, options = nil)
|
650
665
|
# Pass arguments to `batch_delete_intents` via a request object, either of type
|