google-cloud-dialogflow-v2 0.6.2 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.md +188 -190
- data/README.md +70 -2
- data/lib/google/cloud/dialogflow/v2.rb +13 -2
- data/lib/google/cloud/dialogflow/v2/agent_services_pb.rb +25 -40
- data/lib/google/cloud/dialogflow/v2/agents.rb +1 -28
- data/lib/google/cloud/dialogflow/v2/agents/client.rb +41 -100
- data/lib/google/cloud/dialogflow/v2/agents/operations.rb +96 -11
- data/lib/google/cloud/dialogflow/v2/agents/paths.rb +42 -3
- data/lib/google/cloud/dialogflow/v2/answer_record_pb.rb +100 -0
- data/lib/google/cloud/dialogflow/v2/answer_record_services_pb.rb +48 -0
- data/lib/google/cloud/dialogflow/v2/answer_records.rb +49 -0
- data/lib/google/cloud/dialogflow/v2/answer_records/client.rb +478 -0
- data/lib/google/cloud/dialogflow/v2/answer_records/credentials.rb +52 -0
- data/lib/google/cloud/dialogflow/v2/answer_records/paths.rb +105 -0
- data/lib/google/cloud/dialogflow/v2/audio_config_pb.rb +7 -0
- data/lib/google/cloud/dialogflow/v2/context_services_pb.rb +8 -25
- data/lib/google/cloud/dialogflow/v2/contexts.rb +1 -18
- data/lib/google/cloud/dialogflow/v2/contexts/client.rb +24 -63
- data/lib/google/cloud/dialogflow/v2/contexts/paths.rb +74 -2
- data/lib/google/cloud/dialogflow/v2/conversation_event_pb.rb +39 -0
- data/lib/google/cloud/dialogflow/v2/conversation_pb.rb +89 -0
- data/lib/google/cloud/dialogflow/v2/conversation_profile_pb.rb +182 -0
- data/lib/google/cloud/dialogflow/v2/conversation_profile_services_pb.rb +61 -0
- data/lib/google/cloud/dialogflow/v2/conversation_profiles.rb +49 -0
- data/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb +699 -0
- data/lib/google/cloud/dialogflow/v2/conversation_profiles/credentials.rb +52 -0
- data/lib/google/cloud/dialogflow/v2/conversation_profiles/paths.rb +246 -0
- data/lib/google/cloud/dialogflow/v2/conversation_services_pb.rb +75 -0
- data/lib/google/cloud/dialogflow/v2/conversations.rb +49 -0
- data/lib/google/cloud/dialogflow/v2/conversations/client.rb +757 -0
- data/lib/google/cloud/dialogflow/v2/conversations/credentials.rb +52 -0
- data/lib/google/cloud/dialogflow/v2/conversations/paths.rb +146 -0
- data/lib/google/cloud/dialogflow/v2/document_pb.rb +99 -0
- data/lib/google/cloud/dialogflow/v2/document_services_pb.rb +73 -0
- data/lib/google/cloud/dialogflow/v2/documents.rb +50 -0
- data/lib/google/cloud/dialogflow/v2/documents/client.rb +810 -0
- data/lib/google/cloud/dialogflow/v2/documents/credentials.rb +52 -0
- data/lib/google/cloud/dialogflow/v2/documents/operations.rb +655 -0
- data/lib/google/cloud/dialogflow/v2/documents/paths.rb +119 -0
- data/lib/google/cloud/dialogflow/v2/entity_type_services_pb.rb +12 -39
- data/lib/google/cloud/dialogflow/v2/entity_types.rb +1 -28
- data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +28 -91
- data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +96 -11
- data/lib/google/cloud/dialogflow/v2/entity_types/paths.rb +58 -12
- data/lib/google/cloud/dialogflow/v2/environment_pb.rb +50 -1
- data/lib/google/cloud/dialogflow/v2/environment_services_pb.rb +24 -3
- data/lib/google/cloud/dialogflow/v2/environments.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/environments/client.rb +430 -14
- data/lib/google/cloud/dialogflow/v2/environments/paths.rb +104 -5
- data/lib/google/cloud/dialogflow/v2/fulfillment_pb.rb +59 -0
- data/lib/google/cloud/dialogflow/v2/fulfillment_services_pb.rb +47 -0
- data/lib/google/cloud/dialogflow/v2/fulfillments.rb +49 -0
- data/lib/google/cloud/dialogflow/v2/fulfillments/client.rb +460 -0
- data/lib/google/cloud/dialogflow/v2/fulfillments/credentials.rb +52 -0
- data/lib/google/cloud/dialogflow/v2/fulfillments/paths.rb +69 -0
- data/lib/google/cloud/dialogflow/v2/gcs_pb.rb +20 -0
- data/lib/google/cloud/dialogflow/v2/human_agent_assistant_event_pb.rb +26 -0
- data/lib/google/cloud/dialogflow/v2/intent_pb.rb +2 -0
- data/lib/google/cloud/dialogflow/v2/intent_services_pb.rb +9 -40
- data/lib/google/cloud/dialogflow/v2/intents.rb +1 -32
- data/lib/google/cloud/dialogflow/v2/intents/client.rb +34 -81
- data/lib/google/cloud/dialogflow/v2/intents/operations.rb +96 -11
- data/lib/google/cloud/dialogflow/v2/intents/paths.rb +97 -13
- data/lib/google/cloud/dialogflow/v2/knowledge_base_pb.rb +60 -0
- data/lib/google/cloud/dialogflow/v2/knowledge_base_services_pb.rb +53 -0
- data/lib/google/cloud/dialogflow/v2/knowledge_bases.rb +49 -0
- data/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +696 -0
- data/lib/google/cloud/dialogflow/v2/knowledge_bases/credentials.rb +52 -0
- data/lib/google/cloud/dialogflow/v2/knowledge_bases/paths.rb +105 -0
- data/lib/google/cloud/dialogflow/v2/participant_pb.rb +172 -0
- data/lib/google/cloud/dialogflow/v2/participant_services_pb.rb +64 -0
- data/lib/google/cloud/dialogflow/v2/participants.rb +49 -0
- data/lib/google/cloud/dialogflow/v2/participants/client.rb +894 -0
- data/lib/google/cloud/dialogflow/v2/participants/credentials.rb +52 -0
- data/lib/google/cloud/dialogflow/v2/participants/paths.rb +334 -0
- data/lib/google/cloud/dialogflow/v2/session_entity_type_services_pb.rb +7 -23
- data/lib/google/cloud/dialogflow/v2/session_entity_types.rb +1 -17
- data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +23 -53
- data/lib/google/cloud/dialogflow/v2/session_entity_types/paths.rb +74 -2
- data/lib/google/cloud/dialogflow/v2/session_pb.rb +1 -0
- data/lib/google/cloud/dialogflow/v2/session_services_pb.rb +15 -7
- data/lib/google/cloud/dialogflow/v2/sessions.rb +4 -4
- data/lib/google/cloud/dialogflow/v2/sessions/client.rb +51 -15
- data/lib/google/cloud/dialogflow/v2/sessions/paths.rb +113 -3
- data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/version_pb.rb +69 -0
- data/lib/google/cloud/dialogflow/v2/version_services_pb.rb +59 -0
- data/lib/google/cloud/dialogflow/v2/versions.rb +49 -0
- data/lib/google/cloud/dialogflow/v2/versions/client.rb +709 -0
- data/lib/google/cloud/dialogflow/v2/versions/credentials.rb +52 -0
- data/lib/google/cloud/dialogflow/v2/versions/paths.rb +110 -0
- data/proto_docs/google/api/field_behavior.rb +6 -0
- data/proto_docs/google/api/resource.rb +50 -14
- data/proto_docs/google/cloud/dialogflow/v2/agent.rb +9 -1
- data/proto_docs/google/cloud/dialogflow/v2/answer_record.rb +252 -0
- data/proto_docs/google/cloud/dialogflow/v2/audio_config.rb +25 -0
- data/proto_docs/google/cloud/dialogflow/v2/context.rb +17 -2
- data/proto_docs/google/cloud/dialogflow/v2/conversation.rb +253 -0
- data/proto_docs/google/cloud/dialogflow/v2/conversation_event.rb +83 -0
- data/proto_docs/google/cloud/dialogflow/v2/conversation_profile.rb +522 -0
- data/proto_docs/google/cloud/dialogflow/v2/document.rb +267 -0
- data/proto_docs/google/cloud/dialogflow/v2/entity_type.rb +12 -3
- data/proto_docs/google/cloud/dialogflow/v2/environment.rb +187 -5
- data/proto_docs/google/cloud/dialogflow/v2/fulfillment.rb +144 -0
- data/proto_docs/google/cloud/dialogflow/v2/human_agent_assistant_event.rb +45 -0
- data/proto_docs/google/cloud/dialogflow/v2/intent.rb +29 -4
- data/proto_docs/google/cloud/dialogflow/v2/knowledge_base.rb +139 -0
- data/proto_docs/google/cloud/dialogflow/v2/participant.rb +503 -0
- data/proto_docs/google/cloud/dialogflow/v2/session.rb +52 -7
- data/proto_docs/google/cloud/dialogflow/v2/session_entity_type.rb +7 -6
- data/proto_docs/google/cloud/dialogflow/v2/validation_result.rb +1 -1
- data/proto_docs/google/cloud/dialogflow/v2/version.rb +176 -0
- data/proto_docs/google/cloud/dialogflow/v2/webhook.rb +2 -2
- data/proto_docs/google/longrunning/operations.rb +17 -3
- data/proto_docs/google/protobuf/any.rb +5 -2
- data/proto_docs/google/protobuf/timestamp.rb +10 -1
- data/proto_docs/google/type/latlng.rb +2 -2
- metadata +73 -9
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "googleauth"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module Dialogflow
|
24
|
+
module V2
|
25
|
+
module Versions
|
26
|
+
# Credentials for the Versions API.
|
27
|
+
class Credentials < ::Google::Auth::Credentials
|
28
|
+
self.scope = [
|
29
|
+
"https://www.googleapis.com/auth/cloud-platform",
|
30
|
+
"https://www.googleapis.com/auth/dialogflow"
|
31
|
+
]
|
32
|
+
self.env_vars = [
|
33
|
+
"DIALOGFLOW_CREDENTIALS",
|
34
|
+
"DIALOGFLOW_KEYFILE",
|
35
|
+
"GOOGLE_CLOUD_CREDENTIALS",
|
36
|
+
"GOOGLE_CLOUD_KEYFILE",
|
37
|
+
"GCLOUD_KEYFILE",
|
38
|
+
"DIALOGFLOW_CREDENTIALS_JSON",
|
39
|
+
"DIALOGFLOW_KEYFILE_JSON",
|
40
|
+
"GOOGLE_CLOUD_CREDENTIALS_JSON",
|
41
|
+
"GOOGLE_CLOUD_KEYFILE_JSON",
|
42
|
+
"GCLOUD_KEYFILE_JSON"
|
43
|
+
]
|
44
|
+
self.paths = [
|
45
|
+
"~/.config/google_cloud/application_default_credentials.json"
|
46
|
+
]
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,110 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Dialogflow
|
23
|
+
module V2
|
24
|
+
module Versions
|
25
|
+
# Path helper methods for the Versions API.
|
26
|
+
module Paths
|
27
|
+
##
|
28
|
+
# Create a fully-qualified Agent resource string.
|
29
|
+
#
|
30
|
+
# @overload agent_path(project:)
|
31
|
+
# The resource will be in the following format:
|
32
|
+
#
|
33
|
+
# `projects/{project}/agent`
|
34
|
+
#
|
35
|
+
# @param project [String]
|
36
|
+
#
|
37
|
+
# @overload agent_path(project:, location:)
|
38
|
+
# The resource will be in the following format:
|
39
|
+
#
|
40
|
+
# `projects/{project}/locations/{location}/agent`
|
41
|
+
#
|
42
|
+
# @param project [String]
|
43
|
+
# @param location [String]
|
44
|
+
#
|
45
|
+
# @return [::String]
|
46
|
+
def agent_path **args
|
47
|
+
resources = {
|
48
|
+
"project" => (proc do |project:|
|
49
|
+
"projects/#{project}/agent"
|
50
|
+
end),
|
51
|
+
"location:project" => (proc do |project:, location:|
|
52
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
53
|
+
|
54
|
+
"projects/#{project}/locations/#{location}/agent"
|
55
|
+
end)
|
56
|
+
}
|
57
|
+
|
58
|
+
resource = resources[args.keys.sort.join(":")]
|
59
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
60
|
+
resource.call(**args)
|
61
|
+
end
|
62
|
+
|
63
|
+
##
|
64
|
+
# Create a fully-qualified Version resource string.
|
65
|
+
#
|
66
|
+
# @overload version_path(project:, version:)
|
67
|
+
# The resource will be in the following format:
|
68
|
+
#
|
69
|
+
# `projects/{project}/agent/versions/{version}`
|
70
|
+
#
|
71
|
+
# @param project [String]
|
72
|
+
# @param version [String]
|
73
|
+
#
|
74
|
+
# @overload version_path(project:, location:, version:)
|
75
|
+
# The resource will be in the following format:
|
76
|
+
#
|
77
|
+
# `projects/{project}/locations/{location}/agent/versions/{version}`
|
78
|
+
#
|
79
|
+
# @param project [String]
|
80
|
+
# @param location [String]
|
81
|
+
# @param version [String]
|
82
|
+
#
|
83
|
+
# @return [::String]
|
84
|
+
def version_path **args
|
85
|
+
resources = {
|
86
|
+
"project:version" => (proc do |project:, version:|
|
87
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
88
|
+
|
89
|
+
"projects/#{project}/agent/versions/#{version}"
|
90
|
+
end),
|
91
|
+
"location:project:version" => (proc do |project:, location:, version:|
|
92
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
93
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
94
|
+
|
95
|
+
"projects/#{project}/locations/#{location}/agent/versions/#{version}"
|
96
|
+
end)
|
97
|
+
}
|
98
|
+
|
99
|
+
resource = resources[args.keys.sort.join(":")]
|
100
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
101
|
+
resource.call(**args)
|
102
|
+
end
|
103
|
+
|
104
|
+
extend self
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
@@ -54,6 +54,12 @@ module Google
|
|
54
54
|
# This indicates that the field may be set once in a request to create a
|
55
55
|
# resource, but may not be changed thereafter.
|
56
56
|
IMMUTABLE = 5
|
57
|
+
|
58
|
+
# Denotes that a (repeated) field is an unordered list.
|
59
|
+
# This indicates that the service may provide the elements of the list
|
60
|
+
# in any arbitrary order, rather than the order the user originally
|
61
|
+
# provided. Additionally, the list's order may or may not be stable.
|
62
|
+
UNORDERED_LIST = 6
|
57
63
|
end
|
58
64
|
end
|
59
65
|
end
|
@@ -43,12 +43,12 @@ module Google
|
|
43
43
|
#
|
44
44
|
# The ResourceDescriptor Yaml config will look like:
|
45
45
|
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
46
|
+
# resources:
|
47
|
+
# - type: "pubsub.googleapis.com/Topic"
|
48
|
+
# name_descriptor:
|
49
|
+
# - pattern: "projects/{project}/topics/{topic}"
|
50
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
51
|
+
# parent_name_extractor: "projects/{project}"
|
52
52
|
#
|
53
53
|
# Sometimes, resources have multiple patterns, typically because they can
|
54
54
|
# live under multiple parents.
|
@@ -183,15 +183,24 @@ module Google
|
|
183
183
|
# }
|
184
184
|
# @!attribute [rw] plural
|
185
185
|
# @return [::String]
|
186
|
-
# The plural name used in the resource name, such as
|
187
|
-
# the name of 'projects/\\{project}'
|
188
|
-
#
|
186
|
+
# The plural name used in the resource name and permission names, such as
|
187
|
+
# 'projects' for the resource name of 'projects/\\{project}' and the permission
|
188
|
+
# name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
|
189
|
+
# concept of the `plural` field in k8s CRD spec
|
189
190
|
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
191
|
+
#
|
192
|
+
# Note: The plural form is required even for singleton resources. See
|
193
|
+
# https://aip.dev/156
|
190
194
|
# @!attribute [rw] singular
|
191
195
|
# @return [::String]
|
192
196
|
# The same concept of the `singular` field in k8s CRD spec
|
193
197
|
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
194
198
|
# Such as "project" for the `resourcemanager.googleapis.com/Project` type.
|
199
|
+
# @!attribute [rw] style
|
200
|
+
# @return [::Array<::Google::Api::ResourceDescriptor::Style>]
|
201
|
+
# Style flag(s) for this resource.
|
202
|
+
# These indicate that a resource is expected to conform to a given
|
203
|
+
# style. See the specific style flags for additional information.
|
195
204
|
class ResourceDescriptor
|
196
205
|
include ::Google::Protobuf::MessageExts
|
197
206
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -211,6 +220,22 @@ module Google
|
|
211
220
|
# that from being necessary once there are multiple patterns.)
|
212
221
|
FUTURE_MULTI_PATTERN = 2
|
213
222
|
end
|
223
|
+
|
224
|
+
# A flag representing a specific style that a resource claims to conform to.
|
225
|
+
module Style
|
226
|
+
# The unspecified value. Do not use.
|
227
|
+
STYLE_UNSPECIFIED = 0
|
228
|
+
|
229
|
+
# This resource is intended to be "declarative-friendly".
|
230
|
+
#
|
231
|
+
# Declarative-friendly resources must be more strictly consistent, and
|
232
|
+
# setting this to true communicates to tools that this resource should
|
233
|
+
# adhere to declarative-friendly expectations.
|
234
|
+
#
|
235
|
+
# Note: This is used by the API linter (linter.aip.dev) to enable
|
236
|
+
# additional checks.
|
237
|
+
DECLARATIVE_FRIENDLY = 1
|
238
|
+
end
|
214
239
|
end
|
215
240
|
|
216
241
|
# Defines a proto annotation that describes a string field that refers to
|
@@ -226,6 +251,17 @@ module Google
|
|
226
251
|
# type: "pubsub.googleapis.com/Topic"
|
227
252
|
# }];
|
228
253
|
# }
|
254
|
+
#
|
255
|
+
# Occasionally, a field may reference an arbitrary resource. In this case,
|
256
|
+
# APIs use the special value * in their resource reference.
|
257
|
+
#
|
258
|
+
# Example:
|
259
|
+
#
|
260
|
+
# message GetIamPolicyRequest {
|
261
|
+
# string resource = 2 [(google.api.resource_reference) = {
|
262
|
+
# type: "*"
|
263
|
+
# }];
|
264
|
+
# }
|
229
265
|
# @!attribute [rw] child_type
|
230
266
|
# @return [::String]
|
231
267
|
# The resource type of a child collection that the annotated field
|
@@ -234,11 +270,11 @@ module Google
|
|
234
270
|
#
|
235
271
|
# Example:
|
236
272
|
#
|
237
|
-
#
|
238
|
-
#
|
239
|
-
#
|
240
|
-
#
|
241
|
-
#
|
273
|
+
# message ListLogEntriesRequest {
|
274
|
+
# string parent = 1 [(google.api.resource_reference) = {
|
275
|
+
# child_type: "logging.googleapis.com/LogEntry"
|
276
|
+
# };
|
277
|
+
# }
|
242
278
|
class ResourceReference
|
243
279
|
include ::Google::Protobuf::MessageExts
|
244
280
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -21,7 +21,15 @@ 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
|
+
# [Agent guide](https://cloud.google.com/dialogflow/docs/agents-overview).
|
25
33
|
# @!attribute [rw] parent
|
26
34
|
# @return [::String]
|
27
35
|
# Required. The project of this agent.
|
@@ -0,0 +1,252 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Dialogflow
|
23
|
+
module V2
|
24
|
+
# Answer records are records to manage answer history and feedbacks for
|
25
|
+
# Dialogflow.
|
26
|
+
#
|
27
|
+
# Currently, answer record includes:
|
28
|
+
#
|
29
|
+
# - human agent assistant article suggestion
|
30
|
+
# - human agent assistant faq article
|
31
|
+
#
|
32
|
+
# It doesn't include:
|
33
|
+
#
|
34
|
+
# - `DetectIntent` intent matching
|
35
|
+
# - `DetectIntent` knowledge
|
36
|
+
#
|
37
|
+
# Answer records are not related to the conversation history in the
|
38
|
+
# Dialogflow Console. A Record is generated even when the end-user disables
|
39
|
+
# conversation history in the console. Records are created when there's a human
|
40
|
+
# agent assistant suggestion generated.
|
41
|
+
#
|
42
|
+
# A typical workflow for customers provide feedback to an answer is:
|
43
|
+
#
|
44
|
+
# 1. For human agent assistant, customers get suggestion via ListSuggestions
|
45
|
+
# API. Together with the answers, {::Google::Cloud::Dialogflow::V2::AnswerRecord#name AnswerRecord.name} are returned to the
|
46
|
+
# customers.
|
47
|
+
# 2. The customer uses the {::Google::Cloud::Dialogflow::V2::AnswerRecord#name AnswerRecord.name} to call the
|
48
|
+
# [UpdateAnswerRecord][] method to send feedback about a specific answer
|
49
|
+
# that they believe is wrong.
|
50
|
+
# @!attribute [rw] name
|
51
|
+
# @return [::String]
|
52
|
+
# The unique identifier of this answer record.
|
53
|
+
# Format: `projects/<Project ID>/locations/<Location
|
54
|
+
# ID>/answerRecords/<Answer Record ID>`.
|
55
|
+
# @!attribute [rw] answer_feedback
|
56
|
+
# @return [::Google::Cloud::Dialogflow::V2::AnswerFeedback]
|
57
|
+
# Required. The AnswerFeedback for this record. You can set this with
|
58
|
+
# {::Google::Cloud::Dialogflow::V2::AnswerRecords::Client#update_answer_record AnswerRecords.UpdateAnswerRecord} in order to give us feedback about
|
59
|
+
# this answer.
|
60
|
+
# @!attribute [r] agent_assistant_record
|
61
|
+
# @return [::Google::Cloud::Dialogflow::V2::AgentAssistantRecord]
|
62
|
+
# Output only. The record for human agent assistant.
|
63
|
+
class AnswerRecord
|
64
|
+
include ::Google::Protobuf::MessageExts
|
65
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
66
|
+
end
|
67
|
+
|
68
|
+
# Request message for {::Google::Cloud::Dialogflow::V2::AnswerRecords::Client#list_answer_records AnswerRecords.ListAnswerRecords}.
|
69
|
+
# @!attribute [rw] parent
|
70
|
+
# @return [::String]
|
71
|
+
# Required. The project to list all answer records for in reverse
|
72
|
+
# chronological order. Format: `projects/<Project ID>/locations/<Location
|
73
|
+
# ID>`.
|
74
|
+
# @!attribute [rw] filter
|
75
|
+
# @return [::String]
|
76
|
+
# Required. Filters to restrict results to specific answer records.
|
77
|
+
# Filter on answer record type. Currently predicates on `type` is supported,
|
78
|
+
# valid values are `ARTICLE_ANSWER`, `FAQ_ANSWER`.
|
79
|
+
#
|
80
|
+
# For more information about filtering, see
|
81
|
+
# [API Filtering](https://aip.dev/160).
|
82
|
+
# @!attribute [rw] page_size
|
83
|
+
# @return [::Integer]
|
84
|
+
# Optional. The maximum number of records to return in a single page.
|
85
|
+
# The server may return fewer records than this. If unspecified, we use 10.
|
86
|
+
# The maximum is 100.
|
87
|
+
# @!attribute [rw] page_token
|
88
|
+
# @return [::String]
|
89
|
+
# Optional. The
|
90
|
+
# {::Google::Cloud::Dialogflow::V2::ListAnswerRecordsResponse#next_page_token ListAnswerRecordsResponse.next_page_token}
|
91
|
+
# value returned from a previous list request used to continue listing on
|
92
|
+
# the next page.
|
93
|
+
class ListAnswerRecordsRequest
|
94
|
+
include ::Google::Protobuf::MessageExts
|
95
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
96
|
+
end
|
97
|
+
|
98
|
+
# Response message for {::Google::Cloud::Dialogflow::V2::AnswerRecords::Client#list_answer_records AnswerRecords.ListAnswerRecords}.
|
99
|
+
# @!attribute [rw] answer_records
|
100
|
+
# @return [::Array<::Google::Cloud::Dialogflow::V2::AnswerRecord>]
|
101
|
+
# The list of answer records.
|
102
|
+
# @!attribute [rw] next_page_token
|
103
|
+
# @return [::String]
|
104
|
+
# A token to retrieve next page of results. Or empty if there are no more
|
105
|
+
# results.
|
106
|
+
# Pass this value in the
|
107
|
+
# {::Google::Cloud::Dialogflow::V2::ListAnswerRecordsRequest#page_token ListAnswerRecordsRequest.page_token}
|
108
|
+
# field in the subsequent call to `ListAnswerRecords` method to retrieve the
|
109
|
+
# next page of results.
|
110
|
+
class ListAnswerRecordsResponse
|
111
|
+
include ::Google::Protobuf::MessageExts
|
112
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
113
|
+
end
|
114
|
+
|
115
|
+
# Request message for {::Google::Cloud::Dialogflow::V2::AnswerRecords::Client#update_answer_record AnswerRecords.UpdateAnswerRecord}.
|
116
|
+
# @!attribute [rw] answer_record
|
117
|
+
# @return [::Google::Cloud::Dialogflow::V2::AnswerRecord]
|
118
|
+
# Required. Answer record to update.
|
119
|
+
# @!attribute [rw] update_mask
|
120
|
+
# @return [::Google::Protobuf::FieldMask]
|
121
|
+
# Required. The mask to control which fields get updated.
|
122
|
+
class UpdateAnswerRecordRequest
|
123
|
+
include ::Google::Protobuf::MessageExts
|
124
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
125
|
+
end
|
126
|
+
|
127
|
+
# Represents feedback the customer has about the quality & correctness of a
|
128
|
+
# certain answer in a conversation.
|
129
|
+
# @!attribute [rw] correctness_level
|
130
|
+
# @return [::Google::Cloud::Dialogflow::V2::AnswerFeedback::CorrectnessLevel]
|
131
|
+
# The correctness level of the specific answer.
|
132
|
+
# @!attribute [rw] agent_assistant_detail_feedback
|
133
|
+
# @return [::Google::Cloud::Dialogflow::V2::AgentAssistantFeedback]
|
134
|
+
# Detail feedback of agent assist suggestions.
|
135
|
+
# @!attribute [rw] clicked
|
136
|
+
# @return [::Boolean]
|
137
|
+
# Indicates whether the answer/item was clicked by the human agent
|
138
|
+
# or not. Default to false.
|
139
|
+
# @!attribute [rw] click_time
|
140
|
+
# @return [::Google::Protobuf::Timestamp]
|
141
|
+
# Time when the answer/item was clicked.
|
142
|
+
# @!attribute [rw] displayed
|
143
|
+
# @return [::Boolean]
|
144
|
+
# Indicates whether the answer/item was displayed to the human
|
145
|
+
# agent in the agent desktop UI. Default to false.
|
146
|
+
# @!attribute [rw] display_time
|
147
|
+
# @return [::Google::Protobuf::Timestamp]
|
148
|
+
# Time when the answer/item was displayed.
|
149
|
+
class AnswerFeedback
|
150
|
+
include ::Google::Protobuf::MessageExts
|
151
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
152
|
+
|
153
|
+
# The correctness level of an answer.
|
154
|
+
module CorrectnessLevel
|
155
|
+
# Correctness level unspecified.
|
156
|
+
CORRECTNESS_LEVEL_UNSPECIFIED = 0
|
157
|
+
|
158
|
+
# Answer is totally wrong.
|
159
|
+
NOT_CORRECT = 1
|
160
|
+
|
161
|
+
# Answer is partially correct.
|
162
|
+
PARTIALLY_CORRECT = 2
|
163
|
+
|
164
|
+
# Answer is fully correct.
|
165
|
+
FULLY_CORRECT = 3
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
# Detail feedback of Agent Assist result.
|
170
|
+
# @!attribute [rw] answer_relevance
|
171
|
+
# @return [::Google::Cloud::Dialogflow::V2::AgentAssistantFeedback::AnswerRelevance]
|
172
|
+
# Optional. Whether or not the suggested answer is relevant.
|
173
|
+
#
|
174
|
+
# For example:
|
175
|
+
#
|
176
|
+
# * Query: "Can I change my mailing address?"
|
177
|
+
# * Suggested document says: "Items must be returned/exchanged within 60
|
178
|
+
# days of the purchase date."
|
179
|
+
# * {::Google::Cloud::Dialogflow::V2::AgentAssistantFeedback#answer_relevance answer_relevance}: {::Google::Cloud::Dialogflow::V2::AgentAssistantFeedback::AnswerRelevance::IRRELEVANT AnswerRelevance.IRRELEVANT}
|
180
|
+
# @!attribute [rw] document_correctness
|
181
|
+
# @return [::Google::Cloud::Dialogflow::V2::AgentAssistantFeedback::DocumentCorrectness]
|
182
|
+
# Optional. Whether or not the information in the document is correct.
|
183
|
+
#
|
184
|
+
# For example:
|
185
|
+
#
|
186
|
+
# * Query: "Can I return the package in 2 days once received?"
|
187
|
+
# * Suggested document says: "Items must be returned/exchanged within 60
|
188
|
+
# days of the purchase date."
|
189
|
+
# * Ground truth: "No return or exchange is allowed."
|
190
|
+
# * [document_correctness]: INCORRECT
|
191
|
+
# @!attribute [rw] document_efficiency
|
192
|
+
# @return [::Google::Cloud::Dialogflow::V2::AgentAssistantFeedback::DocumentEfficiency]
|
193
|
+
# Optional. Whether or not the suggested document is efficient. For example,
|
194
|
+
# if the document is poorly written, hard to understand, hard to use or
|
195
|
+
# too long to find useful information, {::Google::Cloud::Dialogflow::V2::AgentAssistantFeedback#document_efficiency document_efficiency} is
|
196
|
+
# {::Google::Cloud::Dialogflow::V2::AgentAssistantFeedback::DocumentEfficiency::INEFFICIENT DocumentEfficiency.INEFFICIENT}.
|
197
|
+
class AgentAssistantFeedback
|
198
|
+
include ::Google::Protobuf::MessageExts
|
199
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
200
|
+
|
201
|
+
# Relevance of an answer.
|
202
|
+
module AnswerRelevance
|
203
|
+
# Answer relevance unspecified.
|
204
|
+
ANSWER_RELEVANCE_UNSPECIFIED = 0
|
205
|
+
|
206
|
+
# Answer is irrelevant to query.
|
207
|
+
IRRELEVANT = 1
|
208
|
+
|
209
|
+
# Answer is relevant to query.
|
210
|
+
RELEVANT = 2
|
211
|
+
end
|
212
|
+
|
213
|
+
# Correctness of document.
|
214
|
+
module DocumentCorrectness
|
215
|
+
# Document correctness unspecified.
|
216
|
+
DOCUMENT_CORRECTNESS_UNSPECIFIED = 0
|
217
|
+
|
218
|
+
# Information in document is incorrect.
|
219
|
+
INCORRECT = 1
|
220
|
+
|
221
|
+
# Information in document is correct.
|
222
|
+
CORRECT = 2
|
223
|
+
end
|
224
|
+
|
225
|
+
# Efficiency of document.
|
226
|
+
module DocumentEfficiency
|
227
|
+
# Document efficiency unspecified.
|
228
|
+
DOCUMENT_EFFICIENCY_UNSPECIFIED = 0
|
229
|
+
|
230
|
+
# Document is inefficient.
|
231
|
+
INEFFICIENT = 1
|
232
|
+
|
233
|
+
# Document is efficient.
|
234
|
+
EFFICIENT = 2
|
235
|
+
end
|
236
|
+
end
|
237
|
+
|
238
|
+
# Represents a record of a human agent assist answer.
|
239
|
+
# @!attribute [r] article_suggestion_answer
|
240
|
+
# @return [::Google::Cloud::Dialogflow::V2::ArticleAnswer]
|
241
|
+
# Output only. The article suggestion answer.
|
242
|
+
# @!attribute [r] faq_answer
|
243
|
+
# @return [::Google::Cloud::Dialogflow::V2::FaqAnswer]
|
244
|
+
# Output only. The FAQ answer.
|
245
|
+
class AgentAssistantRecord
|
246
|
+
include ::Google::Protobuf::MessageExts
|
247
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
248
|
+
end
|
249
|
+
end
|
250
|
+
end
|
251
|
+
end
|
252
|
+
end
|