google-apis-dialogflow_v2 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 62bd91152015e994fc4a5362958275b320bfe25467e611ffadf8826d328b62fb
4
- data.tar.gz: f65441f6855d27a42e9aa4709737cf57a6fda39fb3e2a02f32c9aeeb541dc8cf
3
+ metadata.gz: 42e0155dd3ce4c44f1d37ab0bbb3abfb49c5d6525a1044a2297a19ff835474df
4
+ data.tar.gz: 38639d48a7a7800fea6e4489266dc203089cb45410d54e6c56bb2906a0fe8d7f
5
5
  SHA512:
6
- metadata.gz: 3135261702b3d62dbc0718c155c75bca37d7c65e3a2c0fb4ff9a0b3adaaafafbf63f77991441ceb587a406542e8aff1221b0807b32d31e63efc72f96d58f1d7c
7
- data.tar.gz: d30485e2e088fbe8d87872d7b99394973338ebfed4ee7e107b00d2dc4b519c32f50baa94e1f1ae3d042902816ea0389ab1d81456bf92108dbc0826d719107023
6
+ metadata.gz: 4d42d565fae71bbf5b60c01b5095dd95b5f9f6b79e8aab8dda0f931602ec41972175d456b05acc8351ece930f83a6a1cf20969ad757fc8e5468f5abaf97f1f85
7
+ data.tar.gz: 344aa9945c531b38e9948804691ebbd42bceda379465163334df1c9f6a6944f0ee8b2e95d57ab4ba368df386d02899ba2fb1c14af0f93545d445784716a2967d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Release history for google-apis-dialogflow_v2
2
2
 
3
+ ### v0.7.0 (2021-03-09)
4
+
5
+ * Regenerated from discovery document revision 20210307
6
+ * Regenerated using generator version 0.2.0
7
+
3
8
  ### v0.6.0 (2021-03-04)
4
9
 
5
10
  * Unspecified changes
@@ -4847,6 +4847,187 @@ module Google
4847
4847
  end
4848
4848
  end
4849
4849
 
4850
+ # Detail feedback of Agent Assist result.
4851
+ class GoogleCloudDialogflowV2AgentAssistantFeedback
4852
+ include Google::Apis::Core::Hashable
4853
+
4854
+ # Optional. Whether or not the suggested answer is relevant. For example: *
4855
+ # Query: "Can I change my mailing address?" * Suggested document says: "Items
4856
+ # must be returned/exchanged within 60 days of the purchase date." *
4857
+ # answer_relevance: AnswerRelevance.IRRELEVANT
4858
+ # Corresponds to the JSON property `answerRelevance`
4859
+ # @return [String]
4860
+ attr_accessor :answer_relevance
4861
+
4862
+ # Optional. Whether or not the information in the document is correct. For
4863
+ # example: * Query: "Can I return the package in 2 days once received?" *
4864
+ # Suggested document says: "Items must be returned/exchanged within 60 days of
4865
+ # the purchase date." * Ground truth: "No return or exchange is allowed." * [
4866
+ # document_correctness]: INCORRECT
4867
+ # Corresponds to the JSON property `documentCorrectness`
4868
+ # @return [String]
4869
+ attr_accessor :document_correctness
4870
+
4871
+ # Optional. Whether or not the suggested document is efficient. For example, if
4872
+ # the document is poorly written, hard to understand, hard to use or too long to
4873
+ # find useful information, document_efficiency is DocumentEfficiency.INEFFICIENT.
4874
+ # Corresponds to the JSON property `documentEfficiency`
4875
+ # @return [String]
4876
+ attr_accessor :document_efficiency
4877
+
4878
+ def initialize(**args)
4879
+ update!(**args)
4880
+ end
4881
+
4882
+ # Update properties of this object
4883
+ def update!(**args)
4884
+ @answer_relevance = args[:answer_relevance] if args.key?(:answer_relevance)
4885
+ @document_correctness = args[:document_correctness] if args.key?(:document_correctness)
4886
+ @document_efficiency = args[:document_efficiency] if args.key?(:document_efficiency)
4887
+ end
4888
+ end
4889
+
4890
+ # Represents a record of a human agent assist answer.
4891
+ class GoogleCloudDialogflowV2AgentAssistantRecord
4892
+ include Google::Apis::Core::Hashable
4893
+
4894
+ # Represents article answer.
4895
+ # Corresponds to the JSON property `articleSuggestionAnswer`
4896
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ArticleAnswer]
4897
+ attr_accessor :article_suggestion_answer
4898
+
4899
+ # Represents answer from "frequently asked questions".
4900
+ # Corresponds to the JSON property `faqAnswer`
4901
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2FaqAnswer]
4902
+ attr_accessor :faq_answer
4903
+
4904
+ def initialize(**args)
4905
+ update!(**args)
4906
+ end
4907
+
4908
+ # Update properties of this object
4909
+ def update!(**args)
4910
+ @article_suggestion_answer = args[:article_suggestion_answer] if args.key?(:article_suggestion_answer)
4911
+ @faq_answer = args[:faq_answer] if args.key?(:faq_answer)
4912
+ end
4913
+ end
4914
+
4915
+ # The request message for Participants.AnalyzeContent.
4916
+ class GoogleCloudDialogflowV2AnalyzeContentRequest
4917
+ include Google::Apis::Core::Hashable
4918
+
4919
+ # Represents the natural language speech audio to be processed.
4920
+ # Corresponds to the JSON property `audioInput`
4921
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2AudioInput]
4922
+ attr_accessor :audio_input
4923
+
4924
+ # Events allow for matching intents by event name instead of the natural
4925
+ # language input. For instance, input `` can trigger a personalized welcome
4926
+ # response. The parameter `name` may be used by the agent in the response: `"
4927
+ # Hello #welcome_event.name! What can I do for you today?"`.
4928
+ # Corresponds to the JSON property `eventInput`
4929
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EventInput]
4930
+ attr_accessor :event_input
4931
+
4932
+ # Represents the parameters of the conversational query.
4933
+ # Corresponds to the JSON property `queryParams`
4934
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2QueryParameters]
4935
+ attr_accessor :query_params
4936
+
4937
+ # Instructs the speech synthesizer on how to generate the output audio content.
4938
+ # If this audio config is supplied in a request, it overrides all existing text-
4939
+ # to-speech settings applied to the agent.
4940
+ # Corresponds to the JSON property `replyAudioConfig`
4941
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2OutputAudioConfig]
4942
+ attr_accessor :reply_audio_config
4943
+
4944
+ # A unique identifier for this request. Restricted to 36 ASCII characters. A
4945
+ # random UUID is recommended. This request is only idempotent if a `request_id`
4946
+ # is provided.
4947
+ # Corresponds to the JSON property `requestId`
4948
+ # @return [String]
4949
+ attr_accessor :request_id
4950
+
4951
+ # Represents the natural language text to be processed.
4952
+ # Corresponds to the JSON property `textInput`
4953
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2TextInput]
4954
+ attr_accessor :text_input
4955
+
4956
+ def initialize(**args)
4957
+ update!(**args)
4958
+ end
4959
+
4960
+ # Update properties of this object
4961
+ def update!(**args)
4962
+ @audio_input = args[:audio_input] if args.key?(:audio_input)
4963
+ @event_input = args[:event_input] if args.key?(:event_input)
4964
+ @query_params = args[:query_params] if args.key?(:query_params)
4965
+ @reply_audio_config = args[:reply_audio_config] if args.key?(:reply_audio_config)
4966
+ @request_id = args[:request_id] if args.key?(:request_id)
4967
+ @text_input = args[:text_input] if args.key?(:text_input)
4968
+ end
4969
+ end
4970
+
4971
+ # The response message for Participants.AnalyzeContent.
4972
+ class GoogleCloudDialogflowV2AnalyzeContentResponse
4973
+ include Google::Apis::Core::Hashable
4974
+
4975
+ # Represents a response from an automated agent.
4976
+ # Corresponds to the JSON property `automatedAgentReply`
4977
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2AutomatedAgentReply]
4978
+ attr_accessor :automated_agent_reply
4979
+
4980
+ # The message in the response that indicates the parameters of DTMF.
4981
+ # Corresponds to the JSON property `dtmfParameters`
4982
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2DtmfParameters]
4983
+ attr_accessor :dtmf_parameters
4984
+
4985
+ # The suggestions for end user. The order is the same as
4986
+ # HumanAgentAssistantConfig.SuggestionConfig.feature_configs of
4987
+ # HumanAgentAssistantConfig.end_user_suggestion_config.
4988
+ # Corresponds to the JSON property `endUserSuggestionResults`
4989
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SuggestionResult>]
4990
+ attr_accessor :end_user_suggestion_results
4991
+
4992
+ # The suggestions for most recent human agent. The order is the same as
4993
+ # HumanAgentAssistantConfig.SuggestionConfig.feature_configs of
4994
+ # HumanAgentAssistantConfig.human_agent_suggestion_config.
4995
+ # Corresponds to the JSON property `humanAgentSuggestionResults`
4996
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SuggestionResult>]
4997
+ attr_accessor :human_agent_suggestion_results
4998
+
4999
+ # Represents a message posted into a conversation.
5000
+ # Corresponds to the JSON property `message`
5001
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Message]
5002
+ attr_accessor :message
5003
+
5004
+ # Represents the natural language speech audio to be played to the end user.
5005
+ # Corresponds to the JSON property `replyAudio`
5006
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2OutputAudio]
5007
+ attr_accessor :reply_audio
5008
+
5009
+ # The output text content. This field is set if the automated agent responded
5010
+ # with text to show to the user.
5011
+ # Corresponds to the JSON property `replyText`
5012
+ # @return [String]
5013
+ attr_accessor :reply_text
5014
+
5015
+ def initialize(**args)
5016
+ update!(**args)
5017
+ end
5018
+
5019
+ # Update properties of this object
5020
+ def update!(**args)
5021
+ @automated_agent_reply = args[:automated_agent_reply] if args.key?(:automated_agent_reply)
5022
+ @dtmf_parameters = args[:dtmf_parameters] if args.key?(:dtmf_parameters)
5023
+ @end_user_suggestion_results = args[:end_user_suggestion_results] if args.key?(:end_user_suggestion_results)
5024
+ @human_agent_suggestion_results = args[:human_agent_suggestion_results] if args.key?(:human_agent_suggestion_results)
5025
+ @message = args[:message] if args.key?(:message)
5026
+ @reply_audio = args[:reply_audio] if args.key?(:reply_audio)
5027
+ @reply_text = args[:reply_text] if args.key?(:reply_text)
5028
+ end
5029
+ end
5030
+
4850
5031
  # Represents a part of a message possibly annotated with an entity. The part can
4851
5032
  # be an entity or purely a part of the message between two entities or message
4852
5033
  # start/end.
@@ -4885,6 +5066,229 @@ module Google
4885
5066
  end
4886
5067
  end
4887
5068
 
5069
+ # Represents feedback the customer has about the quality & correctness of a
5070
+ # certain answer in a conversation.
5071
+ class GoogleCloudDialogflowV2AnswerFeedback
5072
+ include Google::Apis::Core::Hashable
5073
+
5074
+ # Detail feedback of Agent Assist result.
5075
+ # Corresponds to the JSON property `agentAssistantDetailFeedback`
5076
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2AgentAssistantFeedback]
5077
+ attr_accessor :agent_assistant_detail_feedback
5078
+
5079
+ # Time when the answer/item was clicked.
5080
+ # Corresponds to the JSON property `clickTime`
5081
+ # @return [String]
5082
+ attr_accessor :click_time
5083
+
5084
+ # Indicates whether the answer/item was clicked by the human agent or not.
5085
+ # Default to false.
5086
+ # Corresponds to the JSON property `clicked`
5087
+ # @return [Boolean]
5088
+ attr_accessor :clicked
5089
+ alias_method :clicked?, :clicked
5090
+
5091
+ # The correctness level of the specific answer.
5092
+ # Corresponds to the JSON property `correctnessLevel`
5093
+ # @return [String]
5094
+ attr_accessor :correctness_level
5095
+
5096
+ # Time when the answer/item was displayed.
5097
+ # Corresponds to the JSON property `displayTime`
5098
+ # @return [String]
5099
+ attr_accessor :display_time
5100
+
5101
+ # Indicates whether the answer/item was displayed to the human agent in the
5102
+ # agent desktop UI. Default to false.
5103
+ # Corresponds to the JSON property `displayed`
5104
+ # @return [Boolean]
5105
+ attr_accessor :displayed
5106
+ alias_method :displayed?, :displayed
5107
+
5108
+ def initialize(**args)
5109
+ update!(**args)
5110
+ end
5111
+
5112
+ # Update properties of this object
5113
+ def update!(**args)
5114
+ @agent_assistant_detail_feedback = args[:agent_assistant_detail_feedback] if args.key?(:agent_assistant_detail_feedback)
5115
+ @click_time = args[:click_time] if args.key?(:click_time)
5116
+ @clicked = args[:clicked] if args.key?(:clicked)
5117
+ @correctness_level = args[:correctness_level] if args.key?(:correctness_level)
5118
+ @display_time = args[:display_time] if args.key?(:display_time)
5119
+ @displayed = args[:displayed] if args.key?(:displayed)
5120
+ end
5121
+ end
5122
+
5123
+ # Answer records are records to manage answer history and feedbacks for
5124
+ # Dialogflow. Currently, answer record includes: - human agent assistant article
5125
+ # suggestion - human agent assistant faq article It doesn't include: - `
5126
+ # DetectIntent` intent matching - `DetectIntent` knowledge Answer records are
5127
+ # not related to the conversation history in the Dialogflow Console. A Record is
5128
+ # generated even when the end-user disables conversation history in the console.
5129
+ # Records are created when there's a human agent assistant suggestion generated.
5130
+ # A typical workflow for customers provide feedback to an answer is: 1. For
5131
+ # human agent assistant, customers get suggestion via ListSuggestions API.
5132
+ # Together with the answers, AnswerRecord.name are returned to the customers. 2.
5133
+ # The customer uses the AnswerRecord.name to call the UpdateAnswerRecord method
5134
+ # to send feedback about a specific answer that they believe is wrong.
5135
+ class GoogleCloudDialogflowV2AnswerRecord
5136
+ include Google::Apis::Core::Hashable
5137
+
5138
+ # Represents a record of a human agent assist answer.
5139
+ # Corresponds to the JSON property `agentAssistantRecord`
5140
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2AgentAssistantRecord]
5141
+ attr_accessor :agent_assistant_record
5142
+
5143
+ # Represents feedback the customer has about the quality & correctness of a
5144
+ # certain answer in a conversation.
5145
+ # Corresponds to the JSON property `answerFeedback`
5146
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2AnswerFeedback]
5147
+ attr_accessor :answer_feedback
5148
+
5149
+ # The unique identifier of this answer record. Format: `projects//locations//
5150
+ # answerRecords/`.
5151
+ # Corresponds to the JSON property `name`
5152
+ # @return [String]
5153
+ attr_accessor :name
5154
+
5155
+ def initialize(**args)
5156
+ update!(**args)
5157
+ end
5158
+
5159
+ # Update properties of this object
5160
+ def update!(**args)
5161
+ @agent_assistant_record = args[:agent_assistant_record] if args.key?(:agent_assistant_record)
5162
+ @answer_feedback = args[:answer_feedback] if args.key?(:answer_feedback)
5163
+ @name = args[:name] if args.key?(:name)
5164
+ end
5165
+ end
5166
+
5167
+ # Represents article answer.
5168
+ class GoogleCloudDialogflowV2ArticleAnswer
5169
+ include Google::Apis::Core::Hashable
5170
+
5171
+ # The name of answer record, in the format of "projects//locations//
5172
+ # answerRecords/"
5173
+ # Corresponds to the JSON property `answerRecord`
5174
+ # @return [String]
5175
+ attr_accessor :answer_record
5176
+
5177
+ # Article match confidence. The system's confidence score that this article is a
5178
+ # good match for this conversation, as a value from 0.0 (completely uncertain)
5179
+ # to 1.0 (completely certain).
5180
+ # Corresponds to the JSON property `confidence`
5181
+ # @return [Float]
5182
+ attr_accessor :confidence
5183
+
5184
+ # A map that contains metadata about the answer and the document from which it
5185
+ # originates.
5186
+ # Corresponds to the JSON property `metadata`
5187
+ # @return [Hash<String,String>]
5188
+ attr_accessor :metadata
5189
+
5190
+ # Article snippets.
5191
+ # Corresponds to the JSON property `snippets`
5192
+ # @return [Array<String>]
5193
+ attr_accessor :snippets
5194
+
5195
+ # The article title.
5196
+ # Corresponds to the JSON property `title`
5197
+ # @return [String]
5198
+ attr_accessor :title
5199
+
5200
+ # The article URI.
5201
+ # Corresponds to the JSON property `uri`
5202
+ # @return [String]
5203
+ attr_accessor :uri
5204
+
5205
+ def initialize(**args)
5206
+ update!(**args)
5207
+ end
5208
+
5209
+ # Update properties of this object
5210
+ def update!(**args)
5211
+ @answer_record = args[:answer_record] if args.key?(:answer_record)
5212
+ @confidence = args[:confidence] if args.key?(:confidence)
5213
+ @metadata = args[:metadata] if args.key?(:metadata)
5214
+ @snippets = args[:snippets] if args.key?(:snippets)
5215
+ @title = args[:title] if args.key?(:title)
5216
+ @uri = args[:uri] if args.key?(:uri)
5217
+ end
5218
+ end
5219
+
5220
+ # Represents the natural language speech audio to be processed.
5221
+ class GoogleCloudDialogflowV2AudioInput
5222
+ include Google::Apis::Core::Hashable
5223
+
5224
+ # Required. The natural language speech audio to be processed. A single request
5225
+ # can contain up to 1 minute of speech audio data. The transcribed text cannot
5226
+ # contain more than 256 bytes.
5227
+ # Corresponds to the JSON property `audio`
5228
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
5229
+ # @return [String]
5230
+ attr_accessor :audio
5231
+
5232
+ # Instructs the speech recognizer how to process the audio content.
5233
+ # Corresponds to the JSON property `config`
5234
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2InputAudioConfig]
5235
+ attr_accessor :config
5236
+
5237
+ def initialize(**args)
5238
+ update!(**args)
5239
+ end
5240
+
5241
+ # Update properties of this object
5242
+ def update!(**args)
5243
+ @audio = args[:audio] if args.key?(:audio)
5244
+ @config = args[:config] if args.key?(:config)
5245
+ end
5246
+ end
5247
+
5248
+ # Defines the Automated Agent to connect to a conversation.
5249
+ class GoogleCloudDialogflowV2AutomatedAgentConfig
5250
+ include Google::Apis::Core::Hashable
5251
+
5252
+ # Required. ID of the Dialogflow agent environment to use. This project needs to
5253
+ # either be the same project as the conversation or you need to grant `service-@
5254
+ # gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow API Service Agent`
5255
+ # role in this project. Format: `projects//locations//agent/environments/`. If
5256
+ # environment is not specified, the default `draft` environment is used. Refer
5257
+ # to [DetectIntentRequest](/dialogflow/docs/reference/rpc/google.cloud.
5258
+ # dialogflow.v2#google.cloud.dialogflow.v2.DetectIntentRequest) for more details.
5259
+ # Corresponds to the JSON property `agent`
5260
+ # @return [String]
5261
+ attr_accessor :agent
5262
+
5263
+ def initialize(**args)
5264
+ update!(**args)
5265
+ end
5266
+
5267
+ # Update properties of this object
5268
+ def update!(**args)
5269
+ @agent = args[:agent] if args.key?(:agent)
5270
+ end
5271
+ end
5272
+
5273
+ # Represents a response from an automated agent.
5274
+ class GoogleCloudDialogflowV2AutomatedAgentReply
5275
+ include Google::Apis::Core::Hashable
5276
+
5277
+ # The message returned from the DetectIntent method.
5278
+ # Corresponds to the JSON property `detectIntentResponse`
5279
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2DetectIntentResponse]
5280
+ attr_accessor :detect_intent_response
5281
+
5282
+ def initialize(**args)
5283
+ update!(**args)
5284
+ end
5285
+
5286
+ # Update properties of this object
5287
+ def update!(**args)
5288
+ @detect_intent_response = args[:detect_intent_response] if args.key?(:detect_intent_response)
5289
+ end
5290
+ end
5291
+
4888
5292
  # The request message for EntityTypes.BatchCreateEntities.
4889
5293
  class GoogleCloudDialogflowV2BatchCreateEntitiesRequest
4890
5294
  include Google::Apis::Core::Hashable
@@ -5144,54 +5548,151 @@ module Google
5144
5548
  end
5145
5549
  end
5146
5550
 
5147
- # Dialogflow contexts are similar to natural language context. If a person says
5148
- # to you "they are orange", you need context in order to understand what "they"
5149
- # is referring to. Similarly, for Dialogflow to handle an end-user expression
5150
- # like that, it needs to be provided with context in order to correctly match an
5151
- # intent. Using contexts, you can control the flow of a conversation. You can
5152
- # configure contexts for an intent by setting input and output contexts, which
5153
- # are identified by string names. When an intent is matched, any configured
5154
- # output contexts for that intent become active. While any contexts are active,
5155
- # Dialogflow is more likely to match intents that are configured with input
5156
- # contexts that correspond to the currently active contexts. For more
5157
- # information about context, see the [Contexts guide](https://cloud.google.com/
5158
- # dialogflow/docs/contexts-overview).
5159
- class GoogleCloudDialogflowV2Context
5551
+ # Represents a call matcher that describes criteria for matching incoming SIP
5552
+ # calls to a conversation. When Dialogflow get a SIP call from a third-party
5553
+ # carrier, Dialogflow matches the call to an existing conversation by either: *
5554
+ # Extracting the conversation id from the [Call-Info header](https://tools.ietf.
5555
+ # org/html/rfc3261#section-20.9), e.g. `Call-Info: ;purpose=Goog-ContactCenter-
5556
+ # Conversation`. * Or, if that doesn't work, matching incoming [SIP headers](
5557
+ # https://tools.ietf.org/html/rfc3261#section-7.3) against any CallMatcher for
5558
+ # the conversation. If an incoming SIP call without valid `Call-Info` header
5559
+ # matches to zero or multiple conversations with `CallMatcher`, we reject it. A
5560
+ # call matcher contains equality conditions for SIP headers that all have to be
5561
+ # fulfilled in order for a SIP call to match. The matched SIP headers consist of
5562
+ # well-known headers (`To`, `From`, `Call-ID`) and custom headers. A CallMatcher
5563
+ # is only valid if it specifies: * At least 1 custom header, * or at least 2
5564
+ # well-known headers.
5565
+ class GoogleCloudDialogflowV2CallMatcher
5160
5566
  include Google::Apis::Core::Hashable
5161
5567
 
5162
- # Optional. The number of conversational query requests after which the context
5163
- # expires. The default is `0`. If set to `0`, the context expires immediately.
5164
- # Contexts expire automatically after 20 minutes if there are no matching
5165
- # queries.
5166
- # Corresponds to the JSON property `lifespanCount`
5167
- # @return [Fixnum]
5168
- attr_accessor :lifespan_count
5568
+ # Value of the [`Call-ID` header](https://tools.ietf.org/html/rfc3261#section-8.
5569
+ # 1.1.4) to match. If empty or unspecified, we don't match to the [`Call-ID`
5570
+ # header](https://tools.ietf.org/html/rfc3261#section-8.1.1.4).
5571
+ # Corresponds to the JSON property `callIdHeader`
5572
+ # @return [String]
5573
+ attr_accessor :call_id_header
5169
5574
 
5170
- # Required. The unique identifier of the context. Format: `projects//agent/
5171
- # sessions//contexts/`, or `projects//agent/environments//users//sessions//
5172
- # contexts/`. The `Context ID` is always converted to lowercase, may only
5173
- # contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `
5174
- # Environment ID` is not specified, we assume default 'draft' environment. If `
5175
- # User ID` is not specified, we assume default '-' user. The following context
5176
- # names are reserved for internal use by Dialogflow. You should not use these
5177
- # contexts or create contexts with these names: * `__system_counters__` * `*
5178
- # _id_dialog_context` * `*_dialog_params_size`
5575
+ # Custom SIP headers. See the [description of headers in the RFC](https://tools.
5576
+ # ietf.org/html/rfc3261#section-7.3).
5577
+ # Corresponds to the JSON property `customHeaders`
5578
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2CallMatcherCustomHeaders]
5579
+ attr_accessor :custom_headers
5580
+
5581
+ # Value of the [`From` header](https://tools.ietf.org/html/rfc3261#section-8.1.1.
5582
+ # 3) to match. If empty or unspecified, we don't match to the [`From` header](
5583
+ # https://tools.ietf.org/html/rfc3261#section-8.1.1.3).
5584
+ # Corresponds to the JSON property `fromHeader`
5585
+ # @return [String]
5586
+ attr_accessor :from_header
5587
+
5588
+ # Output only. The unique identifier of this call matcher. Format: `projects//
5589
+ # locations//conversations//callMatchers/`.
5179
5590
  # Corresponds to the JSON property `name`
5180
5591
  # @return [String]
5181
5592
  attr_accessor :name
5182
5593
 
5183
- # Optional. The collection of parameters associated with this context. Depending
5184
- # on your protocol or client library language, this is a map, associative array,
5185
- # symbol table, dictionary, or JSON object composed of a collection of (MapKey,
5186
- # MapValue) pairs: - MapKey type: string - MapKey value: parameter name -
5187
- # MapValue type: - If parameter's entity type is a composite entity: map - Else:
5188
- # depending on parameter value type, could be one of string, number, boolean,
5189
- # null, list or map - MapValue value: - If parameter's entity type is a
5190
- # composite entity: map from composite entity property names to property values -
5191
- # Else: parameter value
5192
- # Corresponds to the JSON property `parameters`
5193
- # @return [Hash<String,Object>]
5194
- attr_accessor :parameters
5594
+ # Value of the [`To` header](https://tools.ietf.org/html/rfc3261#section-8.1.1.2)
5595
+ # to match. If empty or unspecified, we don't match to the [`To` header](https:/
5596
+ # /tools.ietf.org/html/rfc3261#section-8.1.1.2).
5597
+ # Corresponds to the JSON property `toHeader`
5598
+ # @return [String]
5599
+ attr_accessor :to_header
5600
+
5601
+ def initialize(**args)
5602
+ update!(**args)
5603
+ end
5604
+
5605
+ # Update properties of this object
5606
+ def update!(**args)
5607
+ @call_id_header = args[:call_id_header] if args.key?(:call_id_header)
5608
+ @custom_headers = args[:custom_headers] if args.key?(:custom_headers)
5609
+ @from_header = args[:from_header] if args.key?(:from_header)
5610
+ @name = args[:name] if args.key?(:name)
5611
+ @to_header = args[:to_header] if args.key?(:to_header)
5612
+ end
5613
+ end
5614
+
5615
+ # Custom SIP headers. See the [description of headers in the RFC](https://tools.
5616
+ # ietf.org/html/rfc3261#section-7.3).
5617
+ class GoogleCloudDialogflowV2CallMatcherCustomHeaders
5618
+ include Google::Apis::Core::Hashable
5619
+
5620
+ # Cisco's proprietary `Cisco-Guid` header.
5621
+ # Corresponds to the JSON property `ciscoGuid`
5622
+ # @return [String]
5623
+ attr_accessor :cisco_guid
5624
+
5625
+ def initialize(**args)
5626
+ update!(**args)
5627
+ end
5628
+
5629
+ # Update properties of this object
5630
+ def update!(**args)
5631
+ @cisco_guid = args[:cisco_guid] if args.key?(:cisco_guid)
5632
+ end
5633
+ end
5634
+
5635
+ # The request message for Conversations.CompleteConversation.
5636
+ class GoogleCloudDialogflowV2CompleteConversationRequest
5637
+ include Google::Apis::Core::Hashable
5638
+
5639
+ def initialize(**args)
5640
+ update!(**args)
5641
+ end
5642
+
5643
+ # Update properties of this object
5644
+ def update!(**args)
5645
+ end
5646
+ end
5647
+
5648
+ # Dialogflow contexts are similar to natural language context. If a person says
5649
+ # to you "they are orange", you need context in order to understand what "they"
5650
+ # is referring to. Similarly, for Dialogflow to handle an end-user expression
5651
+ # like that, it needs to be provided with context in order to correctly match an
5652
+ # intent. Using contexts, you can control the flow of a conversation. You can
5653
+ # configure contexts for an intent by setting input and output contexts, which
5654
+ # are identified by string names. When an intent is matched, any configured
5655
+ # output contexts for that intent become active. While any contexts are active,
5656
+ # Dialogflow is more likely to match intents that are configured with input
5657
+ # contexts that correspond to the currently active contexts. For more
5658
+ # information about context, see the [Contexts guide](https://cloud.google.com/
5659
+ # dialogflow/docs/contexts-overview).
5660
+ class GoogleCloudDialogflowV2Context
5661
+ include Google::Apis::Core::Hashable
5662
+
5663
+ # Optional. The number of conversational query requests after which the context
5664
+ # expires. The default is `0`. If set to `0`, the context expires immediately.
5665
+ # Contexts expire automatically after 20 minutes if there are no matching
5666
+ # queries.
5667
+ # Corresponds to the JSON property `lifespanCount`
5668
+ # @return [Fixnum]
5669
+ attr_accessor :lifespan_count
5670
+
5671
+ # Required. The unique identifier of the context. Format: `projects//agent/
5672
+ # sessions//contexts/`, or `projects//agent/environments//users//sessions//
5673
+ # contexts/`. The `Context ID` is always converted to lowercase, may only
5674
+ # contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `
5675
+ # Environment ID` is not specified, we assume default 'draft' environment. If `
5676
+ # User ID` is not specified, we assume default '-' user. The following context
5677
+ # names are reserved for internal use by Dialogflow. You should not use these
5678
+ # contexts or create contexts with these names: * `__system_counters__` * `*
5679
+ # _id_dialog_context` * `*_dialog_params_size`
5680
+ # Corresponds to the JSON property `name`
5681
+ # @return [String]
5682
+ attr_accessor :name
5683
+
5684
+ # Optional. The collection of parameters associated with this context. Depending
5685
+ # on your protocol or client library language, this is a map, associative array,
5686
+ # symbol table, dictionary, or JSON object composed of a collection of (MapKey,
5687
+ # MapValue) pairs: - MapKey type: string - MapKey value: parameter name -
5688
+ # MapValue type: - If parameter's entity type is a composite entity: map - Else:
5689
+ # depending on parameter value type, could be one of string, number, boolean,
5690
+ # null, list or map - MapValue value: - If parameter's entity type is a
5691
+ # composite entity: map from composite entity property names to property values -
5692
+ # Else: parameter value
5693
+ # Corresponds to the JSON property `parameters`
5694
+ # @return [Hash<String,Object>]
5695
+ attr_accessor :parameters
5195
5696
 
5196
5697
  def initialize(**args)
5197
5698
  update!(**args)
@@ -5205,6 +5706,75 @@ module Google
5205
5706
  end
5206
5707
  end
5207
5708
 
5709
+ # Represents a conversation. A conversation is an interaction between an agent,
5710
+ # including live agents and Dialogflow agents, and a support customer.
5711
+ # Conversations can include phone calls and text-based chat sessions.
5712
+ class GoogleCloudDialogflowV2Conversation
5713
+ include Google::Apis::Core::Hashable
5714
+
5715
+ # Required. The Conversation Profile to be used to configure this Conversation.
5716
+ # This field cannot be updated. Format: `projects//locations//
5717
+ # conversationProfiles/`.
5718
+ # Corresponds to the JSON property `conversationProfile`
5719
+ # @return [String]
5720
+ attr_accessor :conversation_profile
5721
+
5722
+ # The stage of a conversation. It indicates whether the virtual agent or a human
5723
+ # agent is handling the conversation. If the conversation is created with the
5724
+ # conversation profile that has Dialogflow config set, defaults to
5725
+ # ConversationStage.VIRTUAL_AGENT_STAGE; Otherwise, defaults to
5726
+ # ConversationStage.HUMAN_ASSIST_STAGE. If the conversation is created with the
5727
+ # conversation profile that has Dialogflow config set but explicitly sets
5728
+ # conversation_stage to ConversationStage.HUMAN_ASSIST_STAGE, it skips
5729
+ # ConversationStage.VIRTUAL_AGENT_STAGE stage and directly goes to
5730
+ # ConversationStage.HUMAN_ASSIST_STAGE.
5731
+ # Corresponds to the JSON property `conversationStage`
5732
+ # @return [String]
5733
+ attr_accessor :conversation_stage
5734
+
5735
+ # Output only. The time the conversation was finished.
5736
+ # Corresponds to the JSON property `endTime`
5737
+ # @return [String]
5738
+ attr_accessor :end_time
5739
+
5740
+ # Output only. The current state of the Conversation.
5741
+ # Corresponds to the JSON property `lifecycleState`
5742
+ # @return [String]
5743
+ attr_accessor :lifecycle_state
5744
+
5745
+ # Output only. The unique identifier of this conversation. Format: `projects//
5746
+ # locations//conversations/`.
5747
+ # Corresponds to the JSON property `name`
5748
+ # @return [String]
5749
+ attr_accessor :name
5750
+
5751
+ # Represents a phone number for telephony integration. It allows for connecting
5752
+ # a particular conversation over telephony.
5753
+ # Corresponds to the JSON property `phoneNumber`
5754
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ConversationPhoneNumber]
5755
+ attr_accessor :phone_number
5756
+
5757
+ # Output only. The time the conversation was started.
5758
+ # Corresponds to the JSON property `startTime`
5759
+ # @return [String]
5760
+ attr_accessor :start_time
5761
+
5762
+ def initialize(**args)
5763
+ update!(**args)
5764
+ end
5765
+
5766
+ # Update properties of this object
5767
+ def update!(**args)
5768
+ @conversation_profile = args[:conversation_profile] if args.key?(:conversation_profile)
5769
+ @conversation_stage = args[:conversation_stage] if args.key?(:conversation_stage)
5770
+ @end_time = args[:end_time] if args.key?(:end_time)
5771
+ @lifecycle_state = args[:lifecycle_state] if args.key?(:lifecycle_state)
5772
+ @name = args[:name] if args.key?(:name)
5773
+ @phone_number = args[:phone_number] if args.key?(:phone_number)
5774
+ @start_time = args[:start_time] if args.key?(:start_time)
5775
+ end
5776
+ end
5777
+
5208
5778
  # Represents a notification sent to Pub/Sub subscribers for conversation
5209
5779
  # lifecycle events.
5210
5780
  class GoogleCloudDialogflowV2ConversationEvent
@@ -5249,6 +5819,147 @@ module Google
5249
5819
  end
5250
5820
  end
5251
5821
 
5822
+ # Represents a phone number for telephony integration. It allows for connecting
5823
+ # a particular conversation over telephony.
5824
+ class GoogleCloudDialogflowV2ConversationPhoneNumber
5825
+ include Google::Apis::Core::Hashable
5826
+
5827
+ # Output only. The phone number to connect to this conversation.
5828
+ # Corresponds to the JSON property `phoneNumber`
5829
+ # @return [String]
5830
+ attr_accessor :phone_number
5831
+
5832
+ def initialize(**args)
5833
+ update!(**args)
5834
+ end
5835
+
5836
+ # Update properties of this object
5837
+ def update!(**args)
5838
+ @phone_number = args[:phone_number] if args.key?(:phone_number)
5839
+ end
5840
+ end
5841
+
5842
+ # Defines the services to connect to incoming Dialogflow conversations.
5843
+ class GoogleCloudDialogflowV2ConversationProfile
5844
+ include Google::Apis::Core::Hashable
5845
+
5846
+ # Defines the Automated Agent to connect to a conversation.
5847
+ # Corresponds to the JSON property `automatedAgentConfig`
5848
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2AutomatedAgentConfig]
5849
+ attr_accessor :automated_agent_config
5850
+
5851
+ # Output only. Create time of the conversation profile.
5852
+ # Corresponds to the JSON property `createTime`
5853
+ # @return [String]
5854
+ attr_accessor :create_time
5855
+
5856
+ # Required. Human readable name for this profile. Max length 1024 bytes.
5857
+ # Corresponds to the JSON property `displayName`
5858
+ # @return [String]
5859
+ attr_accessor :display_name
5860
+
5861
+ # Defines the Human Agent Assist to connect to a conversation.
5862
+ # Corresponds to the JSON property `humanAgentAssistantConfig`
5863
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentAssistantConfig]
5864
+ attr_accessor :human_agent_assistant_config
5865
+
5866
+ # Defines the hand off to a live agent, typically on which external agent
5867
+ # service provider to connect to a conversation.
5868
+ # Corresponds to the JSON property `humanAgentHandoffConfig`
5869
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentHandoffConfig]
5870
+ attr_accessor :human_agent_handoff_config
5871
+
5872
+ # Language which represents the conversationProfile. If unspecified, the default
5873
+ # language code en-us applies. Users need to create a ConversationProfile for
5874
+ # each language they want to support.
5875
+ # Corresponds to the JSON property `languageCode`
5876
+ # @return [String]
5877
+ attr_accessor :language_code
5878
+
5879
+ # Defines logging behavior for conversation lifecycle events.
5880
+ # Corresponds to the JSON property `loggingConfig`
5881
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2LoggingConfig]
5882
+ attr_accessor :logging_config
5883
+
5884
+ # Optional. The unique identifier of this conversation profile. Format: `
5885
+ # projects//locations//conversationProfiles/`.
5886
+ # Corresponds to the JSON property `name`
5887
+ # @return [String]
5888
+ attr_accessor :name
5889
+
5890
+ # Defines notification behavior.
5891
+ # Corresponds to the JSON property `newMessageEventNotificationConfig`
5892
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2NotificationConfig]
5893
+ attr_accessor :new_message_event_notification_config
5894
+
5895
+ # Defines notification behavior.
5896
+ # Corresponds to the JSON property `notificationConfig`
5897
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2NotificationConfig]
5898
+ attr_accessor :notification_config
5899
+
5900
+ # Configures speech transcription for ConversationProfile.
5901
+ # Corresponds to the JSON property `sttConfig`
5902
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SpeechToTextConfig]
5903
+ attr_accessor :stt_config
5904
+
5905
+ # Output only. Update time of the conversation profile.
5906
+ # Corresponds to the JSON property `updateTime`
5907
+ # @return [String]
5908
+ attr_accessor :update_time
5909
+
5910
+ def initialize(**args)
5911
+ update!(**args)
5912
+ end
5913
+
5914
+ # Update properties of this object
5915
+ def update!(**args)
5916
+ @automated_agent_config = args[:automated_agent_config] if args.key?(:automated_agent_config)
5917
+ @create_time = args[:create_time] if args.key?(:create_time)
5918
+ @display_name = args[:display_name] if args.key?(:display_name)
5919
+ @human_agent_assistant_config = args[:human_agent_assistant_config] if args.key?(:human_agent_assistant_config)
5920
+ @human_agent_handoff_config = args[:human_agent_handoff_config] if args.key?(:human_agent_handoff_config)
5921
+ @language_code = args[:language_code] if args.key?(:language_code)
5922
+ @logging_config = args[:logging_config] if args.key?(:logging_config)
5923
+ @name = args[:name] if args.key?(:name)
5924
+ @new_message_event_notification_config = args[:new_message_event_notification_config] if args.key?(:new_message_event_notification_config)
5925
+ @notification_config = args[:notification_config] if args.key?(:notification_config)
5926
+ @stt_config = args[:stt_config] if args.key?(:stt_config)
5927
+ @update_time = args[:update_time] if args.key?(:update_time)
5928
+ end
5929
+ end
5930
+
5931
+ # The request message for Conversations.CreateCallMatcher.
5932
+ class GoogleCloudDialogflowV2CreateCallMatcherRequest
5933
+ include Google::Apis::Core::Hashable
5934
+
5935
+ # Represents a call matcher that describes criteria for matching incoming SIP
5936
+ # calls to a conversation. When Dialogflow get a SIP call from a third-party
5937
+ # carrier, Dialogflow matches the call to an existing conversation by either: *
5938
+ # Extracting the conversation id from the [Call-Info header](https://tools.ietf.
5939
+ # org/html/rfc3261#section-20.9), e.g. `Call-Info: ;purpose=Goog-ContactCenter-
5940
+ # Conversation`. * Or, if that doesn't work, matching incoming [SIP headers](
5941
+ # https://tools.ietf.org/html/rfc3261#section-7.3) against any CallMatcher for
5942
+ # the conversation. If an incoming SIP call without valid `Call-Info` header
5943
+ # matches to zero or multiple conversations with `CallMatcher`, we reject it. A
5944
+ # call matcher contains equality conditions for SIP headers that all have to be
5945
+ # fulfilled in order for a SIP call to match. The matched SIP headers consist of
5946
+ # well-known headers (`To`, `From`, `Call-ID`) and custom headers. A CallMatcher
5947
+ # is only valid if it specifies: * At least 1 custom header, * or at least 2
5948
+ # well-known headers.
5949
+ # Corresponds to the JSON property `callMatcher`
5950
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2CallMatcher]
5951
+ attr_accessor :call_matcher
5952
+
5953
+ def initialize(**args)
5954
+ update!(**args)
5955
+ end
5956
+
5957
+ # Update properties of this object
5958
+ def update!(**args)
5959
+ @call_matcher = args[:call_matcher] if args.key?(:call_matcher)
5960
+ end
5961
+ end
5962
+
5252
5963
  # The request to detect user's intent.
5253
5964
  class GoogleCloudDialogflowV2DetectIntentRequest
5254
5965
  include Google::Apis::Core::Hashable
@@ -5362,74 +6073,118 @@ module Google
5362
6073
  end
5363
6074
  end
5364
6075
 
5365
- # Each intent parameter has a type, called the entity type, which dictates
5366
- # exactly how data from an end-user expression is extracted. Dialogflow provides
5367
- # predefined system entities that can match many common types of data. For
5368
- # example, there are system entities for matching dates, times, colors, email
5369
- # addresses, and so on. You can also create your own custom entities for
5370
- # matching custom data. For example, you could define a vegetable entity that
5371
- # can match the types of vegetables available for purchase with a grocery store
5372
- # agent. For more information, see the [Entity guide](https://cloud.google.com/
5373
- # dialogflow/docs/entities-overview).
5374
- class GoogleCloudDialogflowV2EntityType
6076
+ # A knowledge document to be used by a KnowledgeBase. For more information, see
6077
+ # the [knowledge base guide](https://cloud.google.com/dialogflow/docs/how/
6078
+ # knowledge-bases). Note: The `projects.agent.knowledgeBases.documents` resource
6079
+ # is deprecated; only use `projects.knowledgeBases.documents`.
6080
+ class GoogleCloudDialogflowV2Document
5375
6081
  include Google::Apis::Core::Hashable
5376
6082
 
5377
- # Optional. Indicates whether the entity type can be automatically expanded.
5378
- # Corresponds to the JSON property `autoExpansionMode`
6083
+ # The URI where the file content is located. For documents stored in Google
6084
+ # Cloud Storage, these URIs must have the form `gs:///`. NOTE: External URLs
6085
+ # must correspond to public webpages, i.e., they must be indexed by Google
6086
+ # Search. In particular, URLs for showing documents in Google Cloud Storage (i.e.
6087
+ # the URL in your browser) are not supported. Instead use the `gs://` format
6088
+ # URI described above.
6089
+ # Corresponds to the JSON property `contentUri`
5379
6090
  # @return [String]
5380
- attr_accessor :auto_expansion_mode
6091
+ attr_accessor :content_uri
5381
6092
 
5382
- # Required. The name of the entity type.
6093
+ # Required. The display name of the document. The name must be 1024 bytes or
6094
+ # less; otherwise, the creation request fails.
5383
6095
  # Corresponds to the JSON property `displayName`
5384
6096
  # @return [String]
5385
6097
  attr_accessor :display_name
5386
6098
 
5387
- # Optional. Enables fuzzy entity extraction during classification.
5388
- # Corresponds to the JSON property `enableFuzzyExtraction`
6099
+ # Optional. If true, we try to automatically reload the document every day (at a
6100
+ # time picked by the system). If false or unspecified, we don't try to
6101
+ # automatically reload the document. Currently you can only enable automatic
6102
+ # reload for documents sourced from a public url, see `source` field for the
6103
+ # source types. Reload status can be tracked in `latest_reload_status`. If a
6104
+ # reload fails, we will keep the document unchanged. If a reload fails with
6105
+ # internal errors, the system will try to reload the document on the next day.
6106
+ # If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the
6107
+ # system will not try to reload the document anymore. You need to manually
6108
+ # reload the document successfully by calling `ReloadDocument` and clear the
6109
+ # errors.
6110
+ # Corresponds to the JSON property `enableAutoReload`
5389
6111
  # @return [Boolean]
5390
- attr_accessor :enable_fuzzy_extraction
5391
- alias_method :enable_fuzzy_extraction?, :enable_fuzzy_extraction
6112
+ attr_accessor :enable_auto_reload
6113
+ alias_method :enable_auto_reload?, :enable_auto_reload
5392
6114
 
5393
- # Optional. The collection of entity entries associated with the entity type.
5394
- # Corresponds to the JSON property `entities`
5395
- # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityTypeEntity>]
5396
- attr_accessor :entities
6115
+ # Required. The knowledge type of document content.
6116
+ # Corresponds to the JSON property `knowledgeTypes`
6117
+ # @return [Array<String>]
6118
+ attr_accessor :knowledge_types
5397
6119
 
5398
- # Required. Indicates the kind of entity type.
5399
- # Corresponds to the JSON property `kind`
6120
+ # The status of a reload attempt.
6121
+ # Corresponds to the JSON property `latestReloadStatus`
6122
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2DocumentReloadStatus]
6123
+ attr_accessor :latest_reload_status
6124
+
6125
+ # Optional. Metadata for the document. The metadata supports arbitrary key-value
6126
+ # pairs. Suggested use cases include storing a document's title, an external URL
6127
+ # distinct from the document's content_uri, etc. The max size of a `key` or a `
6128
+ # value` of the metadata is 1024 bytes.
6129
+ # Corresponds to the JSON property `metadata`
6130
+ # @return [Hash<String,String>]
6131
+ attr_accessor :metadata
6132
+
6133
+ # Required. The MIME type of this document.
6134
+ # Corresponds to the JSON property `mimeType`
5400
6135
  # @return [String]
5401
- attr_accessor :kind
6136
+ attr_accessor :mime_type
5402
6137
 
5403
- # The unique identifier of the entity type. Required for EntityTypes.
5404
- # UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Format: `
5405
- # projects//agent/entityTypes/`.
6138
+ # Optional. The document resource name. The name must be empty when creating a
6139
+ # document. Format: `projects//locations//knowledgeBases//documents/`.
5406
6140
  # Corresponds to the JSON property `name`
5407
6141
  # @return [String]
5408
6142
  attr_accessor :name
5409
6143
 
6144
+ # The raw content of the document. This field is only permitted for
6145
+ # EXTRACTIVE_QA and FAQ knowledge types.
6146
+ # Corresponds to the JSON property `rawContent`
6147
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
6148
+ # @return [String]
6149
+ attr_accessor :raw_content
6150
+
5410
6151
  def initialize(**args)
5411
6152
  update!(**args)
5412
6153
  end
5413
6154
 
5414
6155
  # Update properties of this object
5415
6156
  def update!(**args)
5416
- @auto_expansion_mode = args[:auto_expansion_mode] if args.key?(:auto_expansion_mode)
6157
+ @content_uri = args[:content_uri] if args.key?(:content_uri)
5417
6158
  @display_name = args[:display_name] if args.key?(:display_name)
5418
- @enable_fuzzy_extraction = args[:enable_fuzzy_extraction] if args.key?(:enable_fuzzy_extraction)
5419
- @entities = args[:entities] if args.key?(:entities)
5420
- @kind = args[:kind] if args.key?(:kind)
6159
+ @enable_auto_reload = args[:enable_auto_reload] if args.key?(:enable_auto_reload)
6160
+ @knowledge_types = args[:knowledge_types] if args.key?(:knowledge_types)
6161
+ @latest_reload_status = args[:latest_reload_status] if args.key?(:latest_reload_status)
6162
+ @metadata = args[:metadata] if args.key?(:metadata)
6163
+ @mime_type = args[:mime_type] if args.key?(:mime_type)
5421
6164
  @name = args[:name] if args.key?(:name)
6165
+ @raw_content = args[:raw_content] if args.key?(:raw_content)
5422
6166
  end
5423
6167
  end
5424
6168
 
5425
- # This message is a wrapper around a collection of entity types.
5426
- class GoogleCloudDialogflowV2EntityTypeBatch
6169
+ # The status of a reload attempt.
6170
+ class GoogleCloudDialogflowV2DocumentReloadStatus
5427
6171
  include Google::Apis::Core::Hashable
5428
6172
 
5429
- # A collection of entity types.
5430
- # Corresponds to the JSON property `entityTypes`
5431
- # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityType>]
5432
- attr_accessor :entity_types
6173
+ # The `Status` type defines a logical error model that is suitable for different
6174
+ # programming environments, including REST APIs and RPC APIs. It is used by [
6175
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
6176
+ # data: error code, error message, and error details. You can find out more
6177
+ # about this error model and how to work with it in the [API Design Guide](https:
6178
+ # //cloud.google.com/apis/design/errors).
6179
+ # Corresponds to the JSON property `status`
6180
+ # @return [Google::Apis::DialogflowV2::GoogleRpcStatus]
6181
+ attr_accessor :status
6182
+
6183
+ # The time of a reload attempt. This reload may have been triggered
6184
+ # automatically or manually and may not have succeeded.
6185
+ # Corresponds to the JSON property `time`
6186
+ # @return [String]
6187
+ attr_accessor :time
5433
6188
 
5434
6189
  def initialize(**args)
5435
6190
  update!(**args)
@@ -5437,21 +6192,121 @@ module Google
5437
6192
 
5438
6193
  # Update properties of this object
5439
6194
  def update!(**args)
5440
- @entity_types = args[:entity_types] if args.key?(:entity_types)
6195
+ @status = args[:status] if args.key?(:status)
6196
+ @time = args[:time] if args.key?(:time)
5441
6197
  end
5442
6198
  end
5443
6199
 
5444
- # An **entity entry** for an associated entity type.
5445
- class GoogleCloudDialogflowV2EntityTypeEntity
6200
+ # The message in the response that indicates the parameters of DTMF.
6201
+ class GoogleCloudDialogflowV2DtmfParameters
5446
6202
  include Google::Apis::Core::Hashable
5447
6203
 
5448
- # Required. A collection of value synonyms. For example, if the entity type is *
5449
- # vegetable*, and `value` is *scallions*, a synonym could be *green onions*. For
5450
- # `KIND_LIST` entity types: * This collection must contain exactly one synonym
5451
- # equal to `value`.
5452
- # Corresponds to the JSON property `synonyms`
5453
- # @return [Array<String>]
5454
- attr_accessor :synonyms
6204
+ # Indicates whether DTMF input can be handled in the next request.
6205
+ # Corresponds to the JSON property `acceptsDtmfInput`
6206
+ # @return [Boolean]
6207
+ attr_accessor :accepts_dtmf_input
6208
+ alias_method :accepts_dtmf_input?, :accepts_dtmf_input
6209
+
6210
+ def initialize(**args)
6211
+ update!(**args)
6212
+ end
6213
+
6214
+ # Update properties of this object
6215
+ def update!(**args)
6216
+ @accepts_dtmf_input = args[:accepts_dtmf_input] if args.key?(:accepts_dtmf_input)
6217
+ end
6218
+ end
6219
+
6220
+ # Each intent parameter has a type, called the entity type, which dictates
6221
+ # exactly how data from an end-user expression is extracted. Dialogflow provides
6222
+ # predefined system entities that can match many common types of data. For
6223
+ # example, there are system entities for matching dates, times, colors, email
6224
+ # addresses, and so on. You can also create your own custom entities for
6225
+ # matching custom data. For example, you could define a vegetable entity that
6226
+ # can match the types of vegetables available for purchase with a grocery store
6227
+ # agent. For more information, see the [Entity guide](https://cloud.google.com/
6228
+ # dialogflow/docs/entities-overview).
6229
+ class GoogleCloudDialogflowV2EntityType
6230
+ include Google::Apis::Core::Hashable
6231
+
6232
+ # Optional. Indicates whether the entity type can be automatically expanded.
6233
+ # Corresponds to the JSON property `autoExpansionMode`
6234
+ # @return [String]
6235
+ attr_accessor :auto_expansion_mode
6236
+
6237
+ # Required. The name of the entity type.
6238
+ # Corresponds to the JSON property `displayName`
6239
+ # @return [String]
6240
+ attr_accessor :display_name
6241
+
6242
+ # Optional. Enables fuzzy entity extraction during classification.
6243
+ # Corresponds to the JSON property `enableFuzzyExtraction`
6244
+ # @return [Boolean]
6245
+ attr_accessor :enable_fuzzy_extraction
6246
+ alias_method :enable_fuzzy_extraction?, :enable_fuzzy_extraction
6247
+
6248
+ # Optional. The collection of entity entries associated with the entity type.
6249
+ # Corresponds to the JSON property `entities`
6250
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityTypeEntity>]
6251
+ attr_accessor :entities
6252
+
6253
+ # Required. Indicates the kind of entity type.
6254
+ # Corresponds to the JSON property `kind`
6255
+ # @return [String]
6256
+ attr_accessor :kind
6257
+
6258
+ # The unique identifier of the entity type. Required for EntityTypes.
6259
+ # UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Format: `
6260
+ # projects//agent/entityTypes/`.
6261
+ # Corresponds to the JSON property `name`
6262
+ # @return [String]
6263
+ attr_accessor :name
6264
+
6265
+ def initialize(**args)
6266
+ update!(**args)
6267
+ end
6268
+
6269
+ # Update properties of this object
6270
+ def update!(**args)
6271
+ @auto_expansion_mode = args[:auto_expansion_mode] if args.key?(:auto_expansion_mode)
6272
+ @display_name = args[:display_name] if args.key?(:display_name)
6273
+ @enable_fuzzy_extraction = args[:enable_fuzzy_extraction] if args.key?(:enable_fuzzy_extraction)
6274
+ @entities = args[:entities] if args.key?(:entities)
6275
+ @kind = args[:kind] if args.key?(:kind)
6276
+ @name = args[:name] if args.key?(:name)
6277
+ end
6278
+ end
6279
+
6280
+ # This message is a wrapper around a collection of entity types.
6281
+ class GoogleCloudDialogflowV2EntityTypeBatch
6282
+ include Google::Apis::Core::Hashable
6283
+
6284
+ # A collection of entity types.
6285
+ # Corresponds to the JSON property `entityTypes`
6286
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityType>]
6287
+ attr_accessor :entity_types
6288
+
6289
+ def initialize(**args)
6290
+ update!(**args)
6291
+ end
6292
+
6293
+ # Update properties of this object
6294
+ def update!(**args)
6295
+ @entity_types = args[:entity_types] if args.key?(:entity_types)
6296
+ end
6297
+ end
6298
+
6299
+ # An **entity entry** for an associated entity type.
6300
+ class GoogleCloudDialogflowV2EntityTypeEntity
6301
+ include Google::Apis::Core::Hashable
6302
+
6303
+ # Required. A collection of value synonyms. For example, if the entity type is *
6304
+ # vegetable*, and `value` is *scallions*, a synonym could be *green onions*. For
6305
+ # `KIND_LIST` entity types: * This collection must contain exactly one synonym
6306
+ # equal to `value`.
6307
+ # Corresponds to the JSON property `synonyms`
6308
+ # @return [Array<String>]
6309
+ attr_accessor :synonyms
5455
6310
 
5456
6311
  # Required. The primary value associated with this entity entry. For example, if
5457
6312
  # the entity type is *vegetable*, the value could be *scallions*. For `KIND_MAP`
@@ -5623,6 +6478,60 @@ module Google
5623
6478
  end
5624
6479
  end
5625
6480
 
6481
+ # Represents answer from "frequently asked questions".
6482
+ class GoogleCloudDialogflowV2FaqAnswer
6483
+ include Google::Apis::Core::Hashable
6484
+
6485
+ # The piece of text from the `source` knowledge base document.
6486
+ # Corresponds to the JSON property `answer`
6487
+ # @return [String]
6488
+ attr_accessor :answer
6489
+
6490
+ # The name of answer record, in the format of "projects//locations//
6491
+ # answerRecords/"
6492
+ # Corresponds to the JSON property `answerRecord`
6493
+ # @return [String]
6494
+ attr_accessor :answer_record
6495
+
6496
+ # The system's confidence score that this Knowledge answer is a good match for
6497
+ # this conversational query, range from 0.0 (completely uncertain) to 1.0 (
6498
+ # completely certain).
6499
+ # Corresponds to the JSON property `confidence`
6500
+ # @return [Float]
6501
+ attr_accessor :confidence
6502
+
6503
+ # A map that contains metadata about the answer and the document from which it
6504
+ # originates.
6505
+ # Corresponds to the JSON property `metadata`
6506
+ # @return [Hash<String,String>]
6507
+ attr_accessor :metadata
6508
+
6509
+ # The corresponding FAQ question.
6510
+ # Corresponds to the JSON property `question`
6511
+ # @return [String]
6512
+ attr_accessor :question
6513
+
6514
+ # Indicates which Knowledge Document this answer was extracted from. Format: `
6515
+ # projects//locations//agent/knowledgeBases//documents/`.
6516
+ # Corresponds to the JSON property `source`
6517
+ # @return [String]
6518
+ attr_accessor :source
6519
+
6520
+ def initialize(**args)
6521
+ update!(**args)
6522
+ end
6523
+
6524
+ # Update properties of this object
6525
+ def update!(**args)
6526
+ @answer = args[:answer] if args.key?(:answer)
6527
+ @answer_record = args[:answer_record] if args.key?(:answer_record)
6528
+ @confidence = args[:confidence] if args.key?(:confidence)
6529
+ @metadata = args[:metadata] if args.key?(:metadata)
6530
+ @question = args[:question] if args.key?(:question)
6531
+ @source = args[:source] if args.key?(:source)
6532
+ end
6533
+ end
6534
+
5626
6535
  # By default, your agent responds to a matched intent with a static response. As
5627
6536
  # an alternative, you can provide a more dynamic response by using fulfillment.
5628
6537
  # When you enable fulfillment for an intent, Dialogflow responds to that intent
@@ -5714,26 +6623,512 @@ module Google
5714
6623
  attr_accessor :is_cloud_function
5715
6624
  alias_method :is_cloud_function?, :is_cloud_function
5716
6625
 
5717
- # Optional. The password for HTTP Basic authentication.
5718
- # Corresponds to the JSON property `password`
6626
+ # Optional. The password for HTTP Basic authentication.
6627
+ # Corresponds to the JSON property `password`
6628
+ # @return [String]
6629
+ attr_accessor :password
6630
+
6631
+ # Optional. The HTTP request headers to send together with fulfillment requests.
6632
+ # Corresponds to the JSON property `requestHeaders`
6633
+ # @return [Hash<String,String>]
6634
+ attr_accessor :request_headers
6635
+
6636
+ # Required. The fulfillment URI for receiving POST requests. It must use https
6637
+ # protocol.
6638
+ # Corresponds to the JSON property `uri`
6639
+ # @return [String]
6640
+ attr_accessor :uri
6641
+
6642
+ # Optional. The user name for HTTP Basic authentication.
6643
+ # Corresponds to the JSON property `username`
6644
+ # @return [String]
6645
+ attr_accessor :username
6646
+
6647
+ def initialize(**args)
6648
+ update!(**args)
6649
+ end
6650
+
6651
+ # Update properties of this object
6652
+ def update!(**args)
6653
+ @is_cloud_function = args[:is_cloud_function] if args.key?(:is_cloud_function)
6654
+ @password = args[:password] if args.key?(:password)
6655
+ @request_headers = args[:request_headers] if args.key?(:request_headers)
6656
+ @uri = args[:uri] if args.key?(:uri)
6657
+ @username = args[:username] if args.key?(:username)
6658
+ end
6659
+ end
6660
+
6661
+ # Defines the Human Agent Assist to connect to a conversation.
6662
+ class GoogleCloudDialogflowV2HumanAgentAssistantConfig
6663
+ include Google::Apis::Core::Hashable
6664
+
6665
+ # Detail human agent assistant config.
6666
+ # Corresponds to the JSON property `endUserSuggestionConfig`
6667
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig]
6668
+ attr_accessor :end_user_suggestion_config
6669
+
6670
+ # Detail human agent assistant config.
6671
+ # Corresponds to the JSON property `humanAgentSuggestionConfig`
6672
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig]
6673
+ attr_accessor :human_agent_suggestion_config
6674
+
6675
+ # Configuration for analyses to run on each conversation message.
6676
+ # Corresponds to the JSON property `messageAnalysisConfig`
6677
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentAssistantConfigMessageAnalysisConfig]
6678
+ attr_accessor :message_analysis_config
6679
+
6680
+ # Defines notification behavior.
6681
+ # Corresponds to the JSON property `notificationConfig`
6682
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2NotificationConfig]
6683
+ attr_accessor :notification_config
6684
+
6685
+ def initialize(**args)
6686
+ update!(**args)
6687
+ end
6688
+
6689
+ # Update properties of this object
6690
+ def update!(**args)
6691
+ @end_user_suggestion_config = args[:end_user_suggestion_config] if args.key?(:end_user_suggestion_config)
6692
+ @human_agent_suggestion_config = args[:human_agent_suggestion_config] if args.key?(:human_agent_suggestion_config)
6693
+ @message_analysis_config = args[:message_analysis_config] if args.key?(:message_analysis_config)
6694
+ @notification_config = args[:notification_config] if args.key?(:notification_config)
6695
+ end
6696
+ end
6697
+
6698
+ # Custom conversation models used in agent assist feature. Supported feature:
6699
+ # ARTICLE_SUGGESTION, SMART_COMPOSE, SMART_REPLY.
6700
+ class GoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig
6701
+ include Google::Apis::Core::Hashable
6702
+
6703
+ # Required. Conversation model resource name. Format: `projects//
6704
+ # conversationModels/`.
6705
+ # Corresponds to the JSON property `model`
6706
+ # @return [String]
6707
+ attr_accessor :model
6708
+
6709
+ def initialize(**args)
6710
+ update!(**args)
6711
+ end
6712
+
6713
+ # Update properties of this object
6714
+ def update!(**args)
6715
+ @model = args[:model] if args.key?(:model)
6716
+ end
6717
+ end
6718
+
6719
+ # Configuration for analyses to run on each conversation message.
6720
+ class GoogleCloudDialogflowV2HumanAgentAssistantConfigMessageAnalysisConfig
6721
+ include Google::Apis::Core::Hashable
6722
+
6723
+ # Enable entity extraction in conversation messages on [agent assist stage](
6724
+ # https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages).
6725
+ # If unspecified, defaults to false.
6726
+ # Corresponds to the JSON property `enableEntityExtraction`
6727
+ # @return [Boolean]
6728
+ attr_accessor :enable_entity_extraction
6729
+ alias_method :enable_entity_extraction?, :enable_entity_extraction
6730
+
6731
+ # Enable sentiment analysis in conversation messages on [agent assist stage](
6732
+ # https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages).
6733
+ # If unspecified, defaults to false. Sentiment analysis inspects user input and
6734
+ # identifies the prevailing subjective opinion, especially to determine a user's
6735
+ # attitude as positive, negative, or neutral: https://cloud.google.com/natural-
6736
+ # language/docs/basics#sentiment_analysis For Participants.
6737
+ # StreamingAnalyzeContent method, result will be in
6738
+ # StreamingAnalyzeContentResponse.message.SentimentAnalysisResult. For
6739
+ # Participants.AnalyzeContent method, result will be in AnalyzeContentResponse.
6740
+ # message.SentimentAnalysisResult For Conversations.ListMessages method, result
6741
+ # will be in ListMessagesResponse.messages.SentimentAnalysisResult If Pub/Sub
6742
+ # notification is configured, result will be in ConversationEvent.
6743
+ # new_message_payload.SentimentAnalysisResult.
6744
+ # Corresponds to the JSON property `enableSentimentAnalysis`
6745
+ # @return [Boolean]
6746
+ attr_accessor :enable_sentiment_analysis
6747
+ alias_method :enable_sentiment_analysis?, :enable_sentiment_analysis
6748
+
6749
+ def initialize(**args)
6750
+ update!(**args)
6751
+ end
6752
+
6753
+ # Update properties of this object
6754
+ def update!(**args)
6755
+ @enable_entity_extraction = args[:enable_entity_extraction] if args.key?(:enable_entity_extraction)
6756
+ @enable_sentiment_analysis = args[:enable_sentiment_analysis] if args.key?(:enable_sentiment_analysis)
6757
+ end
6758
+ end
6759
+
6760
+ # Detail human agent assistant config.
6761
+ class GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig
6762
+ include Google::Apis::Core::Hashable
6763
+
6764
+ # Configuration of different suggestion features. One feature can have only one
6765
+ # config.
6766
+ # Corresponds to the JSON property `featureConfigs`
6767
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig>]
6768
+ attr_accessor :feature_configs
6769
+
6770
+ # If `group_suggestion_responses` is false, and there are multiple `
6771
+ # feature_configs` in `event based suggestion` or StreamingAnalyzeContent, we
6772
+ # will try to deliver suggestions to customers as soon as we get new suggestion.
6773
+ # Different type of suggestions based on the same context will be in separate
6774
+ # Pub/Sub event or `StreamingAnalyzeContentResponse`. If `
6775
+ # group_suggestion_responses` set to true. All the suggestions to the same
6776
+ # participant based on the same context will be grouped into a single Pub/Sub
6777
+ # event or StreamingAnalyzeContentResponse.
6778
+ # Corresponds to the JSON property `groupSuggestionResponses`
6779
+ # @return [Boolean]
6780
+ attr_accessor :group_suggestion_responses
6781
+ alias_method :group_suggestion_responses?, :group_suggestion_responses
6782
+
6783
+ def initialize(**args)
6784
+ update!(**args)
6785
+ end
6786
+
6787
+ # Update properties of this object
6788
+ def update!(**args)
6789
+ @feature_configs = args[:feature_configs] if args.key?(:feature_configs)
6790
+ @group_suggestion_responses = args[:group_suggestion_responses] if args.key?(:group_suggestion_responses)
6791
+ end
6792
+ end
6793
+
6794
+ # Config for suggestion features.
6795
+ class GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig
6796
+ include Google::Apis::Core::Hashable
6797
+
6798
+ # Custom conversation models used in agent assist feature. Supported feature:
6799
+ # ARTICLE_SUGGESTION, SMART_COMPOSE, SMART_REPLY.
6800
+ # Corresponds to the JSON property `conversationModelConfig`
6801
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig]
6802
+ attr_accessor :conversation_model_config
6803
+
6804
+ # Automatically iterates all participants and tries to compile suggestions.
6805
+ # Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST.
6806
+ # Corresponds to the JSON property `enableEventBasedSuggestion`
6807
+ # @return [Boolean]
6808
+ attr_accessor :enable_event_based_suggestion
6809
+ alias_method :enable_event_based_suggestion?, :enable_event_based_suggestion
6810
+
6811
+ # Config for suggestion query.
6812
+ # Corresponds to the JSON property `queryConfig`
6813
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig]
6814
+ attr_accessor :query_config
6815
+
6816
+ # The type of Human Agent Assistant API suggestion to perform, and the maximum
6817
+ # number of results to return for that type. Multiple `Feature` objects can be
6818
+ # specified in the `features` list.
6819
+ # Corresponds to the JSON property `suggestionFeature`
6820
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SuggestionFeature]
6821
+ attr_accessor :suggestion_feature
6822
+
6823
+ # Settings of suggestion trigger.
6824
+ # Corresponds to the JSON property `suggestionTriggerSettings`
6825
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionTriggerSettings]
6826
+ attr_accessor :suggestion_trigger_settings
6827
+
6828
+ def initialize(**args)
6829
+ update!(**args)
6830
+ end
6831
+
6832
+ # Update properties of this object
6833
+ def update!(**args)
6834
+ @conversation_model_config = args[:conversation_model_config] if args.key?(:conversation_model_config)
6835
+ @enable_event_based_suggestion = args[:enable_event_based_suggestion] if args.key?(:enable_event_based_suggestion)
6836
+ @query_config = args[:query_config] if args.key?(:query_config)
6837
+ @suggestion_feature = args[:suggestion_feature] if args.key?(:suggestion_feature)
6838
+ @suggestion_trigger_settings = args[:suggestion_trigger_settings] if args.key?(:suggestion_trigger_settings)
6839
+ end
6840
+ end
6841
+
6842
+ # Config for suggestion query.
6843
+ class GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig
6844
+ include Google::Apis::Core::Hashable
6845
+
6846
+ # Confidence threshold of query result. Agent Assist gives each suggestion a
6847
+ # score in the range [0.0, 1.0], based on the relevance between the suggestion
6848
+ # and the current conversation context. A score of 0.0 has no relevance, while a
6849
+ # score of 1.0 has high relevance. Only suggestions with a score greater than or
6850
+ # equal to the value of this field are included in the results. For a baseline
6851
+ # model (the default), the recommended value is in the range [0.05, 0.1]. For a
6852
+ # custom model, there is no recommended value. Tune this value by starting from
6853
+ # a very low value and slowly increasing until you have desired results. If this
6854
+ # field is not set, it defaults to 0.0, which means that all suggestions are
6855
+ # returned. Supported features: ARTICLE_SUGGESTION.
6856
+ # Corresponds to the JSON property `confidenceThreshold`
6857
+ # @return [Float]
6858
+ attr_accessor :confidence_threshold
6859
+
6860
+ # Settings that determine how to filter recent conversation context when
6861
+ # generating suggestions.
6862
+ # Corresponds to the JSON property `contextFilterSettings`
6863
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings]
6864
+ attr_accessor :context_filter_settings
6865
+
6866
+ # Dialogflow source setting. Supported feature: DIALOGFLOW_ASSIST.
6867
+ # Corresponds to the JSON property `dialogflowQuerySource`
6868
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource]
6869
+ attr_accessor :dialogflow_query_source
6870
+
6871
+ # Document source settings. Supported features: SMART_REPLY, SMART_COMPOSE.
6872
+ # Corresponds to the JSON property `documentQuerySource`
6873
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource]
6874
+ attr_accessor :document_query_source
6875
+
6876
+ # Knowledge base source settings. Supported features: ARTICLE_SUGGESTION, FAQ.
6877
+ # Corresponds to the JSON property `knowledgeBaseQuerySource`
6878
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource]
6879
+ attr_accessor :knowledge_base_query_source
6880
+
6881
+ # Maximum number of results to return. Currently, if unset, defaults to 10. And
6882
+ # the max number is 20.
6883
+ # Corresponds to the JSON property `maxResults`
6884
+ # @return [Fixnum]
6885
+ attr_accessor :max_results
6886
+
6887
+ def initialize(**args)
6888
+ update!(**args)
6889
+ end
6890
+
6891
+ # Update properties of this object
6892
+ def update!(**args)
6893
+ @confidence_threshold = args[:confidence_threshold] if args.key?(:confidence_threshold)
6894
+ @context_filter_settings = args[:context_filter_settings] if args.key?(:context_filter_settings)
6895
+ @dialogflow_query_source = args[:dialogflow_query_source] if args.key?(:dialogflow_query_source)
6896
+ @document_query_source = args[:document_query_source] if args.key?(:document_query_source)
6897
+ @knowledge_base_query_source = args[:knowledge_base_query_source] if args.key?(:knowledge_base_query_source)
6898
+ @max_results = args[:max_results] if args.key?(:max_results)
6899
+ end
6900
+ end
6901
+
6902
+ # Settings that determine how to filter recent conversation context when
6903
+ # generating suggestions.
6904
+ class GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings
6905
+ include Google::Apis::Core::Hashable
6906
+
6907
+ # If set to true, the last message from virtual agent (hand off message) and the
6908
+ # message before it (trigger message of hand off) are dropped.
6909
+ # Corresponds to the JSON property `dropHandoffMessages`
6910
+ # @return [Boolean]
6911
+ attr_accessor :drop_handoff_messages
6912
+ alias_method :drop_handoff_messages?, :drop_handoff_messages
6913
+
6914
+ # If set to true, all messages from ivr stage are dropped.
6915
+ # Corresponds to the JSON property `dropIvrMessages`
6916
+ # @return [Boolean]
6917
+ attr_accessor :drop_ivr_messages
6918
+ alias_method :drop_ivr_messages?, :drop_ivr_messages
6919
+
6920
+ # If set to true, all messages from virtual agent are dropped.
6921
+ # Corresponds to the JSON property `dropVirtualAgentMessages`
6922
+ # @return [Boolean]
6923
+ attr_accessor :drop_virtual_agent_messages
6924
+ alias_method :drop_virtual_agent_messages?, :drop_virtual_agent_messages
6925
+
6926
+ def initialize(**args)
6927
+ update!(**args)
6928
+ end
6929
+
6930
+ # Update properties of this object
6931
+ def update!(**args)
6932
+ @drop_handoff_messages = args[:drop_handoff_messages] if args.key?(:drop_handoff_messages)
6933
+ @drop_ivr_messages = args[:drop_ivr_messages] if args.key?(:drop_ivr_messages)
6934
+ @drop_virtual_agent_messages = args[:drop_virtual_agent_messages] if args.key?(:drop_virtual_agent_messages)
6935
+ end
6936
+ end
6937
+
6938
+ # Dialogflow source setting. Supported feature: DIALOGFLOW_ASSIST.
6939
+ class GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource
6940
+ include Google::Apis::Core::Hashable
6941
+
6942
+ # Required. The name of a Dialogflow virtual agent used for end user side intent
6943
+ # detection and suggestion. Format: `projects//locations//agent`. When multiple
6944
+ # agents are allowed in the same Dialogflow project.
6945
+ # Corresponds to the JSON property `agent`
6946
+ # @return [String]
6947
+ attr_accessor :agent
6948
+
6949
+ def initialize(**args)
6950
+ update!(**args)
6951
+ end
6952
+
6953
+ # Update properties of this object
6954
+ def update!(**args)
6955
+ @agent = args[:agent] if args.key?(:agent)
6956
+ end
6957
+ end
6958
+
6959
+ # Document source settings. Supported features: SMART_REPLY, SMART_COMPOSE.
6960
+ class GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource
6961
+ include Google::Apis::Core::Hashable
6962
+
6963
+ # Required. Knowledge documents to query from. Format: `projects//locations//
6964
+ # knowledgeBases//documents/`. Currently, at most 5 documents are supported.
6965
+ # Corresponds to the JSON property `documents`
6966
+ # @return [Array<String>]
6967
+ attr_accessor :documents
6968
+
6969
+ def initialize(**args)
6970
+ update!(**args)
6971
+ end
6972
+
6973
+ # Update properties of this object
6974
+ def update!(**args)
6975
+ @documents = args[:documents] if args.key?(:documents)
6976
+ end
6977
+ end
6978
+
6979
+ # Knowledge base source settings. Supported features: ARTICLE_SUGGESTION, FAQ.
6980
+ class GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource
6981
+ include Google::Apis::Core::Hashable
6982
+
6983
+ # Required. Knowledge bases to query. Format: `projects//locations//
6984
+ # knowledgeBases/`. Currently, at most 5 knowledge bases are supported.
6985
+ # Corresponds to the JSON property `knowledgeBases`
6986
+ # @return [Array<String>]
6987
+ attr_accessor :knowledge_bases
6988
+
6989
+ def initialize(**args)
6990
+ update!(**args)
6991
+ end
6992
+
6993
+ # Update properties of this object
6994
+ def update!(**args)
6995
+ @knowledge_bases = args[:knowledge_bases] if args.key?(:knowledge_bases)
6996
+ end
6997
+ end
6998
+
6999
+ # Settings of suggestion trigger.
7000
+ class GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionTriggerSettings
7001
+ include Google::Apis::Core::Hashable
7002
+
7003
+ # Do not trigger if last utterance is small talk.
7004
+ # Corresponds to the JSON property `noSmalltalk`
7005
+ # @return [Boolean]
7006
+ attr_accessor :no_smalltalk
7007
+ alias_method :no_smalltalk?, :no_smalltalk
7008
+
7009
+ # Only trigger suggestion if participant role of last utterance is END_USER.
7010
+ # Corresponds to the JSON property `onlyEndUser`
7011
+ # @return [Boolean]
7012
+ attr_accessor :only_end_user
7013
+ alias_method :only_end_user?, :only_end_user
7014
+
7015
+ def initialize(**args)
7016
+ update!(**args)
7017
+ end
7018
+
7019
+ # Update properties of this object
7020
+ def update!(**args)
7021
+ @no_smalltalk = args[:no_smalltalk] if args.key?(:no_smalltalk)
7022
+ @only_end_user = args[:only_end_user] if args.key?(:only_end_user)
7023
+ end
7024
+ end
7025
+
7026
+ # Represents a notification sent to Cloud Pub/Sub subscribers for human agent
7027
+ # assistant events in a specific conversation.
7028
+ class GoogleCloudDialogflowV2HumanAgentAssistantEvent
7029
+ include Google::Apis::Core::Hashable
7030
+
7031
+ # The conversation this notification refers to. Format: `projects//conversations/
7032
+ # `.
7033
+ # Corresponds to the JSON property `conversation`
7034
+ # @return [String]
7035
+ attr_accessor :conversation
7036
+
7037
+ # The participant that the suggestion is compiled for. Format: `projects//
7038
+ # conversations//participants/`. It will not be set in legacy workflow.
7039
+ # Corresponds to the JSON property `participant`
7040
+ # @return [String]
7041
+ attr_accessor :participant
7042
+
7043
+ # The suggestion results payload that this notification refers to.
7044
+ # Corresponds to the JSON property `suggestionResults`
7045
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SuggestionResult>]
7046
+ attr_accessor :suggestion_results
7047
+
7048
+ def initialize(**args)
7049
+ update!(**args)
7050
+ end
7051
+
7052
+ # Update properties of this object
7053
+ def update!(**args)
7054
+ @conversation = args[:conversation] if args.key?(:conversation)
7055
+ @participant = args[:participant] if args.key?(:participant)
7056
+ @suggestion_results = args[:suggestion_results] if args.key?(:suggestion_results)
7057
+ end
7058
+ end
7059
+
7060
+ # Defines the hand off to a live agent, typically on which external agent
7061
+ # service provider to connect to a conversation.
7062
+ class GoogleCloudDialogflowV2HumanAgentHandoffConfig
7063
+ include Google::Apis::Core::Hashable
7064
+
7065
+ # Configuration specific to LivePerson (https://www.liveperson.com).
7066
+ # Corresponds to the JSON property `livePersonConfig`
7067
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentHandoffConfigLivePersonConfig]
7068
+ attr_accessor :live_person_config
7069
+
7070
+ # Configuration specific to Salesforce Live Agent.
7071
+ # Corresponds to the JSON property `salesforceLiveAgentConfig`
7072
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentHandoffConfigSalesforceLiveAgentConfig]
7073
+ attr_accessor :salesforce_live_agent_config
7074
+
7075
+ def initialize(**args)
7076
+ update!(**args)
7077
+ end
7078
+
7079
+ # Update properties of this object
7080
+ def update!(**args)
7081
+ @live_person_config = args[:live_person_config] if args.key?(:live_person_config)
7082
+ @salesforce_live_agent_config = args[:salesforce_live_agent_config] if args.key?(:salesforce_live_agent_config)
7083
+ end
7084
+ end
7085
+
7086
+ # Configuration specific to LivePerson (https://www.liveperson.com).
7087
+ class GoogleCloudDialogflowV2HumanAgentHandoffConfigLivePersonConfig
7088
+ include Google::Apis::Core::Hashable
7089
+
7090
+ # Required. Account number of the LivePerson account to connect. This is the
7091
+ # account number you input at the login page.
7092
+ # Corresponds to the JSON property `accountNumber`
7093
+ # @return [String]
7094
+ attr_accessor :account_number
7095
+
7096
+ def initialize(**args)
7097
+ update!(**args)
7098
+ end
7099
+
7100
+ # Update properties of this object
7101
+ def update!(**args)
7102
+ @account_number = args[:account_number] if args.key?(:account_number)
7103
+ end
7104
+ end
7105
+
7106
+ # Configuration specific to Salesforce Live Agent.
7107
+ class GoogleCloudDialogflowV2HumanAgentHandoffConfigSalesforceLiveAgentConfig
7108
+ include Google::Apis::Core::Hashable
7109
+
7110
+ # Required. Live Agent chat button ID.
7111
+ # Corresponds to the JSON property `buttonId`
5719
7112
  # @return [String]
5720
- attr_accessor :password
7113
+ attr_accessor :button_id
5721
7114
 
5722
- # Optional. The HTTP request headers to send together with fulfillment requests.
5723
- # Corresponds to the JSON property `requestHeaders`
5724
- # @return [Hash<String,String>]
5725
- attr_accessor :request_headers
7115
+ # Required. Live Agent deployment ID.
7116
+ # Corresponds to the JSON property `deploymentId`
7117
+ # @return [String]
7118
+ attr_accessor :deployment_id
5726
7119
 
5727
- # Required. The fulfillment URI for receiving POST requests. It must use https
5728
- # protocol.
5729
- # Corresponds to the JSON property `uri`
7120
+ # Required. Domain of the Live Agent endpoint for this agent. You can find the
7121
+ # endpoint URL in the `Live Agent settings` page. For example if URL has the
7122
+ # form https://d.la4-c2-phx.salesforceliveagent.com/..., you should fill in d.
7123
+ # la4-c2-phx.salesforceliveagent.com.
7124
+ # Corresponds to the JSON property `endpointDomain`
5730
7125
  # @return [String]
5731
- attr_accessor :uri
7126
+ attr_accessor :endpoint_domain
5732
7127
 
5733
- # Optional. The user name for HTTP Basic authentication.
5734
- # Corresponds to the JSON property `username`
7128
+ # Required. The organization ID of the Salesforce account.
7129
+ # Corresponds to the JSON property `organizationId`
5735
7130
  # @return [String]
5736
- attr_accessor :username
7131
+ attr_accessor :organization_id
5737
7132
 
5738
7133
  def initialize(**args)
5739
7134
  update!(**args)
@@ -5741,11 +7136,10 @@ module Google
5741
7136
 
5742
7137
  # Update properties of this object
5743
7138
  def update!(**args)
5744
- @is_cloud_function = args[:is_cloud_function] if args.key?(:is_cloud_function)
5745
- @password = args[:password] if args.key?(:password)
5746
- @request_headers = args[:request_headers] if args.key?(:request_headers)
5747
- @uri = args[:uri] if args.key?(:uri)
5748
- @username = args[:username] if args.key?(:username)
7139
+ @button_id = args[:button_id] if args.key?(:button_id)
7140
+ @deployment_id = args[:deployment_id] if args.key?(:deployment_id)
7141
+ @endpoint_domain = args[:endpoint_domain] if args.key?(:endpoint_domain)
7142
+ @organization_id = args[:organization_id] if args.key?(:organization_id)
5749
7143
  end
5750
7144
  end
5751
7145
 
@@ -5785,6 +7179,14 @@ module Google
5785
7179
  # @return [String]
5786
7180
  attr_accessor :audio_encoding
5787
7181
 
7182
+ # Only used in Participants.AnalyzeContent and Participants.
7183
+ # StreamingAnalyzeContent. If `false` and recognition doesn't return any result,
7184
+ # trigger `NO_SPEECH_RECOGNIZED` event to Dialogflow agent.
7185
+ # Corresponds to the JSON property `disableNoSpeechRecognizedEvent`
7186
+ # @return [Boolean]
7187
+ attr_accessor :disable_no_speech_recognized_event
7188
+ alias_method :disable_no_speech_recognized_event?, :disable_no_speech_recognized_event
7189
+
5788
7190
  # If `true`, Dialogflow returns SpeechWordInfo in StreamingRecognitionResult
5789
7191
  # with information about the recognized speech words, e.g. start and end time
5790
7192
  # offsets. If false or unspecified, Speech doesn't return any word-level
@@ -5864,6 +7266,7 @@ module Google
5864
7266
  # Update properties of this object
5865
7267
  def update!(**args)
5866
7268
  @audio_encoding = args[:audio_encoding] if args.key?(:audio_encoding)
7269
+ @disable_no_speech_recognized_event = args[:disable_no_speech_recognized_event] if args.key?(:disable_no_speech_recognized_event)
5867
7270
  @enable_word_info = args[:enable_word_info] if args.key?(:enable_word_info)
5868
7271
  @language_code = args[:language_code] if args.key?(:language_code)
5869
7272
  @model = args[:model] if args.key?(:model)
@@ -5902,6 +7305,14 @@ module Google
5902
7305
  # @return [String]
5903
7306
  attr_accessor :display_name
5904
7307
 
7308
+ # Optional. Indicates that this intent ends an interaction. Some integrations (e.
7309
+ # g., Actions on Google or Dialogflow phone gateway) use this information to
7310
+ # close interaction with an end user. Default is false.
7311
+ # Corresponds to the JSON property `endInteraction`
7312
+ # @return [Boolean]
7313
+ attr_accessor :end_interaction
7314
+ alias_method :end_interaction?, :end_interaction
7315
+
5905
7316
  # Optional. The collection of event names that trigger the intent. If the
5906
7317
  # collection of input contexts is not empty, all of the contexts must be present
5907
7318
  # in the active user session for an event to trigger this intent. Event names
@@ -5928,6 +7339,14 @@ module Google
5928
7339
  attr_accessor :is_fallback
5929
7340
  alias_method :is_fallback?, :is_fallback
5930
7341
 
7342
+ # Optional. Indicates that a live agent should be brought in to handle the
7343
+ # interaction with the user. In most cases, when you set this flag to true, you
7344
+ # would also want to set end_interaction to true as well. Default is false.
7345
+ # Corresponds to the JSON property `liveAgentHandoff`
7346
+ # @return [Boolean]
7347
+ attr_accessor :live_agent_handoff
7348
+ alias_method :live_agent_handoff?, :live_agent_handoff
7349
+
5931
7350
  # Optional. The collection of rich messages corresponding to the `Response`
5932
7351
  # field in the Dialogflow console.
5933
7352
  # Corresponds to the JSON property `messages`
@@ -6014,10 +7433,12 @@ module Google
6014
7433
  @action = args[:action] if args.key?(:action)
6015
7434
  @default_response_platforms = args[:default_response_platforms] if args.key?(:default_response_platforms)
6016
7435
  @display_name = args[:display_name] if args.key?(:display_name)
7436
+ @end_interaction = args[:end_interaction] if args.key?(:end_interaction)
6017
7437
  @events = args[:events] if args.key?(:events)
6018
7438
  @followup_intent_info = args[:followup_intent_info] if args.key?(:followup_intent_info)
6019
7439
  @input_context_names = args[:input_context_names] if args.key?(:input_context_names)
6020
7440
  @is_fallback = args[:is_fallback] if args.key?(:is_fallback)
7441
+ @live_agent_handoff = args[:live_agent_handoff] if args.key?(:live_agent_handoff)
6021
7442
  @messages = args[:messages] if args.key?(:messages)
6022
7443
  @ml_disabled = args[:ml_disabled] if args.key?(:ml_disabled)
6023
7444
  @name = args[:name] if args.key?(:name)
@@ -7125,6 +8546,121 @@ module Google
7125
8546
  end
7126
8547
  end
7127
8548
 
8549
+ # A knowledge base represents a collection of knowledge documents that you
8550
+ # provide to Dialogflow. Your knowledge documents contain information that may
8551
+ # be useful during conversations with end-users. Some Dialogflow features use
8552
+ # knowledge bases when looking for a response to an end-user input. For more
8553
+ # information, see the [knowledge base guide](https://cloud.google.com/
8554
+ # dialogflow/docs/how/knowledge-bases). Note: The `projects.agent.knowledgeBases`
8555
+ # resource is deprecated; only use `projects.knowledgeBases`.
8556
+ class GoogleCloudDialogflowV2KnowledgeBase
8557
+ include Google::Apis::Core::Hashable
8558
+
8559
+ # Required. The display name of the knowledge base. The name must be 1024 bytes
8560
+ # or less; otherwise, the creation request fails.
8561
+ # Corresponds to the JSON property `displayName`
8562
+ # @return [String]
8563
+ attr_accessor :display_name
8564
+
8565
+ # Language which represents the KnowledgeBase. When the KnowledgeBase is created/
8566
+ # updated, expect this to be present for non en-us languages. When unspecified,
8567
+ # the default language code en-us applies.
8568
+ # Corresponds to the JSON property `languageCode`
8569
+ # @return [String]
8570
+ attr_accessor :language_code
8571
+
8572
+ # The knowledge base resource name. The name must be empty when creating a
8573
+ # knowledge base. Format: `projects//locations//knowledgeBases/`.
8574
+ # Corresponds to the JSON property `name`
8575
+ # @return [String]
8576
+ attr_accessor :name
8577
+
8578
+ def initialize(**args)
8579
+ update!(**args)
8580
+ end
8581
+
8582
+ # Update properties of this object
8583
+ def update!(**args)
8584
+ @display_name = args[:display_name] if args.key?(:display_name)
8585
+ @language_code = args[:language_code] if args.key?(:language_code)
8586
+ @name = args[:name] if args.key?(:name)
8587
+ end
8588
+ end
8589
+
8590
+ # Metadata in google::longrunning::Operation for Knowledge operations.
8591
+ class GoogleCloudDialogflowV2KnowledgeOperationMetadata
8592
+ include Google::Apis::Core::Hashable
8593
+
8594
+ # Output only. The current state of this operation.
8595
+ # Corresponds to the JSON property `state`
8596
+ # @return [String]
8597
+ attr_accessor :state
8598
+
8599
+ def initialize(**args)
8600
+ update!(**args)
8601
+ end
8602
+
8603
+ # Update properties of this object
8604
+ def update!(**args)
8605
+ @state = args[:state] if args.key?(:state)
8606
+ end
8607
+ end
8608
+
8609
+ # Response message for AnswerRecords.ListAnswerRecords.
8610
+ class GoogleCloudDialogflowV2ListAnswerRecordsResponse
8611
+ include Google::Apis::Core::Hashable
8612
+
8613
+ # The list of answer records.
8614
+ # Corresponds to the JSON property `answerRecords`
8615
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2AnswerRecord>]
8616
+ attr_accessor :answer_records
8617
+
8618
+ # A token to retrieve next page of results. Or empty if there are no more
8619
+ # results. Pass this value in the ListAnswerRecordsRequest.page_token field in
8620
+ # the subsequent call to `ListAnswerRecords` method to retrieve the next page of
8621
+ # results.
8622
+ # Corresponds to the JSON property `nextPageToken`
8623
+ # @return [String]
8624
+ attr_accessor :next_page_token
8625
+
8626
+ def initialize(**args)
8627
+ update!(**args)
8628
+ end
8629
+
8630
+ # Update properties of this object
8631
+ def update!(**args)
8632
+ @answer_records = args[:answer_records] if args.key?(:answer_records)
8633
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
8634
+ end
8635
+ end
8636
+
8637
+ # The response message for Conversations.ListCallMatchers.
8638
+ class GoogleCloudDialogflowV2ListCallMatchersResponse
8639
+ include Google::Apis::Core::Hashable
8640
+
8641
+ # The list of call matchers. There is a maximum number of items returned based
8642
+ # on the page_size field in the request.
8643
+ # Corresponds to the JSON property `callMatchers`
8644
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2CallMatcher>]
8645
+ attr_accessor :call_matchers
8646
+
8647
+ # Token to retrieve the next page of results or empty if there are no more
8648
+ # results in the list.
8649
+ # Corresponds to the JSON property `nextPageToken`
8650
+ # @return [String]
8651
+ attr_accessor :next_page_token
8652
+
8653
+ def initialize(**args)
8654
+ update!(**args)
8655
+ end
8656
+
8657
+ # Update properties of this object
8658
+ def update!(**args)
8659
+ @call_matchers = args[:call_matchers] if args.key?(:call_matchers)
8660
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
8661
+ end
8662
+ end
8663
+
7128
8664
  # The response message for Contexts.ListContexts.
7129
8665
  class GoogleCloudDialogflowV2ListContextsResponse
7130
8666
  include Google::Apis::Core::Hashable
@@ -7152,15 +8688,175 @@ module Google
7152
8688
  end
7153
8689
  end
7154
8690
 
7155
- # The response message for EntityTypes.ListEntityTypes.
7156
- class GoogleCloudDialogflowV2ListEntityTypesResponse
8691
+ # The response message for ConversationProfiles.ListConversationProfiles.
8692
+ class GoogleCloudDialogflowV2ListConversationProfilesResponse
8693
+ include Google::Apis::Core::Hashable
8694
+
8695
+ # The list of project conversation profiles. There is a maximum number of items
8696
+ # returned based on the page_size field in the request.
8697
+ # Corresponds to the JSON property `conversationProfiles`
8698
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ConversationProfile>]
8699
+ attr_accessor :conversation_profiles
8700
+
8701
+ # Token to retrieve the next page of results, or empty if there are no more
8702
+ # results in the list.
8703
+ # Corresponds to the JSON property `nextPageToken`
8704
+ # @return [String]
8705
+ attr_accessor :next_page_token
8706
+
8707
+ def initialize(**args)
8708
+ update!(**args)
8709
+ end
8710
+
8711
+ # Update properties of this object
8712
+ def update!(**args)
8713
+ @conversation_profiles = args[:conversation_profiles] if args.key?(:conversation_profiles)
8714
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
8715
+ end
8716
+ end
8717
+
8718
+ # The response message for Conversations.ListConversations.
8719
+ class GoogleCloudDialogflowV2ListConversationsResponse
8720
+ include Google::Apis::Core::Hashable
8721
+
8722
+ # The list of conversations. There will be a maximum number of items returned
8723
+ # based on the page_size field in the request.
8724
+ # Corresponds to the JSON property `conversations`
8725
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Conversation>]
8726
+ attr_accessor :conversations
8727
+
8728
+ # Token to retrieve the next page of results, or empty if there are no more
8729
+ # results in the list.
8730
+ # Corresponds to the JSON property `nextPageToken`
8731
+ # @return [String]
8732
+ attr_accessor :next_page_token
8733
+
8734
+ def initialize(**args)
8735
+ update!(**args)
8736
+ end
8737
+
8738
+ # Update properties of this object
8739
+ def update!(**args)
8740
+ @conversations = args[:conversations] if args.key?(:conversations)
8741
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
8742
+ end
8743
+ end
8744
+
8745
+ # Response message for Documents.ListDocuments.
8746
+ class GoogleCloudDialogflowV2ListDocumentsResponse
8747
+ include Google::Apis::Core::Hashable
8748
+
8749
+ # The list of documents.
8750
+ # Corresponds to the JSON property `documents`
8751
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Document>]
8752
+ attr_accessor :documents
8753
+
8754
+ # Token to retrieve the next page of results, or empty if there are no more
8755
+ # results in the list.
8756
+ # Corresponds to the JSON property `nextPageToken`
8757
+ # @return [String]
8758
+ attr_accessor :next_page_token
8759
+
8760
+ def initialize(**args)
8761
+ update!(**args)
8762
+ end
8763
+
8764
+ # Update properties of this object
8765
+ def update!(**args)
8766
+ @documents = args[:documents] if args.key?(:documents)
8767
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
8768
+ end
8769
+ end
8770
+
8771
+ # The response message for EntityTypes.ListEntityTypes.
8772
+ class GoogleCloudDialogflowV2ListEntityTypesResponse
8773
+ include Google::Apis::Core::Hashable
8774
+
8775
+ # The list of agent entity types. There will be a maximum number of items
8776
+ # returned based on the page_size field in the request.
8777
+ # Corresponds to the JSON property `entityTypes`
8778
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityType>]
8779
+ attr_accessor :entity_types
8780
+
8781
+ # Token to retrieve the next page of results, or empty if there are no more
8782
+ # results in the list.
8783
+ # Corresponds to the JSON property `nextPageToken`
8784
+ # @return [String]
8785
+ attr_accessor :next_page_token
8786
+
8787
+ def initialize(**args)
8788
+ update!(**args)
8789
+ end
8790
+
8791
+ # Update properties of this object
8792
+ def update!(**args)
8793
+ @entity_types = args[:entity_types] if args.key?(:entity_types)
8794
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
8795
+ end
8796
+ end
8797
+
8798
+ # The response message for Environments.ListEnvironments.
8799
+ class GoogleCloudDialogflowV2ListEnvironmentsResponse
8800
+ include Google::Apis::Core::Hashable
8801
+
8802
+ # The list of agent environments. There will be a maximum number of items
8803
+ # returned based on the page_size field in the request.
8804
+ # Corresponds to the JSON property `environments`
8805
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment>]
8806
+ attr_accessor :environments
8807
+
8808
+ # Token to retrieve the next page of results, or empty if there are no more
8809
+ # results in the list.
8810
+ # Corresponds to the JSON property `nextPageToken`
8811
+ # @return [String]
8812
+ attr_accessor :next_page_token
8813
+
8814
+ def initialize(**args)
8815
+ update!(**args)
8816
+ end
8817
+
8818
+ # Update properties of this object
8819
+ def update!(**args)
8820
+ @environments = args[:environments] if args.key?(:environments)
8821
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
8822
+ end
8823
+ end
8824
+
8825
+ # The response message for Intents.ListIntents.
8826
+ class GoogleCloudDialogflowV2ListIntentsResponse
8827
+ include Google::Apis::Core::Hashable
8828
+
8829
+ # The list of agent intents. There will be a maximum number of items returned
8830
+ # based on the page_size field in the request.
8831
+ # Corresponds to the JSON property `intents`
8832
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Intent>]
8833
+ attr_accessor :intents
8834
+
8835
+ # Token to retrieve the next page of results, or empty if there are no more
8836
+ # results in the list.
8837
+ # Corresponds to the JSON property `nextPageToken`
8838
+ # @return [String]
8839
+ attr_accessor :next_page_token
8840
+
8841
+ def initialize(**args)
8842
+ update!(**args)
8843
+ end
8844
+
8845
+ # Update properties of this object
8846
+ def update!(**args)
8847
+ @intents = args[:intents] if args.key?(:intents)
8848
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
8849
+ end
8850
+ end
8851
+
8852
+ # Response message for KnowledgeBases.ListKnowledgeBases.
8853
+ class GoogleCloudDialogflowV2ListKnowledgeBasesResponse
7157
8854
  include Google::Apis::Core::Hashable
7158
8855
 
7159
- # The list of agent entity types. There will be a maximum number of items
7160
- # returned based on the page_size field in the request.
7161
- # Corresponds to the JSON property `entityTypes`
7162
- # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityType>]
7163
- attr_accessor :entity_types
8856
+ # The list of knowledge bases.
8857
+ # Corresponds to the JSON property `knowledgeBases`
8858
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2KnowledgeBase>]
8859
+ attr_accessor :knowledge_bases
7164
8860
 
7165
8861
  # Token to retrieve the next page of results, or empty if there are no more
7166
8862
  # results in the list.
@@ -7174,20 +8870,21 @@ module Google
7174
8870
 
7175
8871
  # Update properties of this object
7176
8872
  def update!(**args)
7177
- @entity_types = args[:entity_types] if args.key?(:entity_types)
8873
+ @knowledge_bases = args[:knowledge_bases] if args.key?(:knowledge_bases)
7178
8874
  @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
7179
8875
  end
7180
8876
  end
7181
8877
 
7182
- # The response message for Environments.ListEnvironments.
7183
- class GoogleCloudDialogflowV2ListEnvironmentsResponse
8878
+ # The response message for Conversations.ListMessages.
8879
+ class GoogleCloudDialogflowV2ListMessagesResponse
7184
8880
  include Google::Apis::Core::Hashable
7185
8881
 
7186
- # The list of agent environments. There will be a maximum number of items
7187
- # returned based on the page_size field in the request.
7188
- # Corresponds to the JSON property `environments`
7189
- # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment>]
7190
- attr_accessor :environments
8882
+ # The list of messages. There will be a maximum number of items returned based
8883
+ # on the page_size field in the request. `messages` is sorted by `create_time`
8884
+ # in descending order.
8885
+ # Corresponds to the JSON property `messages`
8886
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Message>]
8887
+ attr_accessor :messages
7191
8888
 
7192
8889
  # Token to retrieve the next page of results, or empty if there are no more
7193
8890
  # results in the list.
@@ -7201,35 +8898,35 @@ module Google
7201
8898
 
7202
8899
  # Update properties of this object
7203
8900
  def update!(**args)
7204
- @environments = args[:environments] if args.key?(:environments)
8901
+ @messages = args[:messages] if args.key?(:messages)
7205
8902
  @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
7206
8903
  end
7207
8904
  end
7208
8905
 
7209
- # The response message for Intents.ListIntents.
7210
- class GoogleCloudDialogflowV2ListIntentsResponse
8906
+ # The response message for Participants.ListParticipants.
8907
+ class GoogleCloudDialogflowV2ListParticipantsResponse
7211
8908
  include Google::Apis::Core::Hashable
7212
8909
 
7213
- # The list of agent intents. There will be a maximum number of items returned
7214
- # based on the page_size field in the request.
7215
- # Corresponds to the JSON property `intents`
7216
- # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Intent>]
7217
- attr_accessor :intents
7218
-
7219
- # Token to retrieve the next page of results, or empty if there are no more
8910
+ # Token to retrieve the next page of results or empty if there are no more
7220
8911
  # results in the list.
7221
8912
  # Corresponds to the JSON property `nextPageToken`
7222
8913
  # @return [String]
7223
8914
  attr_accessor :next_page_token
7224
8915
 
8916
+ # The list of participants. There is a maximum number of items returned based on
8917
+ # the page_size field in the request.
8918
+ # Corresponds to the JSON property `participants`
8919
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Participant>]
8920
+ attr_accessor :participants
8921
+
7225
8922
  def initialize(**args)
7226
8923
  update!(**args)
7227
8924
  end
7228
8925
 
7229
8926
  # Update properties of this object
7230
8927
  def update!(**args)
7231
- @intents = args[:intents] if args.key?(:intents)
7232
8928
  @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
8929
+ @participants = args[:participants] if args.key?(:participants)
7233
8930
  end
7234
8931
  end
7235
8932
 
@@ -7260,6 +8957,27 @@ module Google
7260
8957
  end
7261
8958
  end
7262
8959
 
8960
+ # Defines logging behavior for conversation lifecycle events.
8961
+ class GoogleCloudDialogflowV2LoggingConfig
8962
+ include Google::Apis::Core::Hashable
8963
+
8964
+ # Whether to log conversation events like CONVERSATION_STARTED to Stackdriver in
8965
+ # the conversation project as JSON format ConversationEvent protos.
8966
+ # Corresponds to the JSON property `enableStackdriverLogging`
8967
+ # @return [Boolean]
8968
+ attr_accessor :enable_stackdriver_logging
8969
+ alias_method :enable_stackdriver_logging?, :enable_stackdriver_logging
8970
+
8971
+ def initialize(**args)
8972
+ update!(**args)
8973
+ end
8974
+
8975
+ # Update properties of this object
8976
+ def update!(**args)
8977
+ @enable_stackdriver_logging = args[:enable_stackdriver_logging] if args.key?(:enable_stackdriver_logging)
8978
+ end
8979
+ end
8980
+
7263
8981
  # Represents a message posted into a conversation.
7264
8982
  class GoogleCloudDialogflowV2Message
7265
8983
  include Google::Apis::Core::Hashable
@@ -7345,6 +9063,36 @@ module Google
7345
9063
  end
7346
9064
  end
7347
9065
 
9066
+ # Defines notification behavior.
9067
+ class GoogleCloudDialogflowV2NotificationConfig
9068
+ include Google::Apis::Core::Hashable
9069
+
9070
+ # Format of message.
9071
+ # Corresponds to the JSON property `messageFormat`
9072
+ # @return [String]
9073
+ attr_accessor :message_format
9074
+
9075
+ # Name of the Pub/Sub topic to publish conversation events like
9076
+ # CONVERSATION_STARTED as serialized ConversationEvent protos. Notification
9077
+ # works for phone calls, if this topic either is in the same project as the
9078
+ # conversation or you grant `service-@gcp-sa-dialogflow.iam.gserviceaccount.com`
9079
+ # the `Dialogflow Service Agent` role in the topic project. Format: `projects//
9080
+ # locations//topics/`.
9081
+ # Corresponds to the JSON property `topic`
9082
+ # @return [String]
9083
+ attr_accessor :topic
9084
+
9085
+ def initialize(**args)
9086
+ update!(**args)
9087
+ end
9088
+
9089
+ # Update properties of this object
9090
+ def update!(**args)
9091
+ @message_format = args[:message_format] if args.key?(:message_format)
9092
+ @topic = args[:topic] if args.key?(:topic)
9093
+ end
9094
+ end
9095
+
7348
9096
  # Represents the contents of the original request that was passed to the `[
7349
9097
  # Streaming]DetectIntent` call.
7350
9098
  class GoogleCloudDialogflowV2OriginalDetectIntentRequest
@@ -7385,6 +9133,34 @@ module Google
7385
9133
  end
7386
9134
  end
7387
9135
 
9136
+ # Represents the natural language speech audio to be played to the end user.
9137
+ class GoogleCloudDialogflowV2OutputAudio
9138
+ include Google::Apis::Core::Hashable
9139
+
9140
+ # The natural language speech audio.
9141
+ # Corresponds to the JSON property `audio`
9142
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
9143
+ # @return [String]
9144
+ attr_accessor :audio
9145
+
9146
+ # Instructs the speech synthesizer on how to generate the output audio content.
9147
+ # If this audio config is supplied in a request, it overrides all existing text-
9148
+ # to-speech settings applied to the agent.
9149
+ # Corresponds to the JSON property `config`
9150
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2OutputAudioConfig]
9151
+ attr_accessor :config
9152
+
9153
+ def initialize(**args)
9154
+ update!(**args)
9155
+ end
9156
+
9157
+ # Update properties of this object
9158
+ def update!(**args)
9159
+ @audio = args[:audio] if args.key?(:audio)
9160
+ @config = args[:config] if args.key?(:config)
9161
+ end
9162
+ end
9163
+
7388
9164
  # Instructs the speech synthesizer on how to generate the output audio content.
7389
9165
  # If this audio config is supplied in a request, it overrides all existing text-
7390
9166
  # to-speech settings applied to the agent.
@@ -7422,6 +9198,41 @@ module Google
7422
9198
  end
7423
9199
  end
7424
9200
 
9201
+ # Represents a conversation participant (human agent, virtual agent, end-user).
9202
+ class GoogleCloudDialogflowV2Participant
9203
+ include Google::Apis::Core::Hashable
9204
+
9205
+ # Optional. The unique identifier of this participant. Format: `projects//
9206
+ # locations//conversations//participants/`.
9207
+ # Corresponds to the JSON property `name`
9208
+ # @return [String]
9209
+ attr_accessor :name
9210
+
9211
+ # Immutable. The role this participant plays in the conversation. This field
9212
+ # must be set during participant creation and is then immutable.
9213
+ # Corresponds to the JSON property `role`
9214
+ # @return [String]
9215
+ attr_accessor :role
9216
+
9217
+ # Optional. Label applied to streams representing this participant in SIPREC XML
9218
+ # metadata and SDP. This is used to assign transcriptions from that media stream
9219
+ # to this participant. This field can be updated.
9220
+ # Corresponds to the JSON property `sipRecordingMediaLabel`
9221
+ # @return [String]
9222
+ attr_accessor :sip_recording_media_label
9223
+
9224
+ def initialize(**args)
9225
+ update!(**args)
9226
+ end
9227
+
9228
+ # Update properties of this object
9229
+ def update!(**args)
9230
+ @name = args[:name] if args.key?(:name)
9231
+ @role = args[:role] if args.key?(:role)
9232
+ @sip_recording_media_label = args[:sip_recording_media_label] if args.key?(:sip_recording_media_label)
9233
+ end
9234
+ end
9235
+
7425
9236
  # Represents the query input. It can contain either: 1. An audio config which
7426
9237
  # instructs the speech recognizer how to process the speech audio. 2. A
7427
9238
  # conversational query in the form of text,. 3. An event that specifies which
@@ -7693,6 +9504,27 @@ module Google
7693
9504
  end
7694
9505
  end
7695
9506
 
9507
+ # Request message for Documents.ReloadDocument.
9508
+ class GoogleCloudDialogflowV2ReloadDocumentRequest
9509
+ include Google::Apis::Core::Hashable
9510
+
9511
+ # Optional. The path of gcs source file for reloading document content. For now,
9512
+ # only gcs uri is supported. For documents stored in Google Cloud Storage, these
9513
+ # URIs must have the form `gs:///`.
9514
+ # Corresponds to the JSON property `contentUri`
9515
+ # @return [String]
9516
+ attr_accessor :content_uri
9517
+
9518
+ def initialize(**args)
9519
+ update!(**args)
9520
+ end
9521
+
9522
+ # Update properties of this object
9523
+ def update!(**args)
9524
+ @content_uri = args[:content_uri] if args.key?(:content_uri)
9525
+ end
9526
+ end
9527
+
7696
9528
  # The request message for Agents.RestoreAgent.
7697
9529
  class GoogleCloudDialogflowV2RestoreAgentRequest
7698
9530
  include Google::Apis::Core::Hashable
@@ -7837,21 +9669,226 @@ module Google
7837
9669
  # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityTypeEntity>]
7838
9670
  attr_accessor :entities
7839
9671
 
7840
- # Required. Indicates whether the additional data should override or supplement
7841
- # the custom entity type definition.
7842
- # Corresponds to the JSON property `entityOverrideMode`
7843
- # @return [String]
7844
- attr_accessor :entity_override_mode
9672
+ # Required. Indicates whether the additional data should override or supplement
9673
+ # the custom entity type definition.
9674
+ # Corresponds to the JSON property `entityOverrideMode`
9675
+ # @return [String]
9676
+ attr_accessor :entity_override_mode
9677
+
9678
+ # Required. The unique identifier of this session entity type. Format: `projects/
9679
+ # /agent/sessions//entityTypes/`, or `projects//agent/environments//users//
9680
+ # sessions//entityTypes/`. If `Environment ID` is not specified, we assume
9681
+ # default 'draft' environment. If `User ID` is not specified, we assume default '
9682
+ # -' user. `` must be the display name of an existing entity type in the same
9683
+ # agent that will be overridden or supplemented.
9684
+ # Corresponds to the JSON property `name`
9685
+ # @return [String]
9686
+ attr_accessor :name
9687
+
9688
+ def initialize(**args)
9689
+ update!(**args)
9690
+ end
9691
+
9692
+ # Update properties of this object
9693
+ def update!(**args)
9694
+ @entities = args[:entities] if args.key?(:entities)
9695
+ @entity_override_mode = args[:entity_override_mode] if args.key?(:entity_override_mode)
9696
+ @name = args[:name] if args.key?(:name)
9697
+ end
9698
+ end
9699
+
9700
+ # Hints for the speech recognizer to help with recognition in a specific
9701
+ # conversation state.
9702
+ class GoogleCloudDialogflowV2SpeechContext
9703
+ include Google::Apis::Core::Hashable
9704
+
9705
+ # Optional. Boost for this context compared to other contexts: * If the boost is
9706
+ # positive, Dialogflow will increase the probability that the phrases in this
9707
+ # context are recognized over similar sounding phrases. * If the boost is
9708
+ # unspecified or non-positive, Dialogflow will not apply any boost. Dialogflow
9709
+ # recommends that you use boosts in the range (0, 20] and that you find a value
9710
+ # that fits your use case with binary search.
9711
+ # Corresponds to the JSON property `boost`
9712
+ # @return [Float]
9713
+ attr_accessor :boost
9714
+
9715
+ # Optional. A list of strings containing words and phrases that the speech
9716
+ # recognizer should recognize with higher likelihood. This list can be used to: *
9717
+ # improve accuracy for words and phrases you expect the user to say, e.g.
9718
+ # typical commands for your Dialogflow agent * add additional words to the
9719
+ # speech recognizer vocabulary * ... See the [Cloud Speech documentation](https:/
9720
+ # /cloud.google.com/speech-to-text/quotas) for usage limits.
9721
+ # Corresponds to the JSON property `phrases`
9722
+ # @return [Array<String>]
9723
+ attr_accessor :phrases
9724
+
9725
+ def initialize(**args)
9726
+ update!(**args)
9727
+ end
9728
+
9729
+ # Update properties of this object
9730
+ def update!(**args)
9731
+ @boost = args[:boost] if args.key?(:boost)
9732
+ @phrases = args[:phrases] if args.key?(:phrases)
9733
+ end
9734
+ end
9735
+
9736
+ # Configures speech transcription for ConversationProfile.
9737
+ class GoogleCloudDialogflowV2SpeechToTextConfig
9738
+ include Google::Apis::Core::Hashable
9739
+
9740
+ # Optional. The speech model used in speech to text. `
9741
+ # SPEECH_MODEL_VARIANT_UNSPECIFIED`, `USE_BEST_AVAILABLE` will be treated as `
9742
+ # USE_ENHANCED`. It can be overridden in AnalyzeContentRequest and
9743
+ # StreamingAnalyzeContentRequest request.
9744
+ # Corresponds to the JSON property `speechModelVariant`
9745
+ # @return [String]
9746
+ attr_accessor :speech_model_variant
9747
+
9748
+ def initialize(**args)
9749
+ update!(**args)
9750
+ end
9751
+
9752
+ # Update properties of this object
9753
+ def update!(**args)
9754
+ @speech_model_variant = args[:speech_model_variant] if args.key?(:speech_model_variant)
9755
+ end
9756
+ end
9757
+
9758
+ # The request message for Participants.SuggestArticles.
9759
+ class GoogleCloudDialogflowV2SuggestArticlesRequest
9760
+ include Google::Apis::Core::Hashable
9761
+
9762
+ # Max number of messages prior to and including latest_message to use as context
9763
+ # when compiling the suggestion. By default 20 and at most 50.
9764
+ # Corresponds to the JSON property `contextSize`
9765
+ # @return [Fixnum]
9766
+ attr_accessor :context_size
9767
+
9768
+ # The name of the latest conversation message to compile suggestion for. If
9769
+ # empty, it will be the latest message of the conversation. Format: `projects//
9770
+ # locations//conversations//messages/`.
9771
+ # Corresponds to the JSON property `latestMessage`
9772
+ # @return [String]
9773
+ attr_accessor :latest_message
9774
+
9775
+ def initialize(**args)
9776
+ update!(**args)
9777
+ end
9778
+
9779
+ # Update properties of this object
9780
+ def update!(**args)
9781
+ @context_size = args[:context_size] if args.key?(:context_size)
9782
+ @latest_message = args[:latest_message] if args.key?(:latest_message)
9783
+ end
9784
+ end
9785
+
9786
+ # The response message for Participants.SuggestArticles.
9787
+ class GoogleCloudDialogflowV2SuggestArticlesResponse
9788
+ include Google::Apis::Core::Hashable
9789
+
9790
+ # Articles ordered by score in descending order.
9791
+ # Corresponds to the JSON property `articleAnswers`
9792
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ArticleAnswer>]
9793
+ attr_accessor :article_answers
9794
+
9795
+ # Number of messages prior to and including latest_message to compile the
9796
+ # suggestion. It may be smaller than the SuggestArticlesRequest.context_size
9797
+ # field in the request if there aren't that many messages in the conversation.
9798
+ # Corresponds to the JSON property `contextSize`
9799
+ # @return [Fixnum]
9800
+ attr_accessor :context_size
9801
+
9802
+ # The name of the latest conversation message used to compile suggestion for.
9803
+ # Format: `projects//locations//conversations//messages/`.
9804
+ # Corresponds to the JSON property `latestMessage`
9805
+ # @return [String]
9806
+ attr_accessor :latest_message
9807
+
9808
+ def initialize(**args)
9809
+ update!(**args)
9810
+ end
9811
+
9812
+ # Update properties of this object
9813
+ def update!(**args)
9814
+ @article_answers = args[:article_answers] if args.key?(:article_answers)
9815
+ @context_size = args[:context_size] if args.key?(:context_size)
9816
+ @latest_message = args[:latest_message] if args.key?(:latest_message)
9817
+ end
9818
+ end
9819
+
9820
+ # The request message for Participants.SuggestFaqAnswers.
9821
+ class GoogleCloudDialogflowV2SuggestFaqAnswersRequest
9822
+ include Google::Apis::Core::Hashable
9823
+
9824
+ # Max number of messages prior to and including [latest_message] to use as
9825
+ # context when compiling the suggestion. By default 20 and at most 50.
9826
+ # Corresponds to the JSON property `contextSize`
9827
+ # @return [Fixnum]
9828
+ attr_accessor :context_size
9829
+
9830
+ # The name of the latest conversation message to compile suggestion for. If
9831
+ # empty, it will be the latest message of the conversation. Format: `projects//
9832
+ # locations//conversations//messages/`.
9833
+ # Corresponds to the JSON property `latestMessage`
9834
+ # @return [String]
9835
+ attr_accessor :latest_message
9836
+
9837
+ def initialize(**args)
9838
+ update!(**args)
9839
+ end
9840
+
9841
+ # Update properties of this object
9842
+ def update!(**args)
9843
+ @context_size = args[:context_size] if args.key?(:context_size)
9844
+ @latest_message = args[:latest_message] if args.key?(:latest_message)
9845
+ end
9846
+ end
9847
+
9848
+ # The request message for Participants.SuggestFaqAnswers.
9849
+ class GoogleCloudDialogflowV2SuggestFaqAnswersResponse
9850
+ include Google::Apis::Core::Hashable
9851
+
9852
+ # Number of messages prior to and including latest_message to compile the
9853
+ # suggestion. It may be smaller than the SuggestFaqAnswersRequest.context_size
9854
+ # field in the request if there aren't that many messages in the conversation.
9855
+ # Corresponds to the JSON property `contextSize`
9856
+ # @return [Fixnum]
9857
+ attr_accessor :context_size
9858
+
9859
+ # Answers extracted from FAQ documents.
9860
+ # Corresponds to the JSON property `faqAnswers`
9861
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2FaqAnswer>]
9862
+ attr_accessor :faq_answers
9863
+
9864
+ # The name of the latest conversation message used to compile suggestion for.
9865
+ # Format: `projects//locations//conversations//messages/`.
9866
+ # Corresponds to the JSON property `latestMessage`
9867
+ # @return [String]
9868
+ attr_accessor :latest_message
9869
+
9870
+ def initialize(**args)
9871
+ update!(**args)
9872
+ end
9873
+
9874
+ # Update properties of this object
9875
+ def update!(**args)
9876
+ @context_size = args[:context_size] if args.key?(:context_size)
9877
+ @faq_answers = args[:faq_answers] if args.key?(:faq_answers)
9878
+ @latest_message = args[:latest_message] if args.key?(:latest_message)
9879
+ end
9880
+ end
9881
+
9882
+ # The type of Human Agent Assistant API suggestion to perform, and the maximum
9883
+ # number of results to return for that type. Multiple `Feature` objects can be
9884
+ # specified in the `features` list.
9885
+ class GoogleCloudDialogflowV2SuggestionFeature
9886
+ include Google::Apis::Core::Hashable
7845
9887
 
7846
- # Required. The unique identifier of this session entity type. Format: `projects/
7847
- # /agent/sessions//entityTypes/`, or `projects//agent/environments//users//
7848
- # sessions//entityTypes/`. If `Environment ID` is not specified, we assume
7849
- # default 'draft' environment. If `User ID` is not specified, we assume default '
7850
- # -' user. `` must be the display name of an existing entity type in the same
7851
- # agent that will be overridden or supplemented.
7852
- # Corresponds to the JSON property `name`
9888
+ # Type of Human Agent Assistant API feature to request.
9889
+ # Corresponds to the JSON property `type`
7853
9890
  # @return [String]
7854
- attr_accessor :name
9891
+ attr_accessor :type
7855
9892
 
7856
9893
  def initialize(**args)
7857
9894
  update!(**args)
@@ -7859,36 +9896,35 @@ module Google
7859
9896
 
7860
9897
  # Update properties of this object
7861
9898
  def update!(**args)
7862
- @entities = args[:entities] if args.key?(:entities)
7863
- @entity_override_mode = args[:entity_override_mode] if args.key?(:entity_override_mode)
7864
- @name = args[:name] if args.key?(:name)
9899
+ @type = args[:type] if args.key?(:type)
7865
9900
  end
7866
9901
  end
7867
9902
 
7868
- # Hints for the speech recognizer to help with recognition in a specific
7869
- # conversation state.
7870
- class GoogleCloudDialogflowV2SpeechContext
9903
+ # One response of different type of suggestion response which is used in the
9904
+ # response of Participants.AnalyzeContent and Participants.AnalyzeContent, as
9905
+ # well as HumanAgentAssistantEvent.
9906
+ class GoogleCloudDialogflowV2SuggestionResult
7871
9907
  include Google::Apis::Core::Hashable
7872
9908
 
7873
- # Optional. Boost for this context compared to other contexts: * If the boost is
7874
- # positive, Dialogflow will increase the probability that the phrases in this
7875
- # context are recognized over similar sounding phrases. * If the boost is
7876
- # unspecified or non-positive, Dialogflow will not apply any boost. Dialogflow
7877
- # recommends that you use boosts in the range (0, 20] and that you find a value
7878
- # that fits your use case with binary search.
7879
- # Corresponds to the JSON property `boost`
7880
- # @return [Float]
7881
- attr_accessor :boost
9909
+ # The `Status` type defines a logical error model that is suitable for different
9910
+ # programming environments, including REST APIs and RPC APIs. It is used by [
9911
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
9912
+ # data: error code, error message, and error details. You can find out more
9913
+ # about this error model and how to work with it in the [API Design Guide](https:
9914
+ # //cloud.google.com/apis/design/errors).
9915
+ # Corresponds to the JSON property `error`
9916
+ # @return [Google::Apis::DialogflowV2::GoogleRpcStatus]
9917
+ attr_accessor :error
7882
9918
 
7883
- # Optional. A list of strings containing words and phrases that the speech
7884
- # recognizer should recognize with higher likelihood. This list can be used to: *
7885
- # improve accuracy for words and phrases you expect the user to say, e.g.
7886
- # typical commands for your Dialogflow agent * add additional words to the
7887
- # speech recognizer vocabulary * ... See the [Cloud Speech documentation](https:/
7888
- # /cloud.google.com/speech-to-text/quotas) for usage limits.
7889
- # Corresponds to the JSON property `phrases`
7890
- # @return [Array<String>]
7891
- attr_accessor :phrases
9919
+ # The response message for Participants.SuggestArticles.
9920
+ # Corresponds to the JSON property `suggestArticlesResponse`
9921
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SuggestArticlesResponse]
9922
+ attr_accessor :suggest_articles_response
9923
+
9924
+ # The request message for Participants.SuggestFaqAnswers.
9925
+ # Corresponds to the JSON property `suggestFaqAnswersResponse`
9926
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SuggestFaqAnswersResponse]
9927
+ attr_accessor :suggest_faq_answers_response
7892
9928
 
7893
9929
  def initialize(**args)
7894
9930
  update!(**args)
@@ -7896,8 +9932,9 @@ module Google
7896
9932
 
7897
9933
  # Update properties of this object
7898
9934
  def update!(**args)
7899
- @boost = args[:boost] if args.key?(:boost)
7900
- @phrases = args[:phrases] if args.key?(:phrases)
9935
+ @error = args[:error] if args.key?(:error)
9936
+ @suggest_articles_response = args[:suggest_articles_response] if args.key?(:suggest_articles_response)
9937
+ @suggest_faq_answers_response = args[:suggest_faq_answers_response] if args.key?(:suggest_faq_answers_response)
7901
9938
  end
7902
9939
  end
7903
9940
 
@@ -8212,6 +10249,89 @@ module Google
8212
10249
  end
8213
10250
  end
8214
10251
 
10252
+ # Represents a part of a message possibly annotated with an entity. The part can
10253
+ # be an entity or purely a part of the message between two entities or message
10254
+ # start/end.
10255
+ class GoogleCloudDialogflowV2beta1AnnotatedMessagePart
10256
+ include Google::Apis::Core::Hashable
10257
+
10258
+ # Optional. The [Dialogflow system entity type](https://cloud.google.com/
10259
+ # dialogflow/docs/reference/system-entities) of this message part. If this is
10260
+ # empty, Dialogflow could not annotate the phrase part with a system entity.
10261
+ # Corresponds to the JSON property `entityType`
10262
+ # @return [String]
10263
+ attr_accessor :entity_type
10264
+
10265
+ # Optional. The [Dialogflow system entity formatted value ](https://cloud.google.
10266
+ # com/dialogflow/docs/reference/system-entities) of this message part. For
10267
+ # example for a system entity of type `@sys.unit-currency`, this may contain: ` "
10268
+ # amount": 5, "currency": "USD" `
10269
+ # Corresponds to the JSON property `formattedValue`
10270
+ # @return [Object]
10271
+ attr_accessor :formatted_value
10272
+
10273
+ # Required. A part of a message possibly annotated with an entity.
10274
+ # Corresponds to the JSON property `text`
10275
+ # @return [String]
10276
+ attr_accessor :text
10277
+
10278
+ def initialize(**args)
10279
+ update!(**args)
10280
+ end
10281
+
10282
+ # Update properties of this object
10283
+ def update!(**args)
10284
+ @entity_type = args[:entity_type] if args.key?(:entity_type)
10285
+ @formatted_value = args[:formatted_value] if args.key?(:formatted_value)
10286
+ @text = args[:text] if args.key?(:text)
10287
+ end
10288
+ end
10289
+
10290
+ # Represents article answer.
10291
+ class GoogleCloudDialogflowV2beta1ArticleAnswer
10292
+ include Google::Apis::Core::Hashable
10293
+
10294
+ # The name of answer record, in the format of "projects//locations//
10295
+ # answerRecords/"
10296
+ # Corresponds to the JSON property `answerRecord`
10297
+ # @return [String]
10298
+ attr_accessor :answer_record
10299
+
10300
+ # A map that contains metadata about the answer and the document from which it
10301
+ # originates.
10302
+ # Corresponds to the JSON property `metadata`
10303
+ # @return [Hash<String,String>]
10304
+ attr_accessor :metadata
10305
+
10306
+ # Output only. Article snippets.
10307
+ # Corresponds to the JSON property `snippets`
10308
+ # @return [Array<String>]
10309
+ attr_accessor :snippets
10310
+
10311
+ # The article title.
10312
+ # Corresponds to the JSON property `title`
10313
+ # @return [String]
10314
+ attr_accessor :title
10315
+
10316
+ # The article URI.
10317
+ # Corresponds to the JSON property `uri`
10318
+ # @return [String]
10319
+ attr_accessor :uri
10320
+
10321
+ def initialize(**args)
10322
+ update!(**args)
10323
+ end
10324
+
10325
+ # Update properties of this object
10326
+ def update!(**args)
10327
+ @answer_record = args[:answer_record] if args.key?(:answer_record)
10328
+ @metadata = args[:metadata] if args.key?(:metadata)
10329
+ @snippets = args[:snippets] if args.key?(:snippets)
10330
+ @title = args[:title] if args.key?(:title)
10331
+ @uri = args[:uri] if args.key?(:uri)
10332
+ end
10333
+ end
10334
+
8215
10335
  # The response message for EntityTypes.BatchUpdateEntityTypes.
8216
10336
  class GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse
8217
10337
  include Google::Apis::Core::Hashable
@@ -8312,6 +10432,50 @@ module Google
8312
10432
  end
8313
10433
  end
8314
10434
 
10435
+ # Represents a notification sent to Pub/Sub subscribers for conversation
10436
+ # lifecycle events.
10437
+ class GoogleCloudDialogflowV2beta1ConversationEvent
10438
+ include Google::Apis::Core::Hashable
10439
+
10440
+ # Required. The unique identifier of the conversation this notification refers
10441
+ # to. Format: `projects//conversations/`.
10442
+ # Corresponds to the JSON property `conversation`
10443
+ # @return [String]
10444
+ attr_accessor :conversation
10445
+
10446
+ # The `Status` type defines a logical error model that is suitable for different
10447
+ # programming environments, including REST APIs and RPC APIs. It is used by [
10448
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
10449
+ # data: error code, error message, and error details. You can find out more
10450
+ # about this error model and how to work with it in the [API Design Guide](https:
10451
+ # //cloud.google.com/apis/design/errors).
10452
+ # Corresponds to the JSON property `errorStatus`
10453
+ # @return [Google::Apis::DialogflowV2::GoogleRpcStatus]
10454
+ attr_accessor :error_status
10455
+
10456
+ # Represents a message posted into a conversation.
10457
+ # Corresponds to the JSON property `newMessagePayload`
10458
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1Message]
10459
+ attr_accessor :new_message_payload
10460
+
10461
+ # Required. The type of the event that this notification refers to.
10462
+ # Corresponds to the JSON property `type`
10463
+ # @return [String]
10464
+ attr_accessor :type
10465
+
10466
+ def initialize(**args)
10467
+ update!(**args)
10468
+ end
10469
+
10470
+ # Update properties of this object
10471
+ def update!(**args)
10472
+ @conversation = args[:conversation] if args.key?(:conversation)
10473
+ @error_status = args[:error_status] if args.key?(:error_status)
10474
+ @new_message_payload = args[:new_message_payload] if args.key?(:new_message_payload)
10475
+ @type = args[:type] if args.key?(:type)
10476
+ end
10477
+ end
10478
+
8315
10479
  # Each intent parameter has a type, called the entity type, which dictates
8316
10480
  # exactly how data from an end-user expression is extracted. Dialogflow provides
8317
10481
  # predefined system entities that can match many common types of data. For
@@ -8405,38 +10569,157 @@ module Google
8405
10569
  end
8406
10570
  end
8407
10571
 
8408
- # Events allow for matching intents by event name instead of the natural
8409
- # language input. For instance, input `` can trigger a personalized welcome
8410
- # response. The parameter `name` may be used by the agent in the response: `"
8411
- # Hello #welcome_event.name! What can I do for you today?"`.
8412
- class GoogleCloudDialogflowV2beta1EventInput
10572
+ # Events allow for matching intents by event name instead of the natural
10573
+ # language input. For instance, input `` can trigger a personalized welcome
10574
+ # response. The parameter `name` may be used by the agent in the response: `"
10575
+ # Hello #welcome_event.name! What can I do for you today?"`.
10576
+ class GoogleCloudDialogflowV2beta1EventInput
10577
+ include Google::Apis::Core::Hashable
10578
+
10579
+ # Required. The language of this query. See [Language Support](https://cloud.
10580
+ # google.com/dialogflow/docs/reference/language) for a list of the currently
10581
+ # supported language codes. Note that queries in the same session do not
10582
+ # necessarily need to specify the same language.
10583
+ # Corresponds to the JSON property `languageCode`
10584
+ # @return [String]
10585
+ attr_accessor :language_code
10586
+
10587
+ # Required. The unique identifier of the event.
10588
+ # Corresponds to the JSON property `name`
10589
+ # @return [String]
10590
+ attr_accessor :name
10591
+
10592
+ # The collection of parameters associated with the event. Depending on your
10593
+ # protocol or client library language, this is a map, associative array, symbol
10594
+ # table, dictionary, or JSON object composed of a collection of (MapKey,
10595
+ # MapValue) pairs: - MapKey type: string - MapKey value: parameter name -
10596
+ # MapValue type: - If parameter's entity type is a composite entity: map - Else:
10597
+ # depending on parameter value type, could be one of string, number, boolean,
10598
+ # null, list or map - MapValue value: - If parameter's entity type is a
10599
+ # composite entity: map from composite entity property names to property values -
10600
+ # Else: parameter value
10601
+ # Corresponds to the JSON property `parameters`
10602
+ # @return [Hash<String,Object>]
10603
+ attr_accessor :parameters
10604
+
10605
+ def initialize(**args)
10606
+ update!(**args)
10607
+ end
10608
+
10609
+ # Update properties of this object
10610
+ def update!(**args)
10611
+ @language_code = args[:language_code] if args.key?(:language_code)
10612
+ @name = args[:name] if args.key?(:name)
10613
+ @parameters = args[:parameters] if args.key?(:parameters)
10614
+ end
10615
+ end
10616
+
10617
+ # The response message for Agents.ExportAgent.
10618
+ class GoogleCloudDialogflowV2beta1ExportAgentResponse
10619
+ include Google::Apis::Core::Hashable
10620
+
10621
+ # Zip compressed raw byte content for agent.
10622
+ # Corresponds to the JSON property `agentContent`
10623
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
10624
+ # @return [String]
10625
+ attr_accessor :agent_content
10626
+
10627
+ # The URI to a file containing the exported agent. This field is populated only
10628
+ # if `agent_uri` is specified in `ExportAgentRequest`.
10629
+ # Corresponds to the JSON property `agentUri`
10630
+ # @return [String]
10631
+ attr_accessor :agent_uri
10632
+
10633
+ def initialize(**args)
10634
+ update!(**args)
10635
+ end
10636
+
10637
+ # Update properties of this object
10638
+ def update!(**args)
10639
+ @agent_content = args[:agent_content] if args.key?(:agent_content)
10640
+ @agent_uri = args[:agent_uri] if args.key?(:agent_uri)
10641
+ end
10642
+ end
10643
+
10644
+ # Represents answer from "frequently asked questions".
10645
+ class GoogleCloudDialogflowV2beta1FaqAnswer
10646
+ include Google::Apis::Core::Hashable
10647
+
10648
+ # The piece of text from the `source` knowledge base document.
10649
+ # Corresponds to the JSON property `answer`
10650
+ # @return [String]
10651
+ attr_accessor :answer
10652
+
10653
+ # The name of answer record, in the format of "projects//locations//
10654
+ # answerRecords/"
10655
+ # Corresponds to the JSON property `answerRecord`
10656
+ # @return [String]
10657
+ attr_accessor :answer_record
10658
+
10659
+ # The system's confidence score that this Knowledge answer is a good match for
10660
+ # this conversational query, range from 0.0 (completely uncertain) to 1.0 (
10661
+ # completely certain).
10662
+ # Corresponds to the JSON property `confidence`
10663
+ # @return [Float]
10664
+ attr_accessor :confidence
10665
+
10666
+ # A map that contains metadata about the answer and the document from which it
10667
+ # originates.
10668
+ # Corresponds to the JSON property `metadata`
10669
+ # @return [Hash<String,String>]
10670
+ attr_accessor :metadata
10671
+
10672
+ # The corresponding FAQ question.
10673
+ # Corresponds to the JSON property `question`
10674
+ # @return [String]
10675
+ attr_accessor :question
10676
+
10677
+ # Indicates which Knowledge Document this answer was extracted from. Format: `
10678
+ # projects//locations//agent/knowledgeBases//documents/`.
10679
+ # Corresponds to the JSON property `source`
10680
+ # @return [String]
10681
+ attr_accessor :source
10682
+
10683
+ def initialize(**args)
10684
+ update!(**args)
10685
+ end
10686
+
10687
+ # Update properties of this object
10688
+ def update!(**args)
10689
+ @answer = args[:answer] if args.key?(:answer)
10690
+ @answer_record = args[:answer_record] if args.key?(:answer_record)
10691
+ @confidence = args[:confidence] if args.key?(:confidence)
10692
+ @metadata = args[:metadata] if args.key?(:metadata)
10693
+ @question = args[:question] if args.key?(:question)
10694
+ @source = args[:source] if args.key?(:source)
10695
+ end
10696
+ end
10697
+
10698
+ # Output only. Represents a notification sent to Pub/Sub subscribers for agent
10699
+ # assistant events in a specific conversation.
10700
+ class GoogleCloudDialogflowV2beta1HumanAgentAssistantEvent
8413
10701
  include Google::Apis::Core::Hashable
8414
10702
 
8415
- # Required. The language of this query. See [Language Support](https://cloud.
8416
- # google.com/dialogflow/docs/reference/language) for a list of the currently
8417
- # supported language codes. Note that queries in the same session do not
8418
- # necessarily need to specify the same language.
8419
- # Corresponds to the JSON property `languageCode`
10703
+ # The conversation this notification refers to. Format: `projects//conversations/
10704
+ # `.
10705
+ # Corresponds to the JSON property `conversation`
8420
10706
  # @return [String]
8421
- attr_accessor :language_code
10707
+ attr_accessor :conversation
8422
10708
 
8423
- # Required. The unique identifier of the event.
8424
- # Corresponds to the JSON property `name`
10709
+ # The participant that the suggestion is compiled for. And This field is used to
10710
+ # call Participants.ListSuggestions API. Format: `projects//conversations//
10711
+ # participants/`. It will not be set in legacy workflow.
10712
+ # HumanAgentAssistantConfig.name for more information.
10713
+ # Corresponds to the JSON property `participant`
8425
10714
  # @return [String]
8426
- attr_accessor :name
10715
+ attr_accessor :participant
8427
10716
 
8428
- # The collection of parameters associated with the event. Depending on your
8429
- # protocol or client library language, this is a map, associative array, symbol
8430
- # table, dictionary, or JSON object composed of a collection of (MapKey,
8431
- # MapValue) pairs: - MapKey type: string - MapKey value: parameter name -
8432
- # MapValue type: - If parameter's entity type is a composite entity: map - Else:
8433
- # depending on parameter value type, could be one of string, number, boolean,
8434
- # null, list or map - MapValue value: - If parameter's entity type is a
8435
- # composite entity: map from composite entity property names to property values -
8436
- # Else: parameter value
8437
- # Corresponds to the JSON property `parameters`
8438
- # @return [Hash<String,Object>]
8439
- attr_accessor :parameters
10717
+ # The suggestion results payload that this notification refers to. It will only
10718
+ # be set when HumanAgentAssistantConfig.SuggestionConfig.
10719
+ # group_suggestion_responses sets to true.
10720
+ # Corresponds to the JSON property `suggestionResults`
10721
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1SuggestionResult>]
10722
+ attr_accessor :suggestion_results
8440
10723
 
8441
10724
  def initialize(**args)
8442
10725
  update!(**args)
@@ -8444,27 +10727,20 @@ module Google
8444
10727
 
8445
10728
  # Update properties of this object
8446
10729
  def update!(**args)
8447
- @language_code = args[:language_code] if args.key?(:language_code)
8448
- @name = args[:name] if args.key?(:name)
8449
- @parameters = args[:parameters] if args.key?(:parameters)
10730
+ @conversation = args[:conversation] if args.key?(:conversation)
10731
+ @participant = args[:participant] if args.key?(:participant)
10732
+ @suggestion_results = args[:suggestion_results] if args.key?(:suggestion_results)
8450
10733
  end
8451
10734
  end
8452
10735
 
8453
- # The response message for Agents.ExportAgent.
8454
- class GoogleCloudDialogflowV2beta1ExportAgentResponse
10736
+ # Response message for Documents.ImportDocuments.
10737
+ class GoogleCloudDialogflowV2beta1ImportDocumentsResponse
8455
10738
  include Google::Apis::Core::Hashable
8456
10739
 
8457
- # Zip compressed raw byte content for agent.
8458
- # Corresponds to the JSON property `agentContent`
8459
- # NOTE: Values are automatically base64 encoded/decoded in the client library.
8460
- # @return [String]
8461
- attr_accessor :agent_content
8462
-
8463
- # The URI to a file containing the exported agent. This field is populated only
8464
- # if `agent_uri` is specified in `ExportAgentRequest`.
8465
- # Corresponds to the JSON property `agentUri`
8466
- # @return [String]
8467
- attr_accessor :agent_uri
10740
+ # Includes details about skipped documents or any other warnings.
10741
+ # Corresponds to the JSON property `warnings`
10742
+ # @return [Array<Google::Apis::DialogflowV2::GoogleRpcStatus>]
10743
+ attr_accessor :warnings
8468
10744
 
8469
10745
  def initialize(**args)
8470
10746
  update!(**args)
@@ -8472,8 +10748,7 @@ module Google
8472
10748
 
8473
10749
  # Update properties of this object
8474
10750
  def update!(**args)
8475
- @agent_content = args[:agent_content] if args.key?(:agent_content)
8476
- @agent_uri = args[:agent_uri] if args.key?(:agent_uri)
10751
+ @warnings = args[:warnings] if args.key?(:warnings)
8477
10752
  end
8478
10753
  end
8479
10754
 
@@ -8539,6 +10814,14 @@ module Google
8539
10814
  attr_accessor :is_fallback
8540
10815
  alias_method :is_fallback?, :is_fallback
8541
10816
 
10817
+ # Optional. Indicates that a live agent should be brought in to handle the
10818
+ # interaction with the user. In most cases, when you set this flag to true, you
10819
+ # would also want to set end_interaction to true as well. Default is false.
10820
+ # Corresponds to the JSON property `liveAgentHandoff`
10821
+ # @return [Boolean]
10822
+ attr_accessor :live_agent_handoff
10823
+ alias_method :live_agent_handoff?, :live_agent_handoff
10824
+
8542
10825
  # Optional. The collection of rich messages corresponding to the `Response`
8543
10826
  # field in the Dialogflow console.
8544
10827
  # Corresponds to the JSON property `messages`
@@ -8643,6 +10926,7 @@ module Google
8643
10926
  @followup_intent_info = args[:followup_intent_info] if args.key?(:followup_intent_info)
8644
10927
  @input_context_names = args[:input_context_names] if args.key?(:input_context_names)
8645
10928
  @is_fallback = args[:is_fallback] if args.key?(:is_fallback)
10929
+ @live_agent_handoff = args[:live_agent_handoff] if args.key?(:live_agent_handoff)
8646
10930
  @messages = args[:messages] if args.key?(:messages)
8647
10931
  @ml_disabled = args[:ml_disabled] if args.key?(:ml_disabled)
8648
10932
  @ml_enabled = args[:ml_enabled] if args.key?(:ml_enabled)
@@ -10285,6 +12569,110 @@ module Google
10285
12569
  end
10286
12570
  end
10287
12571
 
12572
+ # Represents a message posted into a conversation.
12573
+ class GoogleCloudDialogflowV2beta1Message
12574
+ include Google::Apis::Core::Hashable
12575
+
12576
+ # Required. The message content.
12577
+ # Corresponds to the JSON property `content`
12578
+ # @return [String]
12579
+ attr_accessor :content
12580
+
12581
+ # Output only. The time when the message was created in Contact Center AI.
12582
+ # Corresponds to the JSON property `createTime`
12583
+ # @return [String]
12584
+ attr_accessor :create_time
12585
+
12586
+ # Optional. The message language. This should be a [BCP-47](https://www.rfc-
12587
+ # editor.org/rfc/bcp/bcp47.txt) language tag. Example: "en-US".
12588
+ # Corresponds to the JSON property `languageCode`
12589
+ # @return [String]
12590
+ attr_accessor :language_code
12591
+
12592
+ # Represents the result of annotation for the message.
12593
+ # Corresponds to the JSON property `messageAnnotation`
12594
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1MessageAnnotation]
12595
+ attr_accessor :message_annotation
12596
+
12597
+ # Optional. The unique identifier of the message. Format: `projects//locations//
12598
+ # conversations//messages/`.
12599
+ # Corresponds to the JSON property `name`
12600
+ # @return [String]
12601
+ attr_accessor :name
12602
+
12603
+ # Output only. The participant that sends this message.
12604
+ # Corresponds to the JSON property `participant`
12605
+ # @return [String]
12606
+ attr_accessor :participant
12607
+
12608
+ # Output only. The role of the participant.
12609
+ # Corresponds to the JSON property `participantRole`
12610
+ # @return [String]
12611
+ attr_accessor :participant_role
12612
+
12613
+ # Optional. The time when the message was sent.
12614
+ # Corresponds to the JSON property `sendTime`
12615
+ # @return [String]
12616
+ attr_accessor :send_time
12617
+
12618
+ # The result of sentiment analysis. Sentiment analysis inspects user input and
12619
+ # identifies the prevailing subjective opinion, especially to determine a user's
12620
+ # attitude as positive, negative, or neutral. For Participants.DetectIntent, it
12621
+ # needs to be configured in DetectIntentRequest.query_params. For Participants.
12622
+ # StreamingDetectIntent, it needs to be configured in
12623
+ # StreamingDetectIntentRequest.query_params. And for Participants.AnalyzeContent
12624
+ # and Participants.StreamingAnalyzeContent, it needs to be configured in
12625
+ # ConversationProfile.human_agent_assistant_config
12626
+ # Corresponds to the JSON property `sentimentAnalysis`
12627
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1SentimentAnalysisResult]
12628
+ attr_accessor :sentiment_analysis
12629
+
12630
+ def initialize(**args)
12631
+ update!(**args)
12632
+ end
12633
+
12634
+ # Update properties of this object
12635
+ def update!(**args)
12636
+ @content = args[:content] if args.key?(:content)
12637
+ @create_time = args[:create_time] if args.key?(:create_time)
12638
+ @language_code = args[:language_code] if args.key?(:language_code)
12639
+ @message_annotation = args[:message_annotation] if args.key?(:message_annotation)
12640
+ @name = args[:name] if args.key?(:name)
12641
+ @participant = args[:participant] if args.key?(:participant)
12642
+ @participant_role = args[:participant_role] if args.key?(:participant_role)
12643
+ @send_time = args[:send_time] if args.key?(:send_time)
12644
+ @sentiment_analysis = args[:sentiment_analysis] if args.key?(:sentiment_analysis)
12645
+ end
12646
+ end
12647
+
12648
+ # Represents the result of annotation for the message.
12649
+ class GoogleCloudDialogflowV2beta1MessageAnnotation
12650
+ include Google::Apis::Core::Hashable
12651
+
12652
+ # Required. Indicates whether the text message contains entities.
12653
+ # Corresponds to the JSON property `containEntities`
12654
+ # @return [Boolean]
12655
+ attr_accessor :contain_entities
12656
+ alias_method :contain_entities?, :contain_entities
12657
+
12658
+ # Optional. The collection of annotated message parts ordered by their position
12659
+ # in the message. You can recover the annotated message by concatenating [
12660
+ # AnnotatedMessagePart.text].
12661
+ # Corresponds to the JSON property `parts`
12662
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1AnnotatedMessagePart>]
12663
+ attr_accessor :parts
12664
+
12665
+ def initialize(**args)
12666
+ update!(**args)
12667
+ end
12668
+
12669
+ # Update properties of this object
12670
+ def update!(**args)
12671
+ @contain_entities = args[:contain_entities] if args.key?(:contain_entities)
12672
+ @parts = args[:parts] if args.key?(:parts)
12673
+ end
12674
+ end
12675
+
10288
12676
  # Represents the contents of the original request that was passed to the `[
10289
12677
  # Streaming]DetectIntent` call.
10290
12678
  class GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest
@@ -10585,6 +12973,188 @@ module Google
10585
12973
  end
10586
12974
  end
10587
12975
 
12976
+ # Represents a smart reply answer.
12977
+ class GoogleCloudDialogflowV2beta1SmartReplyAnswer
12978
+ include Google::Apis::Core::Hashable
12979
+
12980
+ # The name of answer record, in the format of "projects//locations//
12981
+ # answerRecords/"
12982
+ # Corresponds to the JSON property `answerRecord`
12983
+ # @return [String]
12984
+ attr_accessor :answer_record
12985
+
12986
+ # Smart reply confidence. The system's confidence score that this reply is a
12987
+ # good match for this conversation, as a value from 0.0 (completely uncertain)
12988
+ # to 1.0 (completely certain).
12989
+ # Corresponds to the JSON property `confidence`
12990
+ # @return [Float]
12991
+ attr_accessor :confidence
12992
+
12993
+ # The content of the reply.
12994
+ # Corresponds to the JSON property `reply`
12995
+ # @return [String]
12996
+ attr_accessor :reply
12997
+
12998
+ def initialize(**args)
12999
+ update!(**args)
13000
+ end
13001
+
13002
+ # Update properties of this object
13003
+ def update!(**args)
13004
+ @answer_record = args[:answer_record] if args.key?(:answer_record)
13005
+ @confidence = args[:confidence] if args.key?(:confidence)
13006
+ @reply = args[:reply] if args.key?(:reply)
13007
+ end
13008
+ end
13009
+
13010
+ # The response message for Participants.SuggestArticles.
13011
+ class GoogleCloudDialogflowV2beta1SuggestArticlesResponse
13012
+ include Google::Apis::Core::Hashable
13013
+
13014
+ # Output only. Articles ordered by score in descending order.
13015
+ # Corresponds to the JSON property `articleAnswers`
13016
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1ArticleAnswer>]
13017
+ attr_accessor :article_answers
13018
+
13019
+ # Number of messages prior to and including latest_message to compile the
13020
+ # suggestion. It may be smaller than the SuggestArticlesResponse.context_size
13021
+ # field in the request if there aren't that many messages in the conversation.
13022
+ # Corresponds to the JSON property `contextSize`
13023
+ # @return [Fixnum]
13024
+ attr_accessor :context_size
13025
+
13026
+ # The name of the latest conversation message used to compile suggestion for.
13027
+ # Format: `projects//locations//conversations//messages/`.
13028
+ # Corresponds to the JSON property `latestMessage`
13029
+ # @return [String]
13030
+ attr_accessor :latest_message
13031
+
13032
+ def initialize(**args)
13033
+ update!(**args)
13034
+ end
13035
+
13036
+ # Update properties of this object
13037
+ def update!(**args)
13038
+ @article_answers = args[:article_answers] if args.key?(:article_answers)
13039
+ @context_size = args[:context_size] if args.key?(:context_size)
13040
+ @latest_message = args[:latest_message] if args.key?(:latest_message)
13041
+ end
13042
+ end
13043
+
13044
+ # The request message for Participants.SuggestFaqAnswers.
13045
+ class GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse
13046
+ include Google::Apis::Core::Hashable
13047
+
13048
+ # Number of messages prior to and including latest_message to compile the
13049
+ # suggestion. It may be smaller than the SuggestFaqAnswersRequest.context_size
13050
+ # field in the request if there aren't that many messages in the conversation.
13051
+ # Corresponds to the JSON property `contextSize`
13052
+ # @return [Fixnum]
13053
+ attr_accessor :context_size
13054
+
13055
+ # Output only. Answers extracted from FAQ documents.
13056
+ # Corresponds to the JSON property `faqAnswers`
13057
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1FaqAnswer>]
13058
+ attr_accessor :faq_answers
13059
+
13060
+ # The name of the latest conversation message used to compile suggestion for.
13061
+ # Format: `projects//locations//conversations//messages/`.
13062
+ # Corresponds to the JSON property `latestMessage`
13063
+ # @return [String]
13064
+ attr_accessor :latest_message
13065
+
13066
+ def initialize(**args)
13067
+ update!(**args)
13068
+ end
13069
+
13070
+ # Update properties of this object
13071
+ def update!(**args)
13072
+ @context_size = args[:context_size] if args.key?(:context_size)
13073
+ @faq_answers = args[:faq_answers] if args.key?(:faq_answers)
13074
+ @latest_message = args[:latest_message] if args.key?(:latest_message)
13075
+ end
13076
+ end
13077
+
13078
+ # The response message for Participants.SuggestSmartReplies.
13079
+ class GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse
13080
+ include Google::Apis::Core::Hashable
13081
+
13082
+ # Number of messages prior to and including latest_message to compile the
13083
+ # suggestion. It may be smaller than the SuggestSmartRepliesRequest.context_size
13084
+ # field in the request if there aren't that many messages in the conversation.
13085
+ # Corresponds to the JSON property `contextSize`
13086
+ # @return [Fixnum]
13087
+ attr_accessor :context_size
13088
+
13089
+ # The name of the latest conversation message used to compile suggestion for.
13090
+ # Format: `projects//locations//conversations//messages/`.
13091
+ # Corresponds to the JSON property `latestMessage`
13092
+ # @return [String]
13093
+ attr_accessor :latest_message
13094
+
13095
+ # Output only. Multiple reply options provided by smart reply service. The order
13096
+ # is based on the rank of the model prediction. The maximum number of the
13097
+ # returned replies is set in SmartReplyConfig.
13098
+ # Corresponds to the JSON property `smartReplyAnswers`
13099
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1SmartReplyAnswer>]
13100
+ attr_accessor :smart_reply_answers
13101
+
13102
+ def initialize(**args)
13103
+ update!(**args)
13104
+ end
13105
+
13106
+ # Update properties of this object
13107
+ def update!(**args)
13108
+ @context_size = args[:context_size] if args.key?(:context_size)
13109
+ @latest_message = args[:latest_message] if args.key?(:latest_message)
13110
+ @smart_reply_answers = args[:smart_reply_answers] if args.key?(:smart_reply_answers)
13111
+ end
13112
+ end
13113
+
13114
+ # One response of different type of suggestion response which is used in the
13115
+ # response of Participants.AnalyzeContent and Participants.AnalyzeContent, as
13116
+ # well as HumanAgentAssistantEvent.
13117
+ class GoogleCloudDialogflowV2beta1SuggestionResult
13118
+ include Google::Apis::Core::Hashable
13119
+
13120
+ # The `Status` type defines a logical error model that is suitable for different
13121
+ # programming environments, including REST APIs and RPC APIs. It is used by [
13122
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
13123
+ # data: error code, error message, and error details. You can find out more
13124
+ # about this error model and how to work with it in the [API Design Guide](https:
13125
+ # //cloud.google.com/apis/design/errors).
13126
+ # Corresponds to the JSON property `error`
13127
+ # @return [Google::Apis::DialogflowV2::GoogleRpcStatus]
13128
+ attr_accessor :error
13129
+
13130
+ # The response message for Participants.SuggestArticles.
13131
+ # Corresponds to the JSON property `suggestArticlesResponse`
13132
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1SuggestArticlesResponse]
13133
+ attr_accessor :suggest_articles_response
13134
+
13135
+ # The request message for Participants.SuggestFaqAnswers.
13136
+ # Corresponds to the JSON property `suggestFaqAnswersResponse`
13137
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse]
13138
+ attr_accessor :suggest_faq_answers_response
13139
+
13140
+ # The response message for Participants.SuggestSmartReplies.
13141
+ # Corresponds to the JSON property `suggestSmartRepliesResponse`
13142
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse]
13143
+ attr_accessor :suggest_smart_replies_response
13144
+
13145
+ def initialize(**args)
13146
+ update!(**args)
13147
+ end
13148
+
13149
+ # Update properties of this object
13150
+ def update!(**args)
13151
+ @error = args[:error] if args.key?(:error)
13152
+ @suggest_articles_response = args[:suggest_articles_response] if args.key?(:suggest_articles_response)
13153
+ @suggest_faq_answers_response = args[:suggest_faq_answers_response] if args.key?(:suggest_faq_answers_response)
13154
+ @suggest_smart_replies_response = args[:suggest_smart_replies_response] if args.key?(:suggest_smart_replies_response)
13155
+ end
13156
+ end
13157
+
10588
13158
  # The request message for a webhook call.
10589
13159
  class GoogleCloudDialogflowV2beta1WebhookRequest
10590
13160
  include Google::Apis::Core::Hashable
@@ -10675,6 +13245,14 @@ module Google
10675
13245
  # @return [String]
10676
13246
  attr_accessor :fulfillment_text
10677
13247
 
13248
+ # Indicates that a live agent should be brought in to handle the interaction
13249
+ # with the user. In most cases, when you set this flag to true, you would also
13250
+ # want to set end_interaction to true as well. Default is false.
13251
+ # Corresponds to the JSON property `liveAgentHandoff`
13252
+ # @return [Boolean]
13253
+ attr_accessor :live_agent_handoff
13254
+ alias_method :live_agent_handoff?, :live_agent_handoff
13255
+
10678
13256
  # Optional. The collection of output contexts that will overwrite currently
10679
13257
  # active contexts for the session and reset their lifespans. When provided,
10680
13258
  # Dialogflow uses this field to populate QueryResult.output_contexts sent to the
@@ -10721,6 +13299,7 @@ module Google
10721
13299
  @followup_event_input = args[:followup_event_input] if args.key?(:followup_event_input)
10722
13300
  @fulfillment_messages = args[:fulfillment_messages] if args.key?(:fulfillment_messages)
10723
13301
  @fulfillment_text = args[:fulfillment_text] if args.key?(:fulfillment_text)
13302
+ @live_agent_handoff = args[:live_agent_handoff] if args.key?(:live_agent_handoff)
10724
13303
  @output_contexts = args[:output_contexts] if args.key?(:output_contexts)
10725
13304
  @payload = args[:payload] if args.key?(:payload)
10726
13305
  @session_entity_types = args[:session_entity_types] if args.key?(:session_entity_types)