google-cloud-dialogflow-v2 0.6.3 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.md +188 -190
  3. data/README.md +66 -2
  4. data/lib/google/cloud/dialogflow/v2.rb +13 -2
  5. data/lib/google/cloud/dialogflow/v2/agent_services_pb.rb +24 -12
  6. data/lib/google/cloud/dialogflow/v2/agents/client.rb +40 -72
  7. data/lib/google/cloud/dialogflow/v2/agents/operations.rb +96 -11
  8. data/lib/google/cloud/dialogflow/v2/agents/paths.rb +42 -3
  9. data/lib/google/cloud/dialogflow/v2/answer_record_pb.rb +100 -0
  10. data/lib/google/cloud/dialogflow/v2/answer_record_services_pb.rb +48 -0
  11. data/lib/google/cloud/dialogflow/v2/answer_records.rb +49 -0
  12. data/lib/google/cloud/dialogflow/v2/answer_records/client.rb +478 -0
  13. data/lib/google/cloud/dialogflow/v2/answer_records/credentials.rb +52 -0
  14. data/lib/google/cloud/dialogflow/v2/answer_records/paths.rb +105 -0
  15. data/lib/google/cloud/dialogflow/v2/audio_config_pb.rb +7 -0
  16. data/lib/google/cloud/dialogflow/v2/context_services_pb.rb +8 -25
  17. data/lib/google/cloud/dialogflow/v2/contexts.rb +1 -18
  18. data/lib/google/cloud/dialogflow/v2/contexts/client.rb +24 -63
  19. data/lib/google/cloud/dialogflow/v2/contexts/paths.rb +74 -2
  20. data/lib/google/cloud/dialogflow/v2/conversation_event_pb.rb +39 -0
  21. data/lib/google/cloud/dialogflow/v2/conversation_pb.rb +89 -0
  22. data/lib/google/cloud/dialogflow/v2/conversation_profile_pb.rb +182 -0
  23. data/lib/google/cloud/dialogflow/v2/conversation_profile_services_pb.rb +61 -0
  24. data/lib/google/cloud/dialogflow/v2/conversation_profiles.rb +49 -0
  25. data/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb +699 -0
  26. data/lib/google/cloud/dialogflow/v2/conversation_profiles/credentials.rb +52 -0
  27. data/lib/google/cloud/dialogflow/v2/conversation_profiles/paths.rb +246 -0
  28. data/lib/google/cloud/dialogflow/v2/conversation_services_pb.rb +75 -0
  29. data/lib/google/cloud/dialogflow/v2/conversations.rb +49 -0
  30. data/lib/google/cloud/dialogflow/v2/conversations/client.rb +757 -0
  31. data/lib/google/cloud/dialogflow/v2/conversations/credentials.rb +52 -0
  32. data/lib/google/cloud/dialogflow/v2/conversations/paths.rb +146 -0
  33. data/lib/google/cloud/dialogflow/v2/document_pb.rb +99 -0
  34. data/lib/google/cloud/dialogflow/v2/document_services_pb.rb +73 -0
  35. data/lib/google/cloud/dialogflow/v2/documents.rb +50 -0
  36. data/lib/google/cloud/dialogflow/v2/documents/client.rb +810 -0
  37. data/lib/google/cloud/dialogflow/v2/documents/credentials.rb +52 -0
  38. data/lib/google/cloud/dialogflow/v2/documents/operations.rb +655 -0
  39. data/lib/google/cloud/dialogflow/v2/documents/paths.rb +119 -0
  40. data/lib/google/cloud/dialogflow/v2/entity_type_services_pb.rb +12 -39
  41. data/lib/google/cloud/dialogflow/v2/entity_types.rb +1 -28
  42. data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +28 -91
  43. data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +96 -11
  44. data/lib/google/cloud/dialogflow/v2/entity_types/paths.rb +58 -12
  45. data/lib/google/cloud/dialogflow/v2/environment_pb.rb +50 -1
  46. data/lib/google/cloud/dialogflow/v2/environment_services_pb.rb +24 -3
  47. data/lib/google/cloud/dialogflow/v2/environments.rb +1 -1
  48. data/lib/google/cloud/dialogflow/v2/environments/client.rb +430 -14
  49. data/lib/google/cloud/dialogflow/v2/environments/paths.rb +104 -5
  50. data/lib/google/cloud/dialogflow/v2/fulfillment_pb.rb +59 -0
  51. data/lib/google/cloud/dialogflow/v2/fulfillment_services_pb.rb +47 -0
  52. data/lib/google/cloud/dialogflow/v2/fulfillments.rb +49 -0
  53. data/lib/google/cloud/dialogflow/v2/fulfillments/client.rb +460 -0
  54. data/lib/google/cloud/dialogflow/v2/fulfillments/credentials.rb +52 -0
  55. data/lib/google/cloud/dialogflow/v2/fulfillments/paths.rb +69 -0
  56. data/lib/google/cloud/dialogflow/v2/gcs_pb.rb +20 -0
  57. data/lib/google/cloud/dialogflow/v2/human_agent_assistant_event_pb.rb +26 -0
  58. data/lib/google/cloud/dialogflow/v2/intent_pb.rb +2 -0
  59. data/lib/google/cloud/dialogflow/v2/intent_services_pb.rb +9 -40
  60. data/lib/google/cloud/dialogflow/v2/intents.rb +1 -32
  61. data/lib/google/cloud/dialogflow/v2/intents/client.rb +34 -81
  62. data/lib/google/cloud/dialogflow/v2/intents/operations.rb +96 -11
  63. data/lib/google/cloud/dialogflow/v2/intents/paths.rb +97 -13
  64. data/lib/google/cloud/dialogflow/v2/knowledge_base_pb.rb +60 -0
  65. data/lib/google/cloud/dialogflow/v2/knowledge_base_services_pb.rb +53 -0
  66. data/lib/google/cloud/dialogflow/v2/knowledge_bases.rb +49 -0
  67. data/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +696 -0
  68. data/lib/google/cloud/dialogflow/v2/knowledge_bases/credentials.rb +52 -0
  69. data/lib/google/cloud/dialogflow/v2/knowledge_bases/paths.rb +105 -0
  70. data/lib/google/cloud/dialogflow/v2/participant_pb.rb +181 -0
  71. data/lib/google/cloud/dialogflow/v2/participant_services_pb.rb +64 -0
  72. data/lib/google/cloud/dialogflow/v2/participants.rb +49 -0
  73. data/lib/google/cloud/dialogflow/v2/participants/client.rb +894 -0
  74. data/lib/google/cloud/dialogflow/v2/participants/credentials.rb +52 -0
  75. data/lib/google/cloud/dialogflow/v2/participants/paths.rb +334 -0
  76. data/lib/google/cloud/dialogflow/v2/session_entity_type_services_pb.rb +7 -23
  77. data/lib/google/cloud/dialogflow/v2/session_entity_types.rb +1 -17
  78. data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +23 -53
  79. data/lib/google/cloud/dialogflow/v2/session_entity_types/paths.rb +74 -2
  80. data/lib/google/cloud/dialogflow/v2/session_pb.rb +2 -0
  81. data/lib/google/cloud/dialogflow/v2/session_services_pb.rb +15 -7
  82. data/lib/google/cloud/dialogflow/v2/sessions.rb +4 -4
  83. data/lib/google/cloud/dialogflow/v2/sessions/client.rb +51 -15
  84. data/lib/google/cloud/dialogflow/v2/sessions/paths.rb +113 -3
  85. data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
  86. data/lib/google/cloud/dialogflow/v2/version_pb.rb +69 -0
  87. data/lib/google/cloud/dialogflow/v2/version_services_pb.rb +59 -0
  88. data/lib/google/cloud/dialogflow/v2/versions.rb +49 -0
  89. data/lib/google/cloud/dialogflow/v2/versions/client.rb +709 -0
  90. data/lib/google/cloud/dialogflow/v2/versions/credentials.rb +52 -0
  91. data/lib/google/cloud/dialogflow/v2/versions/paths.rb +110 -0
  92. data/proto_docs/google/api/field_behavior.rb +6 -0
  93. data/proto_docs/google/api/resource.rb +50 -14
  94. data/proto_docs/google/cloud/dialogflow/v2/agent.rb +1 -2
  95. data/proto_docs/google/cloud/dialogflow/v2/answer_record.rb +252 -0
  96. data/proto_docs/google/cloud/dialogflow/v2/audio_config.rb +25 -0
  97. data/proto_docs/google/cloud/dialogflow/v2/context.rb +17 -2
  98. data/proto_docs/google/cloud/dialogflow/v2/conversation.rb +253 -0
  99. data/proto_docs/google/cloud/dialogflow/v2/conversation_event.rb +83 -0
  100. data/proto_docs/google/cloud/dialogflow/v2/conversation_profile.rb +522 -0
  101. data/proto_docs/google/cloud/dialogflow/v2/document.rb +267 -0
  102. data/proto_docs/google/cloud/dialogflow/v2/entity_type.rb +12 -3
  103. data/proto_docs/google/cloud/dialogflow/v2/environment.rb +187 -5
  104. data/proto_docs/google/cloud/dialogflow/v2/fulfillment.rb +144 -0
  105. data/proto_docs/google/cloud/dialogflow/v2/human_agent_assistant_event.rb +45 -0
  106. data/proto_docs/google/cloud/dialogflow/v2/intent.rb +29 -4
  107. data/proto_docs/google/cloud/dialogflow/v2/knowledge_base.rb +139 -0
  108. data/proto_docs/google/cloud/dialogflow/v2/participant.rb +525 -0
  109. data/proto_docs/google/cloud/dialogflow/v2/session.rb +56 -7
  110. data/proto_docs/google/cloud/dialogflow/v2/session_entity_type.rb +7 -6
  111. data/proto_docs/google/cloud/dialogflow/v2/validation_result.rb +1 -1
  112. data/proto_docs/google/cloud/dialogflow/v2/version.rb +176 -0
  113. data/proto_docs/google/cloud/dialogflow/v2/webhook.rb +2 -2
  114. data/proto_docs/google/longrunning/operations.rb +17 -3
  115. data/proto_docs/google/protobuf/any.rb +5 -2
  116. data/proto_docs/google/protobuf/timestamp.rb +10 -1
  117. data/proto_docs/google/type/latlng.rb +2 -2
  118. metadata +81 -11
@@ -0,0 +1,144 @@
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
+ # By default, your agent responds to a matched intent with a static response.
25
+ # As an alternative, you can provide a more dynamic response by using
26
+ # fulfillment. When you enable fulfillment for an intent, Dialogflow responds
27
+ # to that intent by calling a service that you define. For example, if an
28
+ # end-user wants to schedule a haircut on Friday, your service can check your
29
+ # database and respond to the end-user with availability information for
30
+ # Friday.
31
+ #
32
+ # For more information, see the [fulfillment
33
+ # guide](https://cloud.google.com/dialogflow/docs/fulfillment-overview).
34
+ # @!attribute [rw] name
35
+ # @return [::String]
36
+ # Required. The unique identifier of the fulfillment.
37
+ # Supported formats:
38
+ # - `projects/<Project ID>/agent/fulfillment`
39
+ # - `projects/<Project ID>/locations/<Location ID>/agent/fulfillment`
40
+ #
41
+ # This field is not used for Fulfillment in an Environment.
42
+ # @!attribute [rw] display_name
43
+ # @return [::String]
44
+ # Optional. The human-readable name of the fulfillment, unique within the agent.
45
+ #
46
+ # This field is not used for Fulfillment in an Environment.
47
+ # @!attribute [rw] generic_web_service
48
+ # @return [::Google::Cloud::Dialogflow::V2::Fulfillment::GenericWebService]
49
+ # Configuration for a generic web service.
50
+ # @!attribute [rw] enabled
51
+ # @return [::Boolean]
52
+ # Optional. Whether fulfillment is enabled.
53
+ # @!attribute [rw] features
54
+ # @return [::Array<::Google::Cloud::Dialogflow::V2::Fulfillment::Feature>]
55
+ # Optional. The field defines whether the fulfillment is enabled for certain features.
56
+ class Fulfillment
57
+ include ::Google::Protobuf::MessageExts
58
+ extend ::Google::Protobuf::MessageExts::ClassMethods
59
+
60
+ # Represents configuration for a generic web service.
61
+ # Dialogflow supports two mechanisms for authentications:
62
+ # - Basic authentication with username and password.
63
+ # - Authentication with additional authentication headers.
64
+ # More information could be found at:
65
+ # https://cloud.google.com/dialogflow/docs/fulfillment-configure.
66
+ # @!attribute [rw] uri
67
+ # @return [::String]
68
+ # Required. The fulfillment URI for receiving POST requests.
69
+ # It must use https protocol.
70
+ # @!attribute [rw] username
71
+ # @return [::String]
72
+ # Optional. The user name for HTTP Basic authentication.
73
+ # @!attribute [rw] password
74
+ # @return [::String]
75
+ # Optional. The password for HTTP Basic authentication.
76
+ # @!attribute [rw] request_headers
77
+ # @return [::Google::Protobuf::Map{::String => ::String}]
78
+ # Optional. The HTTP request headers to send together with fulfillment requests.
79
+ # @!attribute [rw] is_cloud_function
80
+ # @return [::Boolean]
81
+ # Optional. Indicates if generic web service is created through Cloud Functions
82
+ # integration. Defaults to false.
83
+ #
84
+ # is_cloud_function is deprecated. Cloud functions can be configured by
85
+ # its uri as a regular web service now.
86
+ class GenericWebService
87
+ include ::Google::Protobuf::MessageExts
88
+ extend ::Google::Protobuf::MessageExts::ClassMethods
89
+
90
+ # @!attribute [rw] key
91
+ # @return [::String]
92
+ # @!attribute [rw] value
93
+ # @return [::String]
94
+ class RequestHeadersEntry
95
+ include ::Google::Protobuf::MessageExts
96
+ extend ::Google::Protobuf::MessageExts::ClassMethods
97
+ end
98
+ end
99
+
100
+ # Whether fulfillment is enabled for the specific feature.
101
+ # @!attribute [rw] type
102
+ # @return [::Google::Cloud::Dialogflow::V2::Fulfillment::Feature::Type]
103
+ # The type of the feature that enabled for fulfillment.
104
+ class Feature
105
+ include ::Google::Protobuf::MessageExts
106
+ extend ::Google::Protobuf::MessageExts::ClassMethods
107
+
108
+ # The type of the feature.
109
+ module Type
110
+ # Feature type not specified.
111
+ TYPE_UNSPECIFIED = 0
112
+
113
+ # Fulfillment is enabled for SmallTalk.
114
+ SMALLTALK = 1
115
+ end
116
+ end
117
+ end
118
+
119
+ # The request message for {::Google::Cloud::Dialogflow::V2::Fulfillments::Client#get_fulfillment Fulfillments.GetFulfillment}.
120
+ # @!attribute [rw] name
121
+ # @return [::String]
122
+ # Required. The name of the fulfillment.
123
+ # Format: `projects/<Project ID>/agent/fulfillment`.
124
+ class GetFulfillmentRequest
125
+ include ::Google::Protobuf::MessageExts
126
+ extend ::Google::Protobuf::MessageExts::ClassMethods
127
+ end
128
+
129
+ # The request message for {::Google::Cloud::Dialogflow::V2::Fulfillments::Client#update_fulfillment Fulfillments.UpdateFulfillment}.
130
+ # @!attribute [rw] fulfillment
131
+ # @return [::Google::Cloud::Dialogflow::V2::Fulfillment]
132
+ # Required. The fulfillment to update.
133
+ # @!attribute [rw] update_mask
134
+ # @return [::Google::Protobuf::FieldMask]
135
+ # Required. The mask to control which fields get updated. If the mask is not
136
+ # present, all fields will be updated.
137
+ class UpdateFulfillmentRequest
138
+ include ::Google::Protobuf::MessageExts
139
+ extend ::Google::Protobuf::MessageExts::ClassMethods
140
+ end
141
+ end
142
+ end
143
+ end
144
+ end
@@ -0,0 +1,45 @@
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
+ # Represents a notification sent to Cloud Pub/Sub subscribers for
25
+ # human agent assistant events in a specific conversation.
26
+ # @!attribute [rw] conversation
27
+ # @return [::String]
28
+ # The conversation this notification refers to.
29
+ # Format: `projects/<Project ID>/conversations/<Conversation ID>`.
30
+ # @!attribute [rw] participant
31
+ # @return [::String]
32
+ # The participant that the suggestion is compiled for.
33
+ # Format: `projects/<Project ID>/conversations/<Conversation
34
+ # ID>/participants/<Participant ID>`. It will not be set in legacy workflow.
35
+ # @!attribute [rw] suggestion_results
36
+ # @return [::Array<::Google::Cloud::Dialogflow::V2::SuggestionResult>]
37
+ # The suggestion results payload that this notification refers to.
38
+ class HumanAgentAssistantEvent
39
+ include ::Google::Protobuf::MessageExts
40
+ extend ::Google::Protobuf::MessageExts::ClassMethods
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
@@ -21,9 +21,15 @@ module Google
21
21
  module Cloud
22
22
  module Dialogflow
23
23
  module V2
24
- # Represents an intent.
25
- # Intents convert a number of user expressions or patterns into an action. An
26
- # action is an extraction of a user command or sentence semantics.
24
+ # An intent categorizes an end-user's intention for one conversation turn. For
25
+ # each agent, you define many intents, where your combined intents can handle a
26
+ # complete conversation. When an end-user writes or says something, referred to
27
+ # as an end-user expression or end-user input, Dialogflow matches the end-user
28
+ # input to the best intent in your agent. Matching an intent is also known as
29
+ # intent classification.
30
+ #
31
+ # For more information, see the [intent
32
+ # guide](https://cloud.google.com/dialogflow/docs/intents-overview).
27
33
  # @!attribute [rw] name
28
34
  # @return [::String]
29
35
  # Optional. The unique identifier of this intent.
@@ -55,6 +61,17 @@ module Google
55
61
  # Note: If `ml_disabled` setting is set to true, then this intent is not
56
62
  # taken into account during inference in `ML ONLY` match mode. Also,
57
63
  # auto-markup in the UI is turned off.
64
+ # @!attribute [rw] live_agent_handoff
65
+ # @return [::Boolean]
66
+ # Optional. Indicates that a live agent should be brought in to handle the
67
+ # interaction with the user. In most cases, when you set this flag to true,
68
+ # you would also want to set end_interaction to true as well. Default is
69
+ # false.
70
+ # @!attribute [rw] end_interaction
71
+ # @return [::Boolean]
72
+ # Optional. Indicates that this intent ends an interaction. Some integrations
73
+ # (e.g., Actions on Google or Dialogflow phone gateway) use this information
74
+ # to close interaction with an end user. Default is false.
58
75
  # @!attribute [rw] input_context_names
59
76
  # @return [::Array<::String>]
60
77
  # Optional. The list of context names required for this intent to be
@@ -820,7 +837,15 @@ module Google
820
837
  # @!attribute [rw] parent
821
838
  # @return [::String]
822
839
  # Required. The agent to list all intents from.
823
- # Format: `projects/<Project ID>/agent`.
840
+ # Format: `projects/<Project ID>/agent` or `projects/<Project
841
+ # ID>/locations/<Location ID>/agent`.
842
+ #
843
+ # Alternatively, you can specify the environment to list intents for.
844
+ # Format: `projects/<Project ID>/agent/environments/<Environment ID>`
845
+ # or `projects/<Project ID>/locations/<Location
846
+ # ID>/agent/environments/<Environment ID>`.
847
+ # Note: training phrases of the intents will not be returned for non-draft
848
+ # environment.
824
849
  # @!attribute [rw] language_code
825
850
  # @return [::String]
826
851
  # Optional. The language used to access language-specific data.
@@ -0,0 +1,139 @@
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
+ # A knowledge base represents a collection of knowledge documents that you
25
+ # provide to Dialogflow. Your knowledge documents contain information that may
26
+ # be useful during conversations with end-users. Some Dialogflow features use
27
+ # knowledge bases when looking for a response to an end-user input.
28
+ #
29
+ # For more information, see the [knowledge base
30
+ # guide](https://cloud.google.com/dialogflow/docs/how/knowledge-bases).
31
+ #
32
+ # Note: The `projects.agent.knowledgeBases` resource is deprecated;
33
+ # only use `projects.knowledgeBases`.
34
+ # @!attribute [rw] name
35
+ # @return [::String]
36
+ # The knowledge base resource name.
37
+ # The name must be empty when creating a knowledge base.
38
+ # Format: `projects/<Project ID>/locations/<Location
39
+ # ID>/knowledgeBases/<Knowledge Base ID>`.
40
+ # @!attribute [rw] display_name
41
+ # @return [::String]
42
+ # Required. The display name of the knowledge base. The name must be 1024
43
+ # bytes or less; otherwise, the creation request fails.
44
+ # @!attribute [rw] language_code
45
+ # @return [::String]
46
+ # Language which represents the KnowledgeBase. When the KnowledgeBase is
47
+ # created/updated, expect this to be present for non en-us languages. When
48
+ # unspecified, the default language code en-us applies.
49
+ class KnowledgeBase
50
+ include ::Google::Protobuf::MessageExts
51
+ extend ::Google::Protobuf::MessageExts::ClassMethods
52
+ end
53
+
54
+ # Request message for {::Google::Cloud::Dialogflow::V2::KnowledgeBases::Client#list_knowledge_bases KnowledgeBases.ListKnowledgeBases}.
55
+ # @!attribute [rw] parent
56
+ # @return [::String]
57
+ # Required. The project to list of knowledge bases for.
58
+ # Format: `projects/<Project ID>/locations/<Location ID>`.
59
+ # @!attribute [rw] page_size
60
+ # @return [::Integer]
61
+ # The maximum number of items to return in a single page. By
62
+ # default 10 and at most 100.
63
+ # @!attribute [rw] page_token
64
+ # @return [::String]
65
+ # The next_page_token value returned from a previous list request.
66
+ class ListKnowledgeBasesRequest
67
+ include ::Google::Protobuf::MessageExts
68
+ extend ::Google::Protobuf::MessageExts::ClassMethods
69
+ end
70
+
71
+ # Response message for {::Google::Cloud::Dialogflow::V2::KnowledgeBases::Client#list_knowledge_bases KnowledgeBases.ListKnowledgeBases}.
72
+ # @!attribute [rw] knowledge_bases
73
+ # @return [::Array<::Google::Cloud::Dialogflow::V2::KnowledgeBase>]
74
+ # The list of knowledge bases.
75
+ # @!attribute [rw] next_page_token
76
+ # @return [::String]
77
+ # Token to retrieve the next page of results, or empty if there are no
78
+ # more results in the list.
79
+ class ListKnowledgeBasesResponse
80
+ include ::Google::Protobuf::MessageExts
81
+ extend ::Google::Protobuf::MessageExts::ClassMethods
82
+ end
83
+
84
+ # Request message for {::Google::Cloud::Dialogflow::V2::KnowledgeBases::Client#get_knowledge_base KnowledgeBases.GetKnowledgeBase}.
85
+ # @!attribute [rw] name
86
+ # @return [::String]
87
+ # Required. The name of the knowledge base to retrieve.
88
+ # Format `projects/<Project ID>/locations/<Location
89
+ # ID>/knowledgeBases/<Knowledge Base ID>`.
90
+ class GetKnowledgeBaseRequest
91
+ include ::Google::Protobuf::MessageExts
92
+ extend ::Google::Protobuf::MessageExts::ClassMethods
93
+ end
94
+
95
+ # Request message for {::Google::Cloud::Dialogflow::V2::KnowledgeBases::Client#create_knowledge_base KnowledgeBases.CreateKnowledgeBase}.
96
+ # @!attribute [rw] parent
97
+ # @return [::String]
98
+ # Required. The project to create a knowledge base for.
99
+ # Format: `projects/<Project ID>/locations/<Location ID>`.
100
+ # @!attribute [rw] knowledge_base
101
+ # @return [::Google::Cloud::Dialogflow::V2::KnowledgeBase]
102
+ # Required. The knowledge base to create.
103
+ class CreateKnowledgeBaseRequest
104
+ include ::Google::Protobuf::MessageExts
105
+ extend ::Google::Protobuf::MessageExts::ClassMethods
106
+ end
107
+
108
+ # Request message for {::Google::Cloud::Dialogflow::V2::KnowledgeBases::Client#delete_knowledge_base KnowledgeBases.DeleteKnowledgeBase}.
109
+ # @!attribute [rw] name
110
+ # @return [::String]
111
+ # Required. The name of the knowledge base to delete.
112
+ # Format: `projects/<Project ID>/locations/<Location
113
+ # ID>/knowledgeBases/<Knowledge Base ID>`.
114
+ # @!attribute [rw] force
115
+ # @return [::Boolean]
116
+ # Optional. Force deletes the knowledge base. When set to true, any documents
117
+ # in the knowledge base are also deleted.
118
+ class DeleteKnowledgeBaseRequest
119
+ include ::Google::Protobuf::MessageExts
120
+ extend ::Google::Protobuf::MessageExts::ClassMethods
121
+ end
122
+
123
+ # Request message for {::Google::Cloud::Dialogflow::V2::KnowledgeBases::Client#update_knowledge_base KnowledgeBases.UpdateKnowledgeBase}.
124
+ # @!attribute [rw] knowledge_base
125
+ # @return [::Google::Cloud::Dialogflow::V2::KnowledgeBase]
126
+ # Required. The knowledge base to update.
127
+ # @!attribute [rw] update_mask
128
+ # @return [::Google::Protobuf::FieldMask]
129
+ # Optional. Not specified means `update all`.
130
+ # Currently, only `display_name` can be updated, an InvalidArgument will be
131
+ # returned for attempting to update other fields.
132
+ class UpdateKnowledgeBaseRequest
133
+ include ::Google::Protobuf::MessageExts
134
+ extend ::Google::Protobuf::MessageExts::ClassMethods
135
+ end
136
+ end
137
+ end
138
+ end
139
+ end
@@ -0,0 +1,525 @@
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
+ # Represents a conversation participant (human agent, virtual agent, end-user).
25
+ # @!attribute [rw] name
26
+ # @return [::String]
27
+ # Optional. The unique identifier of this participant.
28
+ # Format: `projects/<Project ID>/locations/<Location
29
+ # ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
30
+ # @!attribute [rw] role
31
+ # @return [::Google::Cloud::Dialogflow::V2::Participant::Role]
32
+ # Immutable. The role this participant plays in the conversation. This field must be set
33
+ # during participant creation and is then immutable.
34
+ # @!attribute [rw] sip_recording_media_label
35
+ # @return [::String]
36
+ # Optional. Label applied to streams representing this participant in SIPREC
37
+ # XML metadata and SDP. This is used to assign transcriptions from that
38
+ # media stream to this participant. This field can be updated.
39
+ class Participant
40
+ include ::Google::Protobuf::MessageExts
41
+ extend ::Google::Protobuf::MessageExts::ClassMethods
42
+
43
+ # Enumeration of the roles a participant can play in a conversation.
44
+ module Role
45
+ # Participant role not set.
46
+ ROLE_UNSPECIFIED = 0
47
+
48
+ # Participant is a human agent.
49
+ HUMAN_AGENT = 1
50
+
51
+ # Participant is an automated agent, such as a Dialogflow agent.
52
+ AUTOMATED_AGENT = 2
53
+
54
+ # Participant is an end user that has called or chatted with
55
+ # Dialogflow services.
56
+ END_USER = 3
57
+ end
58
+ end
59
+
60
+ # Represents a message posted into a conversation.
61
+ # @!attribute [rw] name
62
+ # @return [::String]
63
+ # The unique identifier of the message.
64
+ # Format: `projects/<Project ID>/locations/<Location
65
+ # ID>/conversations/<Conversation ID>/messages/<Message ID>`.
66
+ # @!attribute [rw] content
67
+ # @return [::String]
68
+ # Required. The message content.
69
+ # @!attribute [rw] language_code
70
+ # @return [::String]
71
+ # Optional. The message language.
72
+ # This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
73
+ # language tag. Example: "en-US".
74
+ # @!attribute [r] participant
75
+ # @return [::String]
76
+ # Output only. The participant that sends this message.
77
+ # @!attribute [r] participant_role
78
+ # @return [::Google::Cloud::Dialogflow::V2::Participant::Role]
79
+ # Output only. The role of the participant.
80
+ # @!attribute [r] create_time
81
+ # @return [::Google::Protobuf::Timestamp]
82
+ # Output only. The time when the message was created.
83
+ # @!attribute [r] message_annotation
84
+ # @return [::Google::Cloud::Dialogflow::V2::MessageAnnotation]
85
+ # Output only. The annotation for the message.
86
+ class Message
87
+ include ::Google::Protobuf::MessageExts
88
+ extend ::Google::Protobuf::MessageExts::ClassMethods
89
+ end
90
+
91
+ # The request message for {::Google::Cloud::Dialogflow::V2::Participants::Client#create_participant Participants.CreateParticipant}.
92
+ # @!attribute [rw] parent
93
+ # @return [::String]
94
+ # Required. Resource identifier of the conversation adding the participant.
95
+ # Format: `projects/<Project ID>/locations/<Location
96
+ # ID>/conversations/<Conversation ID>`.
97
+ # @!attribute [rw] participant
98
+ # @return [::Google::Cloud::Dialogflow::V2::Participant]
99
+ # Required. The participant to create.
100
+ class CreateParticipantRequest
101
+ include ::Google::Protobuf::MessageExts
102
+ extend ::Google::Protobuf::MessageExts::ClassMethods
103
+ end
104
+
105
+ # The request message for {::Google::Cloud::Dialogflow::V2::Participants::Client#get_participant Participants.GetParticipant}.
106
+ # @!attribute [rw] name
107
+ # @return [::String]
108
+ # Required. The name of the participant. Format:
109
+ # `projects/<Project ID>/locations/<Location ID>/conversations/<Conversation
110
+ # ID>/participants/<Participant ID>`.
111
+ class GetParticipantRequest
112
+ include ::Google::Protobuf::MessageExts
113
+ extend ::Google::Protobuf::MessageExts::ClassMethods
114
+ end
115
+
116
+ # The request message for {::Google::Cloud::Dialogflow::V2::Participants::Client#list_participants Participants.ListParticipants}.
117
+ # @!attribute [rw] parent
118
+ # @return [::String]
119
+ # Required. The conversation to list all participants from.
120
+ # Format: `projects/<Project ID>/locations/<Location
121
+ # ID>/conversations/<Conversation ID>`.
122
+ # @!attribute [rw] page_size
123
+ # @return [::Integer]
124
+ # Optional. The maximum number of items to return in a single page. By
125
+ # default 100 and at most 1000.
126
+ # @!attribute [rw] page_token
127
+ # @return [::String]
128
+ # Optional. The next_page_token value returned from a previous list request.
129
+ class ListParticipantsRequest
130
+ include ::Google::Protobuf::MessageExts
131
+ extend ::Google::Protobuf::MessageExts::ClassMethods
132
+ end
133
+
134
+ # The response message for {::Google::Cloud::Dialogflow::V2::Participants::Client#list_participants Participants.ListParticipants}.
135
+ # @!attribute [rw] participants
136
+ # @return [::Array<::Google::Cloud::Dialogflow::V2::Participant>]
137
+ # The list of participants. There is a maximum number of items
138
+ # returned based on the page_size field in the request.
139
+ # @!attribute [rw] next_page_token
140
+ # @return [::String]
141
+ # Token to retrieve the next page of results or empty if there are no
142
+ # more results in the list.
143
+ class ListParticipantsResponse
144
+ include ::Google::Protobuf::MessageExts
145
+ extend ::Google::Protobuf::MessageExts::ClassMethods
146
+ end
147
+
148
+ # The request message for {::Google::Cloud::Dialogflow::V2::Participants::Client#update_participant Participants.UpdateParticipant}.
149
+ # @!attribute [rw] participant
150
+ # @return [::Google::Cloud::Dialogflow::V2::Participant]
151
+ # Required. The participant to update.
152
+ # @!attribute [rw] update_mask
153
+ # @return [::Google::Protobuf::FieldMask]
154
+ # Required. The mask to specify which fields to update.
155
+ class UpdateParticipantRequest
156
+ include ::Google::Protobuf::MessageExts
157
+ extend ::Google::Protobuf::MessageExts::ClassMethods
158
+ end
159
+
160
+ # The request message for {::Google::Cloud::Dialogflow::V2::Participants::Client#analyze_content Participants.AnalyzeContent}.
161
+ # @!attribute [rw] participant
162
+ # @return [::String]
163
+ # Required. The name of the participant this text comes from.
164
+ # Format: `projects/<Project ID>/locations/<Location
165
+ # ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
166
+ # @!attribute [rw] text_input
167
+ # @return [::Google::Cloud::Dialogflow::V2::TextInput]
168
+ # The natural language text to be processed.
169
+ # @!attribute [rw] event_input
170
+ # @return [::Google::Cloud::Dialogflow::V2::EventInput]
171
+ # An input event to send to Dialogflow.
172
+ # @!attribute [rw] reply_audio_config
173
+ # @return [::Google::Cloud::Dialogflow::V2::OutputAudioConfig]
174
+ # Speech synthesis configuration.
175
+ # The speech synthesis settings for a virtual agent that may be configured
176
+ # for the associated conversation profile are not used when calling
177
+ # AnalyzeContent. If this configuration is not supplied, speech synthesis
178
+ # is disabled.
179
+ # @!attribute [rw] query_params
180
+ # @return [::Google::Cloud::Dialogflow::V2::QueryParameters]
181
+ # Parameters for a Dialogflow virtual-agent query.
182
+ # @!attribute [rw] request_id
183
+ # @return [::String]
184
+ # A unique identifier for this request. Restricted to 36 ASCII characters.
185
+ # A random UUID is recommended.
186
+ # This request is only idempotent if a `request_id` is provided.
187
+ class AnalyzeContentRequest
188
+ include ::Google::Protobuf::MessageExts
189
+ extend ::Google::Protobuf::MessageExts::ClassMethods
190
+ end
191
+
192
+ # The message in the response that indicates the parameters of DTMF.
193
+ # @!attribute [rw] accepts_dtmf_input
194
+ # @return [::Boolean]
195
+ # Indicates whether DTMF input can be handled in the next request.
196
+ class DtmfParameters
197
+ include ::Google::Protobuf::MessageExts
198
+ extend ::Google::Protobuf::MessageExts::ClassMethods
199
+ end
200
+
201
+ # The response message for {::Google::Cloud::Dialogflow::V2::Participants::Client#analyze_content Participants.AnalyzeContent}.
202
+ # @!attribute [rw] reply_text
203
+ # @return [::String]
204
+ # The output text content.
205
+ # This field is set if the automated agent responded with text to show to
206
+ # the user.
207
+ # @!attribute [rw] reply_audio
208
+ # @return [::Google::Cloud::Dialogflow::V2::OutputAudio]
209
+ # The audio data bytes encoded as specified in the request.
210
+ # This field is set if:
211
+ #
212
+ # - `reply_audio_config` was specified in the request, or
213
+ # - The automated agent responded with audio to play to the user. In such
214
+ # case, `reply_audio.config` contains settings used to synthesize the
215
+ # speech.
216
+ #
217
+ # In some scenarios, multiple output audio fields may be present in the
218
+ # response structure. In these cases, only the top-most-level audio output
219
+ # has content.
220
+ # @!attribute [rw] automated_agent_reply
221
+ # @return [::Google::Cloud::Dialogflow::V2::AutomatedAgentReply]
222
+ # Only set if a Dialogflow automated agent has responded.
223
+ # Note that: [AutomatedAgentReply.detect_intent_response.output_audio][]
224
+ # and [AutomatedAgentReply.detect_intent_response.output_audio_config][]
225
+ # are always empty, use {::Google::Cloud::Dialogflow::V2::AnalyzeContentResponse#reply_audio reply_audio} instead.
226
+ # @!attribute [rw] message
227
+ # @return [::Google::Cloud::Dialogflow::V2::Message]
228
+ # Message analyzed by CCAI.
229
+ # @!attribute [rw] human_agent_suggestion_results
230
+ # @return [::Array<::Google::Cloud::Dialogflow::V2::SuggestionResult>]
231
+ # The suggestions for most recent human agent. The order is the same as
232
+ # {::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig::SuggestionConfig#feature_configs HumanAgentAssistantConfig.SuggestionConfig.feature_configs} of
233
+ # {::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig#human_agent_suggestion_config HumanAgentAssistantConfig.human_agent_suggestion_config}.
234
+ # @!attribute [rw] end_user_suggestion_results
235
+ # @return [::Array<::Google::Cloud::Dialogflow::V2::SuggestionResult>]
236
+ # The suggestions for end user. The order is the same as
237
+ # {::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig::SuggestionConfig#feature_configs HumanAgentAssistantConfig.SuggestionConfig.feature_configs} of
238
+ # {::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig#end_user_suggestion_config HumanAgentAssistantConfig.end_user_suggestion_config}.
239
+ # @!attribute [rw] dtmf_parameters
240
+ # @return [::Google::Cloud::Dialogflow::V2::DtmfParameters]
241
+ # Indicates the parameters of DTMF.
242
+ class AnalyzeContentResponse
243
+ include ::Google::Protobuf::MessageExts
244
+ extend ::Google::Protobuf::MessageExts::ClassMethods
245
+ end
246
+
247
+ # The request message for {::Google::Cloud::Dialogflow::V2::Participants::Client#suggest_articles Participants.SuggestArticles}.
248
+ # @!attribute [rw] parent
249
+ # @return [::String]
250
+ # Required. The name of the participant to fetch suggestion for.
251
+ # Format: `projects/<Project ID>/locations/<Location
252
+ # ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
253
+ # @!attribute [rw] latest_message
254
+ # @return [::String]
255
+ # The name of the latest conversation message to compile suggestion
256
+ # for. If empty, it will be the latest message of the conversation.
257
+ #
258
+ # Format: `projects/<Project ID>/locations/<Location
259
+ # ID>/conversations/<Conversation ID>/messages/<Message ID>`.
260
+ # @!attribute [rw] context_size
261
+ # @return [::Integer]
262
+ # Max number of messages prior to and including
263
+ # {::Google::Cloud::Dialogflow::V2::SuggestArticlesRequest#latest_message latest_message} to use as context
264
+ # when compiling the suggestion. By default 20 and at most 50.
265
+ class SuggestArticlesRequest
266
+ include ::Google::Protobuf::MessageExts
267
+ extend ::Google::Protobuf::MessageExts::ClassMethods
268
+ end
269
+
270
+ # The response message for {::Google::Cloud::Dialogflow::V2::Participants::Client#suggest_articles Participants.SuggestArticles}.
271
+ # @!attribute [rw] article_answers
272
+ # @return [::Array<::Google::Cloud::Dialogflow::V2::ArticleAnswer>]
273
+ # Articles ordered by score in descending order.
274
+ # @!attribute [rw] latest_message
275
+ # @return [::String]
276
+ # The name of the latest conversation message used to compile
277
+ # suggestion for.
278
+ #
279
+ # Format: `projects/<Project ID>/locations/<Location
280
+ # ID>/conversations/<Conversation ID>/messages/<Message ID>`.
281
+ # @!attribute [rw] context_size
282
+ # @return [::Integer]
283
+ # Number of messages prior to and including
284
+ # {::Google::Cloud::Dialogflow::V2::SuggestArticlesResponse#latest_message latest_message} to compile the
285
+ # suggestion. It may be smaller than the
286
+ # {::Google::Cloud::Dialogflow::V2::SuggestArticlesRequest#context_size SuggestArticlesRequest.context_size} field in the request if there
287
+ # aren't that many messages in the conversation.
288
+ class SuggestArticlesResponse
289
+ include ::Google::Protobuf::MessageExts
290
+ extend ::Google::Protobuf::MessageExts::ClassMethods
291
+ end
292
+
293
+ # The request message for {::Google::Cloud::Dialogflow::V2::Participants::Client#suggest_faq_answers Participants.SuggestFaqAnswers}.
294
+ # @!attribute [rw] parent
295
+ # @return [::String]
296
+ # Required. The name of the participant to fetch suggestion for.
297
+ # Format: `projects/<Project ID>/locations/<Location
298
+ # ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
299
+ # @!attribute [rw] latest_message
300
+ # @return [::String]
301
+ # The name of the latest conversation message to compile suggestion
302
+ # for. If empty, it will be the latest message of the conversation.
303
+ #
304
+ # Format: `projects/<Project ID>/locations/<Location
305
+ # ID>/conversations/<Conversation ID>/messages/<Message ID>`.
306
+ # @!attribute [rw] context_size
307
+ # @return [::Integer]
308
+ # Max number of messages prior to and including
309
+ # [latest_message] to use as context when compiling the
310
+ # suggestion. By default 20 and at most 50.
311
+ class SuggestFaqAnswersRequest
312
+ include ::Google::Protobuf::MessageExts
313
+ extend ::Google::Protobuf::MessageExts::ClassMethods
314
+ end
315
+
316
+ # The request message for {::Google::Cloud::Dialogflow::V2::Participants::Client#suggest_faq_answers Participants.SuggestFaqAnswers}.
317
+ # @!attribute [rw] faq_answers
318
+ # @return [::Array<::Google::Cloud::Dialogflow::V2::FaqAnswer>]
319
+ # Answers extracted from FAQ documents.
320
+ # @!attribute [rw] latest_message
321
+ # @return [::String]
322
+ # The name of the latest conversation message used to compile
323
+ # suggestion for.
324
+ #
325
+ # Format: `projects/<Project ID>/locations/<Location
326
+ # ID>/conversations/<Conversation ID>/messages/<Message ID>`.
327
+ # @!attribute [rw] context_size
328
+ # @return [::Integer]
329
+ # Number of messages prior to and including
330
+ # {::Google::Cloud::Dialogflow::V2::SuggestFaqAnswersResponse#latest_message latest_message} to compile the
331
+ # suggestion. It may be smaller than the
332
+ # {::Google::Cloud::Dialogflow::V2::SuggestFaqAnswersRequest#context_size SuggestFaqAnswersRequest.context_size} field in the request if there
333
+ # aren't that many messages in the conversation.
334
+ class SuggestFaqAnswersResponse
335
+ include ::Google::Protobuf::MessageExts
336
+ extend ::Google::Protobuf::MessageExts::ClassMethods
337
+ end
338
+
339
+ # Represents the natural language speech audio to be played to the end user.
340
+ # @!attribute [rw] config
341
+ # @return [::Google::Cloud::Dialogflow::V2::OutputAudioConfig]
342
+ # Instructs the speech synthesizer how to generate the speech
343
+ # audio.
344
+ # @!attribute [rw] audio
345
+ # @return [::String]
346
+ # The natural language speech audio.
347
+ class OutputAudio
348
+ include ::Google::Protobuf::MessageExts
349
+ extend ::Google::Protobuf::MessageExts::ClassMethods
350
+ end
351
+
352
+ # Represents a response from an automated agent.
353
+ # @!attribute [rw] detect_intent_response
354
+ # @return [::Google::Cloud::Dialogflow::V2::DetectIntentResponse]
355
+ # Response of the Dialogflow {::Google::Cloud::Dialogflow::V2::Sessions::Client#detect_intent Sessions.DetectIntent} call.
356
+ # @!attribute [rw] automated_agent_reply_type
357
+ # @return [::Google::Cloud::Dialogflow::V2::AutomatedAgentReply::AutomatedAgentReplyType]
358
+ # AutomatedAgentReply type.
359
+ # @!attribute [rw] allow_cancellation
360
+ # @return [::Boolean]
361
+ # Indicates whether the partial automated agent reply is interruptible when a
362
+ # later reply message arrives. e.g. if the agent specified some music as
363
+ # partial response, it can be cancelled.
364
+ class AutomatedAgentReply
365
+ include ::Google::Protobuf::MessageExts
366
+ extend ::Google::Protobuf::MessageExts::ClassMethods
367
+
368
+ # Represents different automated agent reply types.
369
+ module AutomatedAgentReplyType
370
+ # Not specified. This should never happen.
371
+ AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED = 0
372
+
373
+ # Partial reply. e.g. Aggregated responses in a `Fulfillment` that enables
374
+ # `return_partial_response` can be returned as partial reply.
375
+ # WARNING: partial reply is not eligible for barge-in.
376
+ PARTIAL = 1
377
+
378
+ # Final reply.
379
+ FINAL = 2
380
+ end
381
+ end
382
+
383
+ # Represents article answer.
384
+ # @!attribute [rw] title
385
+ # @return [::String]
386
+ # The article title.
387
+ # @!attribute [rw] uri
388
+ # @return [::String]
389
+ # The article URI.
390
+ # @!attribute [rw] snippets
391
+ # @return [::Array<::String>]
392
+ # Article snippets.
393
+ # @!attribute [rw] confidence
394
+ # @return [::Float]
395
+ # Article match confidence.
396
+ # The system's confidence score that this article is a good match for this
397
+ # conversation, as a value from 0.0 (completely uncertain) to 1.0
398
+ # (completely certain).
399
+ # @!attribute [rw] metadata
400
+ # @return [::Google::Protobuf::Map{::String => ::String}]
401
+ # A map that contains metadata about the answer and the
402
+ # document from which it originates.
403
+ # @!attribute [rw] answer_record
404
+ # @return [::String]
405
+ # The name of answer record, in the format of
406
+ # "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
407
+ # ID>"
408
+ class ArticleAnswer
409
+ include ::Google::Protobuf::MessageExts
410
+ extend ::Google::Protobuf::MessageExts::ClassMethods
411
+
412
+ # @!attribute [rw] key
413
+ # @return [::String]
414
+ # @!attribute [rw] value
415
+ # @return [::String]
416
+ class MetadataEntry
417
+ include ::Google::Protobuf::MessageExts
418
+ extend ::Google::Protobuf::MessageExts::ClassMethods
419
+ end
420
+ end
421
+
422
+ # Represents answer from "frequently asked questions".
423
+ # @!attribute [rw] answer
424
+ # @return [::String]
425
+ # The piece of text from the `source` knowledge base document.
426
+ # @!attribute [rw] confidence
427
+ # @return [::Float]
428
+ # The system's confidence score that this Knowledge answer is a good match
429
+ # for this conversational query, range from 0.0 (completely uncertain)
430
+ # to 1.0 (completely certain).
431
+ # @!attribute [rw] question
432
+ # @return [::String]
433
+ # The corresponding FAQ question.
434
+ # @!attribute [rw] source
435
+ # @return [::String]
436
+ # Indicates which Knowledge Document this answer was extracted
437
+ # from.
438
+ # Format: `projects/<Project ID>/locations/<Location
439
+ # ID>/agent/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
440
+ # @!attribute [rw] metadata
441
+ # @return [::Google::Protobuf::Map{::String => ::String}]
442
+ # A map that contains metadata about the answer and the
443
+ # document from which it originates.
444
+ # @!attribute [rw] answer_record
445
+ # @return [::String]
446
+ # The name of answer record, in the format of
447
+ # "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
448
+ # ID>"
449
+ class FaqAnswer
450
+ include ::Google::Protobuf::MessageExts
451
+ extend ::Google::Protobuf::MessageExts::ClassMethods
452
+
453
+ # @!attribute [rw] key
454
+ # @return [::String]
455
+ # @!attribute [rw] value
456
+ # @return [::String]
457
+ class MetadataEntry
458
+ include ::Google::Protobuf::MessageExts
459
+ extend ::Google::Protobuf::MessageExts::ClassMethods
460
+ end
461
+ end
462
+
463
+ # One response of different type of suggestion response which is used in
464
+ # the response of {::Google::Cloud::Dialogflow::V2::Participants::Client#analyze_content Participants.AnalyzeContent} and
465
+ # {::Google::Cloud::Dialogflow::V2::Participants::Client#analyze_content Participants.AnalyzeContent}, as well as {::Google::Cloud::Dialogflow::V2::HumanAgentAssistantEvent HumanAgentAssistantEvent}.
466
+ # @!attribute [rw] error
467
+ # @return [::Google::Rpc::Status]
468
+ # Error status if the request failed.
469
+ # @!attribute [rw] suggest_articles_response
470
+ # @return [::Google::Cloud::Dialogflow::V2::SuggestArticlesResponse]
471
+ # SuggestArticlesResponse if request is for ARTICLE_SUGGESTION.
472
+ # @!attribute [rw] suggest_faq_answers_response
473
+ # @return [::Google::Cloud::Dialogflow::V2::SuggestFaqAnswersResponse]
474
+ # SuggestFaqAnswersResponse if request is for FAQ_ANSWER.
475
+ class SuggestionResult
476
+ include ::Google::Protobuf::MessageExts
477
+ extend ::Google::Protobuf::MessageExts::ClassMethods
478
+ end
479
+
480
+ # Represents a part of a message possibly annotated with an entity. The part
481
+ # can be an entity or purely a part of the message between two entities or
482
+ # message start/end.
483
+ # @!attribute [rw] text
484
+ # @return [::String]
485
+ # A part of a message possibly annotated with an entity.
486
+ # @!attribute [rw] entity_type
487
+ # @return [::String]
488
+ # The [Dialogflow system entity
489
+ # type](https://cloud.google.com/dialogflow/docs/reference/system-entities)
490
+ # of this message part. If this is empty, Dialogflow could not annotate the
491
+ # phrase part with a system entity.
492
+ # @!attribute [rw] formatted_value
493
+ # @return [::Google::Protobuf::Value]
494
+ # The [Dialogflow system entity formatted value
495
+ # ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of
496
+ # this message part. For example for a system entity of type
497
+ # `@sys.unit-currency`, this may contain:
498
+ # <pre>
499
+ # {
500
+ # "amount": 5,
501
+ # "currency": "USD"
502
+ # }
503
+ # </pre>
504
+ class AnnotatedMessagePart
505
+ include ::Google::Protobuf::MessageExts
506
+ extend ::Google::Protobuf::MessageExts::ClassMethods
507
+ end
508
+
509
+ # Represents the result of annotation for the message.
510
+ # @!attribute [rw] parts
511
+ # @return [::Array<::Google::Cloud::Dialogflow::V2::AnnotatedMessagePart>]
512
+ # The collection of annotated message parts ordered by their
513
+ # position in the message. You can recover the annotated message by
514
+ # concatenating [AnnotatedMessagePart.text].
515
+ # @!attribute [rw] contain_entities
516
+ # @return [::Boolean]
517
+ # Indicates whether the text message contains entities.
518
+ class MessageAnnotation
519
+ include ::Google::Protobuf::MessageExts
520
+ extend ::Google::Protobuf::MessageExts::ClassMethods
521
+ end
522
+ end
523
+ end
524
+ end
525
+ end