google-apis-dialogflow_v2 0.6.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 62bd91152015e994fc4a5362958275b320bfe25467e611ffadf8826d328b62fb
4
- data.tar.gz: f65441f6855d27a42e9aa4709737cf57a6fda39fb3e2a02f32c9aeeb541dc8cf
3
+ metadata.gz: 7aae3b7a44d355f89bf7c9e5386ef5034c802ddf5ca8bcc5a95e833e95e1b00d
4
+ data.tar.gz: db3e584fc3fd2cd6ab940e2e9e364b523dba879929e259f30bbd85d5c43d72d6
5
5
  SHA512:
6
- metadata.gz: 3135261702b3d62dbc0718c155c75bca37d7c65e3a2c0fb4ff9a0b3adaaafafbf63f77991441ceb587a406542e8aff1221b0807b32d31e63efc72f96d58f1d7c
7
- data.tar.gz: d30485e2e088fbe8d87872d7b99394973338ebfed4ee7e107b00d2dc4b519c32f50baa94e1f1ae3d042902816ea0389ab1d81456bf92108dbc0826d719107023
6
+ metadata.gz: bfff895545ddfafeb4560038659a6a395632d20429f0cd8b63090a85cbd1f7a83526cc7d95b62355a755cdfeb3bb5071a76366443e3b1aa1b6a4c6bce2682527
7
+ data.tar.gz: fafd9e7ac503f2b1aa31916fdaed7783e54ad50ff2f77c2bcb58a93554ed9ff611b48342fdae22029487570db2d091dfb30f0223fc63caed9a6e11364c78d3f9
data/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Release history for google-apis-dialogflow_v2
2
2
 
3
+ ### v0.11.0 (2021-04-28)
4
+
5
+ * Regenerated from discovery document revision 20210426
6
+
7
+ ### v0.10.0 (2021-04-01)
8
+
9
+ * Regenerated from discovery document revision 20210329
10
+
11
+ ### v0.9.0 (2021-03-23)
12
+
13
+ * Regenerated from discovery document revision 20210320
14
+
15
+ ### v0.8.0 (2021-03-19)
16
+
17
+ * Regenerated from discovery document revision 20210318
18
+
19
+ ### v0.7.0 (2021-03-09)
20
+
21
+ * Regenerated from discovery document revision 20210307
22
+ * Regenerated using generator version 0.2.0
23
+
3
24
  ### v0.6.0 (2021-03-04)
4
25
 
5
26
  * Unspecified changes
@@ -30,7 +30,7 @@ module Google
30
30
  # This is NOT the gem version.
31
31
  VERSION = 'V2'
32
32
 
33
- # View and manage your data across Google Cloud Platform services
33
+ # See, edit, configure, and delete your Google Cloud Platform data
34
34
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
35
35
 
36
36
  # View, manage and query your Dialogflow agents
@@ -415,6 +415,33 @@ module Google
415
415
  end
416
416
  end
417
417
 
418
+ # The response message for Flows.ExportFlow.
419
+ class GoogleCloudDialogflowCxV3ExportFlowResponse
420
+ include Google::Apis::Core::Hashable
421
+
422
+ # Uncompressed raw byte content for flow.
423
+ # Corresponds to the JSON property `flowContent`
424
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
425
+ # @return [String]
426
+ attr_accessor :flow_content
427
+
428
+ # The URI to a file containing the exported flow. This field is populated only
429
+ # if `flow_uri` is specified in ExportFlowRequest.
430
+ # Corresponds to the JSON property `flowUri`
431
+ # @return [String]
432
+ attr_accessor :flow_uri
433
+
434
+ def initialize(**args)
435
+ update!(**args)
436
+ end
437
+
438
+ # Update properties of this object
439
+ def update!(**args)
440
+ @flow_content = args[:flow_content] if args.key?(:flow_content)
441
+ @flow_uri = args[:flow_uri] if args.key?(:flow_uri)
442
+ end
443
+ end
444
+
418
445
  # Metadata returned for the TestCases.ExportTestCases long running operation.
419
446
  class GoogleCloudDialogflowCxV3ExportTestCasesMetadata
420
447
  include Google::Apis::Core::Hashable
@@ -813,6 +840,26 @@ module Google
813
840
  end
814
841
  end
815
842
 
843
+ # The response message for Flows.ImportFlow.
844
+ class GoogleCloudDialogflowCxV3ImportFlowResponse
845
+ include Google::Apis::Core::Hashable
846
+
847
+ # The unique identifier of the new flow. Format: `projects//locations//agents//
848
+ # flows/`.
849
+ # Corresponds to the JSON property `flow`
850
+ # @return [String]
851
+ attr_accessor :flow
852
+
853
+ def initialize(**args)
854
+ update!(**args)
855
+ end
856
+
857
+ # Update properties of this object
858
+ def update!(**args)
859
+ @flow = args[:flow] if args.key?(:flow)
860
+ end
861
+ end
862
+
816
863
  # Metadata returned for the TestCases.ImportTestCases long running operation.
817
864
  class GoogleCloudDialogflowCxV3ImportTestCasesMetadata
818
865
  include Google::Apis::Core::Hashable
@@ -936,8 +983,8 @@ module Google
936
983
  class GoogleCloudDialogflowCxV3Intent
937
984
  include Google::Apis::Core::Hashable
938
985
 
939
- # Optional. Human readable description for better understanding an intent like
940
- # its scope, content, result etc. Maximum character limit: 140 characters.
986
+ # Human readable description for better understanding an intent like its scope,
987
+ # content, result etc. Maximum character limit: 140 characters.
941
988
  # Corresponds to the JSON property `description`
942
989
  # @return [String]
943
990
  attr_accessor :description
@@ -957,14 +1004,14 @@ module Google
957
1004
  attr_accessor :is_fallback
958
1005
  alias_method :is_fallback?, :is_fallback
959
1006
 
960
- # Optional. The key/value metadata to label an intent. Labels can contain
961
- # lowercase letters, digits and the symbols '-' and '_'. International
962
- # characters are allowed, including letters from unicase alphabets. Keys must
963
- # start with a letter. Keys and values can be no longer than 63 characters and
964
- # no more than 128 bytes. Prefix "sys." is reserved for Dialogflow defined
965
- # labels. Currently allowed Dialogflow defined labels include: * sys.head * sys.
966
- # contextual The above labels do not require value. "sys.head" means the intent
967
- # is a head intent. "sys.contextual" means the intent is a contextual intent.
1007
+ # The key/value metadata to label an intent. Labels can contain lowercase
1008
+ # letters, digits and the symbols '-' and '_'. International characters are
1009
+ # allowed, including letters from unicase alphabets. Keys must start with a
1010
+ # letter. Keys and values can be no longer than 63 characters and no more than
1011
+ # 128 bytes. Prefix "sys." is reserved for Dialogflow defined labels. Currently
1012
+ # allowed Dialogflow defined labels include: * sys.head * sys.contextual The
1013
+ # above labels do not require value. "sys.head" means the intent is a head
1014
+ # intent. "sys.contextual" means the intent is a contextual intent.
968
1015
  # Corresponds to the JSON property `labels`
969
1016
  # @return [Hash<String,String>]
970
1017
  attr_accessor :labels
@@ -2128,7 +2175,8 @@ module Google
2128
2175
  end
2129
2176
  end
2130
2177
 
2131
- # The request message for a webhook call.
2178
+ # The request message for a webhook call. The request is sent as a JSON object
2179
+ # and the field names will be presented in camel cases.
2132
2180
  class GoogleCloudDialogflowCxV3WebhookRequest
2133
2181
  include Google::Apis::Core::Hashable
2134
2182
 
@@ -2148,6 +2196,11 @@ module Google
2148
2196
  # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowCxV3WebhookRequestIntentInfo]
2149
2197
  attr_accessor :intent_info
2150
2198
 
2199
+ # The language code specified in the original request.
2200
+ # Corresponds to the JSON property `languageCode`
2201
+ # @return [String]
2202
+ attr_accessor :language_code
2203
+
2151
2204
  # The list of rich message responses to present to the user. Webhook can choose
2152
2205
  # to append or replace this list in WebhookResponse.fulfillment_response;
2153
2206
  # Corresponds to the JSON property `messages`
@@ -2174,6 +2227,30 @@ module Google
2174
2227
  # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowCxV3SessionInfo]
2175
2228
  attr_accessor :session_info
2176
2229
 
2230
+ # If natural language text was provided as input, this field will contain a copy
2231
+ # of the text.
2232
+ # Corresponds to the JSON property `text`
2233
+ # @return [String]
2234
+ attr_accessor :text
2235
+
2236
+ # If natural language speech audio was provided as input, this field will
2237
+ # contain the transcript for the audio.
2238
+ # Corresponds to the JSON property `transcript`
2239
+ # @return [String]
2240
+ attr_accessor :transcript
2241
+
2242
+ # If an event was provided as input, this field will contain the name of the
2243
+ # event.
2244
+ # Corresponds to the JSON property `triggerEvent`
2245
+ # @return [String]
2246
+ attr_accessor :trigger_event
2247
+
2248
+ # If an intent was provided as input, this field will contain a copy of the
2249
+ # intent identifier. Format: `projects//locations//agents//intents/`.
2250
+ # Corresponds to the JSON property `triggerIntent`
2251
+ # @return [String]
2252
+ attr_accessor :trigger_intent
2253
+
2177
2254
  def initialize(**args)
2178
2255
  update!(**args)
2179
2256
  end
@@ -2183,11 +2260,16 @@ module Google
2183
2260
  @detect_intent_response_id = args[:detect_intent_response_id] if args.key?(:detect_intent_response_id)
2184
2261
  @fulfillment_info = args[:fulfillment_info] if args.key?(:fulfillment_info)
2185
2262
  @intent_info = args[:intent_info] if args.key?(:intent_info)
2263
+ @language_code = args[:language_code] if args.key?(:language_code)
2186
2264
  @messages = args[:messages] if args.key?(:messages)
2187
2265
  @page_info = args[:page_info] if args.key?(:page_info)
2188
2266
  @payload = args[:payload] if args.key?(:payload)
2189
2267
  @sentiment_analysis_result = args[:sentiment_analysis_result] if args.key?(:sentiment_analysis_result)
2190
2268
  @session_info = args[:session_info] if args.key?(:session_info)
2269
+ @text = args[:text] if args.key?(:text)
2270
+ @transcript = args[:transcript] if args.key?(:transcript)
2271
+ @trigger_event = args[:trigger_event] if args.key?(:trigger_event)
2272
+ @trigger_intent = args[:trigger_intent] if args.key?(:trigger_intent)
2191
2273
  end
2192
2274
  end
2193
2275
 
@@ -2773,6 +2855,33 @@ module Google
2773
2855
  end
2774
2856
  end
2775
2857
 
2858
+ # The response message for Flows.ExportFlow.
2859
+ class GoogleCloudDialogflowCxV3beta1ExportFlowResponse
2860
+ include Google::Apis::Core::Hashable
2861
+
2862
+ # Uncompressed raw byte content for flow.
2863
+ # Corresponds to the JSON property `flowContent`
2864
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
2865
+ # @return [String]
2866
+ attr_accessor :flow_content
2867
+
2868
+ # The URI to a file containing the exported flow. This field is populated only
2869
+ # if `flow_uri` is specified in ExportFlowRequest.
2870
+ # Corresponds to the JSON property `flowUri`
2871
+ # @return [String]
2872
+ attr_accessor :flow_uri
2873
+
2874
+ def initialize(**args)
2875
+ update!(**args)
2876
+ end
2877
+
2878
+ # Update properties of this object
2879
+ def update!(**args)
2880
+ @flow_content = args[:flow_content] if args.key?(:flow_content)
2881
+ @flow_uri = args[:flow_uri] if args.key?(:flow_uri)
2882
+ end
2883
+ end
2884
+
2776
2885
  # Metadata returned for the TestCases.ExportTestCases long running operation.
2777
2886
  class GoogleCloudDialogflowCxV3beta1ExportTestCasesMetadata
2778
2887
  include Google::Apis::Core::Hashable
@@ -3171,6 +3280,26 @@ module Google
3171
3280
  end
3172
3281
  end
3173
3282
 
3283
+ # The response message for Flows.ImportFlow.
3284
+ class GoogleCloudDialogflowCxV3beta1ImportFlowResponse
3285
+ include Google::Apis::Core::Hashable
3286
+
3287
+ # The unique identifier of the new flow. Format: `projects//locations//agents//
3288
+ # flows/`.
3289
+ # Corresponds to the JSON property `flow`
3290
+ # @return [String]
3291
+ attr_accessor :flow
3292
+
3293
+ def initialize(**args)
3294
+ update!(**args)
3295
+ end
3296
+
3297
+ # Update properties of this object
3298
+ def update!(**args)
3299
+ @flow = args[:flow] if args.key?(:flow)
3300
+ end
3301
+ end
3302
+
3174
3303
  # Metadata returned for the TestCases.ImportTestCases long running operation.
3175
3304
  class GoogleCloudDialogflowCxV3beta1ImportTestCasesMetadata
3176
3305
  include Google::Apis::Core::Hashable
@@ -3294,8 +3423,8 @@ module Google
3294
3423
  class GoogleCloudDialogflowCxV3beta1Intent
3295
3424
  include Google::Apis::Core::Hashable
3296
3425
 
3297
- # Optional. Human readable description for better understanding an intent like
3298
- # its scope, content, result etc. Maximum character limit: 140 characters.
3426
+ # Human readable description for better understanding an intent like its scope,
3427
+ # content, result etc. Maximum character limit: 140 characters.
3299
3428
  # Corresponds to the JSON property `description`
3300
3429
  # @return [String]
3301
3430
  attr_accessor :description
@@ -3315,14 +3444,14 @@ module Google
3315
3444
  attr_accessor :is_fallback
3316
3445
  alias_method :is_fallback?, :is_fallback
3317
3446
 
3318
- # Optional. The key/value metadata to label an intent. Labels can contain
3319
- # lowercase letters, digits and the symbols '-' and '_'. International
3320
- # characters are allowed, including letters from unicase alphabets. Keys must
3321
- # start with a letter. Keys and values can be no longer than 63 characters and
3322
- # no more than 128 bytes. Prefix "sys-" is reserved for Dialogflow defined
3323
- # labels. Currently allowed Dialogflow defined labels include: * sys-head * sys-
3324
- # contextual The above labels do not require value. "sys-head" means the intent
3325
- # is a head intent. "sys-contextual" means the intent is a contextual intent.
3447
+ # The key/value metadata to label an intent. Labels can contain lowercase
3448
+ # letters, digits and the symbols '-' and '_'. International characters are
3449
+ # allowed, including letters from unicase alphabets. Keys must start with a
3450
+ # letter. Keys and values can be no longer than 63 characters and no more than
3451
+ # 128 bytes. Prefix "sys-" is reserved for Dialogflow defined labels. Currently
3452
+ # allowed Dialogflow defined labels include: * sys-head * sys-contextual The
3453
+ # above labels do not require value. "sys-head" means the intent is a head
3454
+ # intent. "sys-contextual" means the intent is a contextual intent.
3326
3455
  # Corresponds to the JSON property `labels`
3327
3456
  # @return [Hash<String,String>]
3328
3457
  attr_accessor :labels
@@ -4486,7 +4615,8 @@ module Google
4486
4615
  end
4487
4616
  end
4488
4617
 
4489
- # The request message for a webhook call.
4618
+ # The request message for a webhook call. The request is sent as a JSON object
4619
+ # and the field names will be presented in camel cases.
4490
4620
  class GoogleCloudDialogflowCxV3beta1WebhookRequest
4491
4621
  include Google::Apis::Core::Hashable
4492
4622
 
@@ -4506,6 +4636,11 @@ module Google
4506
4636
  # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo]
4507
4637
  attr_accessor :intent_info
4508
4638
 
4639
+ # The language code specified in the original request.
4640
+ # Corresponds to the JSON property `languageCode`
4641
+ # @return [String]
4642
+ attr_accessor :language_code
4643
+
4509
4644
  # The list of rich message responses to present to the user. Webhook can choose
4510
4645
  # to append or replace this list in WebhookResponse.fulfillment_response;
4511
4646
  # Corresponds to the JSON property `messages`
@@ -4532,6 +4667,30 @@ module Google
4532
4667
  # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowCxV3beta1SessionInfo]
4533
4668
  attr_accessor :session_info
4534
4669
 
4670
+ # If natural language text was provided as input, this field will contain a copy
4671
+ # of the text.
4672
+ # Corresponds to the JSON property `text`
4673
+ # @return [String]
4674
+ attr_accessor :text
4675
+
4676
+ # If natural language speech audio was provided as input, this field will
4677
+ # contain the transcript for the audio.
4678
+ # Corresponds to the JSON property `transcript`
4679
+ # @return [String]
4680
+ attr_accessor :transcript
4681
+
4682
+ # If an event was provided as input, this field will contain the name of the
4683
+ # event.
4684
+ # Corresponds to the JSON property `triggerEvent`
4685
+ # @return [String]
4686
+ attr_accessor :trigger_event
4687
+
4688
+ # If an intent was provided as input, this field will contain a copy of the
4689
+ # intent identifier. Format: `projects//locations//agents//intents/`.
4690
+ # Corresponds to the JSON property `triggerIntent`
4691
+ # @return [String]
4692
+ attr_accessor :trigger_intent
4693
+
4535
4694
  def initialize(**args)
4536
4695
  update!(**args)
4537
4696
  end
@@ -4541,11 +4700,16 @@ module Google
4541
4700
  @detect_intent_response_id = args[:detect_intent_response_id] if args.key?(:detect_intent_response_id)
4542
4701
  @fulfillment_info = args[:fulfillment_info] if args.key?(:fulfillment_info)
4543
4702
  @intent_info = args[:intent_info] if args.key?(:intent_info)
4703
+ @language_code = args[:language_code] if args.key?(:language_code)
4544
4704
  @messages = args[:messages] if args.key?(:messages)
4545
4705
  @page_info = args[:page_info] if args.key?(:page_info)
4546
4706
  @payload = args[:payload] if args.key?(:payload)
4547
4707
  @sentiment_analysis_result = args[:sentiment_analysis_result] if args.key?(:sentiment_analysis_result)
4548
4708
  @session_info = args[:session_info] if args.key?(:session_info)
4709
+ @text = args[:text] if args.key?(:text)
4710
+ @transcript = args[:transcript] if args.key?(:transcript)
4711
+ @trigger_event = args[:trigger_event] if args.key?(:trigger_event)
4712
+ @trigger_intent = args[:trigger_intent] if args.key?(:trigger_intent)
4549
4713
  end
4550
4714
  end
4551
4715
 
@@ -4847,31 +5011,33 @@ module Google
4847
5011
  end
4848
5012
  end
4849
5013
 
4850
- # Represents a part of a message possibly annotated with an entity. The part can
4851
- # be an entity or purely a part of the message between two entities or message
4852
- # start/end.
4853
- class GoogleCloudDialogflowV2AnnotatedMessagePart
5014
+ # Detail feedback of Agent Assist result.
5015
+ class GoogleCloudDialogflowV2AgentAssistantFeedback
4854
5016
  include Google::Apis::Core::Hashable
4855
5017
 
4856
- # The [Dialogflow system entity type](https://cloud.google.com/dialogflow/docs/
4857
- # reference/system-entities) of this message part. If this is empty, Dialogflow
4858
- # could not annotate the phrase part with a system entity.
4859
- # Corresponds to the JSON property `entityType`
5018
+ # Optional. Whether or not the suggested answer is relevant. For example: *
5019
+ # Query: "Can I change my mailing address?" * Suggested document says: "Items
5020
+ # must be returned/exchanged within 60 days of the purchase date." *
5021
+ # answer_relevance: AnswerRelevance.IRRELEVANT
5022
+ # Corresponds to the JSON property `answerRelevance`
4860
5023
  # @return [String]
4861
- attr_accessor :entity_type
5024
+ attr_accessor :answer_relevance
4862
5025
 
4863
- # The [Dialogflow system entity formatted value ](https://cloud.google.com/
4864
- # dialogflow/docs/reference/system-entities) of this message part. For example
4865
- # for a system entity of type `@sys.unit-currency`, this may contain: ` "amount":
4866
- # 5, "currency": "USD" `
4867
- # Corresponds to the JSON property `formattedValue`
4868
- # @return [Object]
4869
- attr_accessor :formatted_value
5026
+ # Optional. Whether or not the information in the document is correct. For
5027
+ # example: * Query: "Can I return the package in 2 days once received?" *
5028
+ # Suggested document says: "Items must be returned/exchanged within 60 days of
5029
+ # the purchase date." * Ground truth: "No return or exchange is allowed." * [
5030
+ # document_correctness]: INCORRECT
5031
+ # Corresponds to the JSON property `documentCorrectness`
5032
+ # @return [String]
5033
+ attr_accessor :document_correctness
4870
5034
 
4871
- # A part of a message possibly annotated with an entity.
4872
- # Corresponds to the JSON property `text`
5035
+ # Optional. Whether or not the suggested document is efficient. For example, if
5036
+ # the document is poorly written, hard to understand, hard to use or too long to
5037
+ # find useful information, document_efficiency is DocumentEfficiency.INEFFICIENT.
5038
+ # Corresponds to the JSON property `documentEfficiency`
4873
5039
  # @return [String]
4874
- attr_accessor :text
5040
+ attr_accessor :document_efficiency
4875
5041
 
4876
5042
  def initialize(**args)
4877
5043
  update!(**args)
@@ -4879,28 +5045,25 @@ module Google
4879
5045
 
4880
5046
  # Update properties of this object
4881
5047
  def update!(**args)
4882
- @entity_type = args[:entity_type] if args.key?(:entity_type)
4883
- @formatted_value = args[:formatted_value] if args.key?(:formatted_value)
4884
- @text = args[:text] if args.key?(:text)
5048
+ @answer_relevance = args[:answer_relevance] if args.key?(:answer_relevance)
5049
+ @document_correctness = args[:document_correctness] if args.key?(:document_correctness)
5050
+ @document_efficiency = args[:document_efficiency] if args.key?(:document_efficiency)
4885
5051
  end
4886
5052
  end
4887
5053
 
4888
- # The request message for EntityTypes.BatchCreateEntities.
4889
- class GoogleCloudDialogflowV2BatchCreateEntitiesRequest
5054
+ # Represents a record of a human agent assist answer.
5055
+ class GoogleCloudDialogflowV2AgentAssistantRecord
4890
5056
  include Google::Apis::Core::Hashable
4891
5057
 
4892
- # Required. The entities to create.
4893
- # Corresponds to the JSON property `entities`
4894
- # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityTypeEntity>]
4895
- attr_accessor :entities
5058
+ # Represents article answer.
5059
+ # Corresponds to the JSON property `articleSuggestionAnswer`
5060
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ArticleAnswer]
5061
+ attr_accessor :article_suggestion_answer
4896
5062
 
4897
- # Optional. The language used to access language-specific data. If not specified,
4898
- # the agent's default language is used. For more information, see [Multilingual
4899
- # intent and entity data](https://cloud.google.com/dialogflow/docs/agents-
4900
- # multilingual#intent-entity).
4901
- # Corresponds to the JSON property `languageCode`
4902
- # @return [String]
4903
- attr_accessor :language_code
5063
+ # Represents answer from "frequently asked questions".
5064
+ # Corresponds to the JSON property `faqAnswer`
5065
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2FaqAnswer]
5066
+ attr_accessor :faq_answer
4904
5067
 
4905
5068
  def initialize(**args)
4906
5069
  update!(**args)
@@ -4908,28 +5071,46 @@ module Google
4908
5071
 
4909
5072
  # Update properties of this object
4910
5073
  def update!(**args)
4911
- @entities = args[:entities] if args.key?(:entities)
4912
- @language_code = args[:language_code] if args.key?(:language_code)
5074
+ @article_suggestion_answer = args[:article_suggestion_answer] if args.key?(:article_suggestion_answer)
5075
+ @faq_answer = args[:faq_answer] if args.key?(:faq_answer)
4913
5076
  end
4914
5077
  end
4915
5078
 
4916
- # The request message for EntityTypes.BatchDeleteEntities.
4917
- class GoogleCloudDialogflowV2BatchDeleteEntitiesRequest
5079
+ # The request message for Participants.AnalyzeContent.
5080
+ class GoogleCloudDialogflowV2AnalyzeContentRequest
4918
5081
  include Google::Apis::Core::Hashable
4919
5082
 
4920
- # Required. The reference `values` of the entities to delete. Note that these
4921
- # are not fully-qualified names, i.e. they don't start with `projects/`.
4922
- # Corresponds to the JSON property `entityValues`
4923
- # @return [Array<String>]
4924
- attr_accessor :entity_values
5083
+ # Events allow for matching intents by event name instead of the natural
5084
+ # language input. For instance, input `` can trigger a personalized welcome
5085
+ # response. The parameter `name` may be used by the agent in the response: `"
5086
+ # Hello #welcome_event.name! What can I do for you today?"`.
5087
+ # Corresponds to the JSON property `eventInput`
5088
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EventInput]
5089
+ attr_accessor :event_input
4925
5090
 
4926
- # Optional. The language used to access language-specific data. If not specified,
4927
- # the agent's default language is used. For more information, see [Multilingual
4928
- # intent and entity data](https://cloud.google.com/dialogflow/docs/agents-
4929
- # multilingual#intent-entity).
4930
- # Corresponds to the JSON property `languageCode`
5091
+ # Represents the parameters of the conversational query.
5092
+ # Corresponds to the JSON property `queryParams`
5093
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2QueryParameters]
5094
+ attr_accessor :query_params
5095
+
5096
+ # Instructs the speech synthesizer on how to generate the output audio content.
5097
+ # If this audio config is supplied in a request, it overrides all existing text-
5098
+ # to-speech settings applied to the agent.
5099
+ # Corresponds to the JSON property `replyAudioConfig`
5100
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2OutputAudioConfig]
5101
+ attr_accessor :reply_audio_config
5102
+
5103
+ # A unique identifier for this request. Restricted to 36 ASCII characters. A
5104
+ # random UUID is recommended. This request is only idempotent if a `request_id`
5105
+ # is provided.
5106
+ # Corresponds to the JSON property `requestId`
4931
5107
  # @return [String]
4932
- attr_accessor :language_code
5108
+ attr_accessor :request_id
5109
+
5110
+ # Represents the natural language text to be processed.
5111
+ # Corresponds to the JSON property `textInput`
5112
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2TextInput]
5113
+ attr_accessor :text_input
4933
5114
 
4934
5115
  def initialize(**args)
4935
5116
  update!(**args)
@@ -4937,20 +5118,57 @@ module Google
4937
5118
 
4938
5119
  # Update properties of this object
4939
5120
  def update!(**args)
4940
- @entity_values = args[:entity_values] if args.key?(:entity_values)
4941
- @language_code = args[:language_code] if args.key?(:language_code)
5121
+ @event_input = args[:event_input] if args.key?(:event_input)
5122
+ @query_params = args[:query_params] if args.key?(:query_params)
5123
+ @reply_audio_config = args[:reply_audio_config] if args.key?(:reply_audio_config)
5124
+ @request_id = args[:request_id] if args.key?(:request_id)
5125
+ @text_input = args[:text_input] if args.key?(:text_input)
4942
5126
  end
4943
5127
  end
4944
5128
 
4945
- # The request message for EntityTypes.BatchDeleteEntityTypes.
4946
- class GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest
5129
+ # The response message for Participants.AnalyzeContent.
5130
+ class GoogleCloudDialogflowV2AnalyzeContentResponse
4947
5131
  include Google::Apis::Core::Hashable
4948
5132
 
4949
- # Required. The names entity types to delete. All names must point to the same
4950
- # agent as `parent`.
4951
- # Corresponds to the JSON property `entityTypeNames`
4952
- # @return [Array<String>]
4953
- attr_accessor :entity_type_names
5133
+ # Represents a response from an automated agent.
5134
+ # Corresponds to the JSON property `automatedAgentReply`
5135
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2AutomatedAgentReply]
5136
+ attr_accessor :automated_agent_reply
5137
+
5138
+ # The message in the response that indicates the parameters of DTMF.
5139
+ # Corresponds to the JSON property `dtmfParameters`
5140
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2DtmfParameters]
5141
+ attr_accessor :dtmf_parameters
5142
+
5143
+ # The suggestions for end user. The order is the same as
5144
+ # HumanAgentAssistantConfig.SuggestionConfig.feature_configs of
5145
+ # HumanAgentAssistantConfig.end_user_suggestion_config.
5146
+ # Corresponds to the JSON property `endUserSuggestionResults`
5147
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SuggestionResult>]
5148
+ attr_accessor :end_user_suggestion_results
5149
+
5150
+ # The suggestions for most recent human agent. The order is the same as
5151
+ # HumanAgentAssistantConfig.SuggestionConfig.feature_configs of
5152
+ # HumanAgentAssistantConfig.human_agent_suggestion_config.
5153
+ # Corresponds to the JSON property `humanAgentSuggestionResults`
5154
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SuggestionResult>]
5155
+ attr_accessor :human_agent_suggestion_results
5156
+
5157
+ # Represents a message posted into a conversation.
5158
+ # Corresponds to the JSON property `message`
5159
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Message]
5160
+ attr_accessor :message
5161
+
5162
+ # Represents the natural language speech audio to be played to the end user.
5163
+ # Corresponds to the JSON property `replyAudio`
5164
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2OutputAudio]
5165
+ attr_accessor :reply_audio
5166
+
5167
+ # The output text content. This field is set if the automated agent responded
5168
+ # with text to show to the user.
5169
+ # Corresponds to the JSON property `replyText`
5170
+ # @return [String]
5171
+ attr_accessor :reply_text
4954
5172
 
4955
5173
  def initialize(**args)
4956
5174
  update!(**args)
@@ -4958,19 +5176,41 @@ module Google
4958
5176
 
4959
5177
  # Update properties of this object
4960
5178
  def update!(**args)
4961
- @entity_type_names = args[:entity_type_names] if args.key?(:entity_type_names)
5179
+ @automated_agent_reply = args[:automated_agent_reply] if args.key?(:automated_agent_reply)
5180
+ @dtmf_parameters = args[:dtmf_parameters] if args.key?(:dtmf_parameters)
5181
+ @end_user_suggestion_results = args[:end_user_suggestion_results] if args.key?(:end_user_suggestion_results)
5182
+ @human_agent_suggestion_results = args[:human_agent_suggestion_results] if args.key?(:human_agent_suggestion_results)
5183
+ @message = args[:message] if args.key?(:message)
5184
+ @reply_audio = args[:reply_audio] if args.key?(:reply_audio)
5185
+ @reply_text = args[:reply_text] if args.key?(:reply_text)
4962
5186
  end
4963
5187
  end
4964
5188
 
4965
- # The request message for Intents.BatchDeleteIntents.
4966
- class GoogleCloudDialogflowV2BatchDeleteIntentsRequest
5189
+ # Represents a part of a message possibly annotated with an entity. The part can
5190
+ # be an entity or purely a part of the message between two entities or message
5191
+ # start/end.
5192
+ class GoogleCloudDialogflowV2AnnotatedMessagePart
4967
5193
  include Google::Apis::Core::Hashable
4968
5194
 
4969
- # Required. The collection of intents to delete. Only intent `name` must be
4970
- # filled in.
4971
- # Corresponds to the JSON property `intents`
4972
- # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Intent>]
4973
- attr_accessor :intents
5195
+ # The [Dialogflow system entity type](https://cloud.google.com/dialogflow/docs/
5196
+ # reference/system-entities) of this message part. If this is empty, Dialogflow
5197
+ # could not annotate the phrase part with a system entity.
5198
+ # Corresponds to the JSON property `entityType`
5199
+ # @return [String]
5200
+ attr_accessor :entity_type
5201
+
5202
+ # The [Dialogflow system entity formatted value ](https://cloud.google.com/
5203
+ # dialogflow/docs/reference/system-entities) of this message part. For example
5204
+ # for a system entity of type `@sys.unit-currency`, this may contain: ` "amount":
5205
+ # 5, "currency": "USD" `
5206
+ # Corresponds to the JSON property `formattedValue`
5207
+ # @return [Object]
5208
+ attr_accessor :formatted_value
5209
+
5210
+ # A part of a message possibly annotated with an entity.
5211
+ # Corresponds to the JSON property `text`
5212
+ # @return [String]
5213
+ attr_accessor :text
4974
5214
 
4975
5215
  def initialize(**args)
4976
5216
  update!(**args)
@@ -4978,31 +5218,50 @@ module Google
4978
5218
 
4979
5219
  # Update properties of this object
4980
5220
  def update!(**args)
4981
- @intents = args[:intents] if args.key?(:intents)
5221
+ @entity_type = args[:entity_type] if args.key?(:entity_type)
5222
+ @formatted_value = args[:formatted_value] if args.key?(:formatted_value)
5223
+ @text = args[:text] if args.key?(:text)
4982
5224
  end
4983
5225
  end
4984
5226
 
4985
- # The request message for EntityTypes.BatchUpdateEntities.
4986
- class GoogleCloudDialogflowV2BatchUpdateEntitiesRequest
5227
+ # Represents feedback the customer has about the quality & correctness of a
5228
+ # certain answer in a conversation.
5229
+ class GoogleCloudDialogflowV2AnswerFeedback
4987
5230
  include Google::Apis::Core::Hashable
4988
5231
 
4989
- # Required. The entities to update or create.
4990
- # Corresponds to the JSON property `entities`
4991
- # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityTypeEntity>]
4992
- attr_accessor :entities
5232
+ # Detail feedback of Agent Assist result.
5233
+ # Corresponds to the JSON property `agentAssistantDetailFeedback`
5234
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2AgentAssistantFeedback]
5235
+ attr_accessor :agent_assistant_detail_feedback
4993
5236
 
4994
- # Optional. The language used to access language-specific data. If not specified,
4995
- # the agent's default language is used. For more information, see [Multilingual
4996
- # intent and entity data](https://cloud.google.com/dialogflow/docs/agents-
4997
- # multilingual#intent-entity).
4998
- # Corresponds to the JSON property `languageCode`
5237
+ # Time when the answer/item was clicked.
5238
+ # Corresponds to the JSON property `clickTime`
4999
5239
  # @return [String]
5000
- attr_accessor :language_code
5240
+ attr_accessor :click_time
5001
5241
 
5002
- # Optional. The mask to control which fields get updated.
5003
- # Corresponds to the JSON property `updateMask`
5242
+ # Indicates whether the answer/item was clicked by the human agent or not.
5243
+ # Default to false.
5244
+ # Corresponds to the JSON property `clicked`
5245
+ # @return [Boolean]
5246
+ attr_accessor :clicked
5247
+ alias_method :clicked?, :clicked
5248
+
5249
+ # The correctness level of the specific answer.
5250
+ # Corresponds to the JSON property `correctnessLevel`
5004
5251
  # @return [String]
5005
- attr_accessor :update_mask
5252
+ attr_accessor :correctness_level
5253
+
5254
+ # Time when the answer/item was displayed.
5255
+ # Corresponds to the JSON property `displayTime`
5256
+ # @return [String]
5257
+ attr_accessor :display_time
5258
+
5259
+ # Indicates whether the answer/item was displayed to the human agent in the
5260
+ # agent desktop UI. Default to false.
5261
+ # Corresponds to the JSON property `displayed`
5262
+ # @return [Boolean]
5263
+ attr_accessor :displayed
5264
+ alias_method :displayed?, :displayed
5006
5265
 
5007
5266
  def initialize(**args)
5008
5267
  update!(**args)
@@ -5010,23 +5269,298 @@ module Google
5010
5269
 
5011
5270
  # Update properties of this object
5012
5271
  def update!(**args)
5013
- @entities = args[:entities] if args.key?(:entities)
5014
- @language_code = args[:language_code] if args.key?(:language_code)
5015
- @update_mask = args[:update_mask] if args.key?(:update_mask)
5272
+ @agent_assistant_detail_feedback = args[:agent_assistant_detail_feedback] if args.key?(:agent_assistant_detail_feedback)
5273
+ @click_time = args[:click_time] if args.key?(:click_time)
5274
+ @clicked = args[:clicked] if args.key?(:clicked)
5275
+ @correctness_level = args[:correctness_level] if args.key?(:correctness_level)
5276
+ @display_time = args[:display_time] if args.key?(:display_time)
5277
+ @displayed = args[:displayed] if args.key?(:displayed)
5016
5278
  end
5017
5279
  end
5018
5280
 
5019
- # The request message for EntityTypes.BatchUpdateEntityTypes.
5020
- class GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest
5281
+ # Answer records are records to manage answer history and feedbacks for
5282
+ # Dialogflow. Currently, answer record includes: - human agent assistant article
5283
+ # suggestion - human agent assistant faq article It doesn't include: - `
5284
+ # DetectIntent` intent matching - `DetectIntent` knowledge Answer records are
5285
+ # not related to the conversation history in the Dialogflow Console. A Record is
5286
+ # generated even when the end-user disables conversation history in the console.
5287
+ # Records are created when there's a human agent assistant suggestion generated.
5288
+ # A typical workflow for customers provide feedback to an answer is: 1. For
5289
+ # human agent assistant, customers get suggestion via ListSuggestions API.
5290
+ # Together with the answers, AnswerRecord.name are returned to the customers. 2.
5291
+ # The customer uses the AnswerRecord.name to call the UpdateAnswerRecord method
5292
+ # to send feedback about a specific answer that they believe is wrong.
5293
+ class GoogleCloudDialogflowV2AnswerRecord
5021
5294
  include Google::Apis::Core::Hashable
5022
5295
 
5023
- # This message is a wrapper around a collection of entity types.
5024
- # Corresponds to the JSON property `entityTypeBatchInline`
5025
- # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityTypeBatch]
5026
- attr_accessor :entity_type_batch_inline
5296
+ # Represents a record of a human agent assist answer.
5297
+ # Corresponds to the JSON property `agentAssistantRecord`
5298
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2AgentAssistantRecord]
5299
+ attr_accessor :agent_assistant_record
5027
5300
 
5028
- # The URI to a Google Cloud Storage file containing entity types to update or
5029
- # create. The file format can either be a serialized proto (of EntityBatch type)
5301
+ # Represents feedback the customer has about the quality & correctness of a
5302
+ # certain answer in a conversation.
5303
+ # Corresponds to the JSON property `answerFeedback`
5304
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2AnswerFeedback]
5305
+ attr_accessor :answer_feedback
5306
+
5307
+ # The unique identifier of this answer record. Format: `projects//locations//
5308
+ # answerRecords/`.
5309
+ # Corresponds to the JSON property `name`
5310
+ # @return [String]
5311
+ attr_accessor :name
5312
+
5313
+ def initialize(**args)
5314
+ update!(**args)
5315
+ end
5316
+
5317
+ # Update properties of this object
5318
+ def update!(**args)
5319
+ @agent_assistant_record = args[:agent_assistant_record] if args.key?(:agent_assistant_record)
5320
+ @answer_feedback = args[:answer_feedback] if args.key?(:answer_feedback)
5321
+ @name = args[:name] if args.key?(:name)
5322
+ end
5323
+ end
5324
+
5325
+ # Represents article answer.
5326
+ class GoogleCloudDialogflowV2ArticleAnswer
5327
+ include Google::Apis::Core::Hashable
5328
+
5329
+ # The name of answer record, in the format of "projects//locations//
5330
+ # answerRecords/"
5331
+ # Corresponds to the JSON property `answerRecord`
5332
+ # @return [String]
5333
+ attr_accessor :answer_record
5334
+
5335
+ # Article match confidence. The system's confidence score that this article is a
5336
+ # good match for this conversation, as a value from 0.0 (completely uncertain)
5337
+ # to 1.0 (completely certain).
5338
+ # Corresponds to the JSON property `confidence`
5339
+ # @return [Float]
5340
+ attr_accessor :confidence
5341
+
5342
+ # A map that contains metadata about the answer and the document from which it
5343
+ # originates.
5344
+ # Corresponds to the JSON property `metadata`
5345
+ # @return [Hash<String,String>]
5346
+ attr_accessor :metadata
5347
+
5348
+ # Article snippets.
5349
+ # Corresponds to the JSON property `snippets`
5350
+ # @return [Array<String>]
5351
+ attr_accessor :snippets
5352
+
5353
+ # The article title.
5354
+ # Corresponds to the JSON property `title`
5355
+ # @return [String]
5356
+ attr_accessor :title
5357
+
5358
+ # The article URI.
5359
+ # Corresponds to the JSON property `uri`
5360
+ # @return [String]
5361
+ attr_accessor :uri
5362
+
5363
+ def initialize(**args)
5364
+ update!(**args)
5365
+ end
5366
+
5367
+ # Update properties of this object
5368
+ def update!(**args)
5369
+ @answer_record = args[:answer_record] if args.key?(:answer_record)
5370
+ @confidence = args[:confidence] if args.key?(:confidence)
5371
+ @metadata = args[:metadata] if args.key?(:metadata)
5372
+ @snippets = args[:snippets] if args.key?(:snippets)
5373
+ @title = args[:title] if args.key?(:title)
5374
+ @uri = args[:uri] if args.key?(:uri)
5375
+ end
5376
+ end
5377
+
5378
+ # Defines the Automated Agent to connect to a conversation.
5379
+ class GoogleCloudDialogflowV2AutomatedAgentConfig
5380
+ include Google::Apis::Core::Hashable
5381
+
5382
+ # Required. ID of the Dialogflow agent environment to use. This project needs to
5383
+ # either be the same project as the conversation or you need to grant `service-@
5384
+ # gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow API Service Agent`
5385
+ # role in this project. Format: `projects//locations//agent/environments/`. If
5386
+ # environment is not specified, the default `draft` environment is used. Refer
5387
+ # to [DetectIntentRequest](/dialogflow/docs/reference/rpc/google.cloud.
5388
+ # dialogflow.v2#google.cloud.dialogflow.v2.DetectIntentRequest) for more details.
5389
+ # Corresponds to the JSON property `agent`
5390
+ # @return [String]
5391
+ attr_accessor :agent
5392
+
5393
+ def initialize(**args)
5394
+ update!(**args)
5395
+ end
5396
+
5397
+ # Update properties of this object
5398
+ def update!(**args)
5399
+ @agent = args[:agent] if args.key?(:agent)
5400
+ end
5401
+ end
5402
+
5403
+ # Represents a response from an automated agent.
5404
+ class GoogleCloudDialogflowV2AutomatedAgentReply
5405
+ include Google::Apis::Core::Hashable
5406
+
5407
+ # The message returned from the DetectIntent method.
5408
+ # Corresponds to the JSON property `detectIntentResponse`
5409
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2DetectIntentResponse]
5410
+ attr_accessor :detect_intent_response
5411
+
5412
+ def initialize(**args)
5413
+ update!(**args)
5414
+ end
5415
+
5416
+ # Update properties of this object
5417
+ def update!(**args)
5418
+ @detect_intent_response = args[:detect_intent_response] if args.key?(:detect_intent_response)
5419
+ end
5420
+ end
5421
+
5422
+ # The request message for EntityTypes.BatchCreateEntities.
5423
+ class GoogleCloudDialogflowV2BatchCreateEntitiesRequest
5424
+ include Google::Apis::Core::Hashable
5425
+
5426
+ # Required. The entities to create.
5427
+ # Corresponds to the JSON property `entities`
5428
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityTypeEntity>]
5429
+ attr_accessor :entities
5430
+
5431
+ # Optional. The language used to access language-specific data. If not specified,
5432
+ # the agent's default language is used. For more information, see [Multilingual
5433
+ # intent and entity data](https://cloud.google.com/dialogflow/docs/agents-
5434
+ # multilingual#intent-entity).
5435
+ # Corresponds to the JSON property `languageCode`
5436
+ # @return [String]
5437
+ attr_accessor :language_code
5438
+
5439
+ def initialize(**args)
5440
+ update!(**args)
5441
+ end
5442
+
5443
+ # Update properties of this object
5444
+ def update!(**args)
5445
+ @entities = args[:entities] if args.key?(:entities)
5446
+ @language_code = args[:language_code] if args.key?(:language_code)
5447
+ end
5448
+ end
5449
+
5450
+ # The request message for EntityTypes.BatchDeleteEntities.
5451
+ class GoogleCloudDialogflowV2BatchDeleteEntitiesRequest
5452
+ include Google::Apis::Core::Hashable
5453
+
5454
+ # Required. The reference `values` of the entities to delete. Note that these
5455
+ # are not fully-qualified names, i.e. they don't start with `projects/`.
5456
+ # Corresponds to the JSON property `entityValues`
5457
+ # @return [Array<String>]
5458
+ attr_accessor :entity_values
5459
+
5460
+ # Optional. The language used to access language-specific data. If not specified,
5461
+ # the agent's default language is used. For more information, see [Multilingual
5462
+ # intent and entity data](https://cloud.google.com/dialogflow/docs/agents-
5463
+ # multilingual#intent-entity).
5464
+ # Corresponds to the JSON property `languageCode`
5465
+ # @return [String]
5466
+ attr_accessor :language_code
5467
+
5468
+ def initialize(**args)
5469
+ update!(**args)
5470
+ end
5471
+
5472
+ # Update properties of this object
5473
+ def update!(**args)
5474
+ @entity_values = args[:entity_values] if args.key?(:entity_values)
5475
+ @language_code = args[:language_code] if args.key?(:language_code)
5476
+ end
5477
+ end
5478
+
5479
+ # The request message for EntityTypes.BatchDeleteEntityTypes.
5480
+ class GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest
5481
+ include Google::Apis::Core::Hashable
5482
+
5483
+ # Required. The names entity types to delete. All names must point to the same
5484
+ # agent as `parent`.
5485
+ # Corresponds to the JSON property `entityTypeNames`
5486
+ # @return [Array<String>]
5487
+ attr_accessor :entity_type_names
5488
+
5489
+ def initialize(**args)
5490
+ update!(**args)
5491
+ end
5492
+
5493
+ # Update properties of this object
5494
+ def update!(**args)
5495
+ @entity_type_names = args[:entity_type_names] if args.key?(:entity_type_names)
5496
+ end
5497
+ end
5498
+
5499
+ # The request message for Intents.BatchDeleteIntents.
5500
+ class GoogleCloudDialogflowV2BatchDeleteIntentsRequest
5501
+ include Google::Apis::Core::Hashable
5502
+
5503
+ # Required. The collection of intents to delete. Only intent `name` must be
5504
+ # filled in.
5505
+ # Corresponds to the JSON property `intents`
5506
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Intent>]
5507
+ attr_accessor :intents
5508
+
5509
+ def initialize(**args)
5510
+ update!(**args)
5511
+ end
5512
+
5513
+ # Update properties of this object
5514
+ def update!(**args)
5515
+ @intents = args[:intents] if args.key?(:intents)
5516
+ end
5517
+ end
5518
+
5519
+ # The request message for EntityTypes.BatchUpdateEntities.
5520
+ class GoogleCloudDialogflowV2BatchUpdateEntitiesRequest
5521
+ include Google::Apis::Core::Hashable
5522
+
5523
+ # Required. The entities to update or create.
5524
+ # Corresponds to the JSON property `entities`
5525
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityTypeEntity>]
5526
+ attr_accessor :entities
5527
+
5528
+ # Optional. The language used to access language-specific data. If not specified,
5529
+ # the agent's default language is used. For more information, see [Multilingual
5530
+ # intent and entity data](https://cloud.google.com/dialogflow/docs/agents-
5531
+ # multilingual#intent-entity).
5532
+ # Corresponds to the JSON property `languageCode`
5533
+ # @return [String]
5534
+ attr_accessor :language_code
5535
+
5536
+ # Optional. The mask to control which fields get updated.
5537
+ # Corresponds to the JSON property `updateMask`
5538
+ # @return [String]
5539
+ attr_accessor :update_mask
5540
+
5541
+ def initialize(**args)
5542
+ update!(**args)
5543
+ end
5544
+
5545
+ # Update properties of this object
5546
+ def update!(**args)
5547
+ @entities = args[:entities] if args.key?(:entities)
5548
+ @language_code = args[:language_code] if args.key?(:language_code)
5549
+ @update_mask = args[:update_mask] if args.key?(:update_mask)
5550
+ end
5551
+ end
5552
+
5553
+ # The request message for EntityTypes.BatchUpdateEntityTypes.
5554
+ class GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest
5555
+ include Google::Apis::Core::Hashable
5556
+
5557
+ # This message is a wrapper around a collection of entity types.
5558
+ # Corresponds to the JSON property `entityTypeBatchInline`
5559
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityTypeBatch]
5560
+ attr_accessor :entity_type_batch_inline
5561
+
5562
+ # The URI to a Google Cloud Storage file containing entity types to update or
5563
+ # create. The file format can either be a serialized proto (of EntityBatch type)
5030
5564
  # or a JSON object. Note: The URI must start with "gs://".
5031
5565
  # Corresponds to the JSON property `entityTypeBatchUri`
5032
5566
  # @return [String]
@@ -5144,6 +5678,19 @@ module Google
5144
5678
  end
5145
5679
  end
5146
5680
 
5681
+ # The request message for Conversations.CompleteConversation.
5682
+ class GoogleCloudDialogflowV2CompleteConversationRequest
5683
+ include Google::Apis::Core::Hashable
5684
+
5685
+ def initialize(**args)
5686
+ update!(**args)
5687
+ end
5688
+
5689
+ # Update properties of this object
5690
+ def update!(**args)
5691
+ end
5692
+ end
5693
+
5147
5694
  # Dialogflow contexts are similar to natural language context. If a person says
5148
5695
  # to you "they are orange", you need context in order to understand what "they"
5149
5696
  # is referring to. Similarly, for Dialogflow to handle an end-user expression
@@ -5205,40 +5752,109 @@ module Google
5205
5752
  end
5206
5753
  end
5207
5754
 
5208
- # Represents a notification sent to Pub/Sub subscribers for conversation
5209
- # lifecycle events.
5210
- class GoogleCloudDialogflowV2ConversationEvent
5755
+ # Represents a conversation. A conversation is an interaction between an agent,
5756
+ # including live agents and Dialogflow agents, and a support customer.
5757
+ # Conversations can include phone calls and text-based chat sessions.
5758
+ class GoogleCloudDialogflowV2Conversation
5211
5759
  include Google::Apis::Core::Hashable
5212
5760
 
5213
- # The unique identifier of the conversation this notification refers to. Format:
5214
- # `projects//conversations/`.
5215
- # Corresponds to the JSON property `conversation`
5761
+ # Required. The Conversation Profile to be used to configure this Conversation.
5762
+ # This field cannot be updated. Format: `projects//locations//
5763
+ # conversationProfiles/`.
5764
+ # Corresponds to the JSON property `conversationProfile`
5216
5765
  # @return [String]
5217
- attr_accessor :conversation
5766
+ attr_accessor :conversation_profile
5218
5767
 
5219
- # The `Status` type defines a logical error model that is suitable for different
5220
- # programming environments, including REST APIs and RPC APIs. It is used by [
5221
- # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
5222
- # data: error code, error message, and error details. You can find out more
5223
- # about this error model and how to work with it in the [API Design Guide](https:
5224
- # //cloud.google.com/apis/design/errors).
5225
- # Corresponds to the JSON property `errorStatus`
5226
- # @return [Google::Apis::DialogflowV2::GoogleRpcStatus]
5227
- attr_accessor :error_status
5768
+ # The stage of a conversation. It indicates whether the virtual agent or a human
5769
+ # agent is handling the conversation. If the conversation is created with the
5770
+ # conversation profile that has Dialogflow config set, defaults to
5771
+ # ConversationStage.VIRTUAL_AGENT_STAGE; Otherwise, defaults to
5772
+ # ConversationStage.HUMAN_ASSIST_STAGE. If the conversation is created with the
5773
+ # conversation profile that has Dialogflow config set but explicitly sets
5774
+ # conversation_stage to ConversationStage.HUMAN_ASSIST_STAGE, it skips
5775
+ # ConversationStage.VIRTUAL_AGENT_STAGE stage and directly goes to
5776
+ # ConversationStage.HUMAN_ASSIST_STAGE.
5777
+ # Corresponds to the JSON property `conversationStage`
5778
+ # @return [String]
5779
+ attr_accessor :conversation_stage
5228
5780
 
5229
- # Represents a message posted into a conversation.
5230
- # Corresponds to the JSON property `newMessagePayload`
5231
- # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Message]
5232
- attr_accessor :new_message_payload
5781
+ # Output only. The time the conversation was finished.
5782
+ # Corresponds to the JSON property `endTime`
5783
+ # @return [String]
5784
+ attr_accessor :end_time
5233
5785
 
5234
- # The type of the event that this notification refers to.
5235
- # Corresponds to the JSON property `type`
5786
+ # Output only. The current state of the Conversation.
5787
+ # Corresponds to the JSON property `lifecycleState`
5236
5788
  # @return [String]
5237
- attr_accessor :type
5789
+ attr_accessor :lifecycle_state
5238
5790
 
5239
- def initialize(**args)
5240
- update!(**args)
5241
- end
5791
+ # Output only. The unique identifier of this conversation. Format: `projects//
5792
+ # locations//conversations/`.
5793
+ # Corresponds to the JSON property `name`
5794
+ # @return [String]
5795
+ attr_accessor :name
5796
+
5797
+ # Represents a phone number for telephony integration. It allows for connecting
5798
+ # a particular conversation over telephony.
5799
+ # Corresponds to the JSON property `phoneNumber`
5800
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ConversationPhoneNumber]
5801
+ attr_accessor :phone_number
5802
+
5803
+ # Output only. The time the conversation was started.
5804
+ # Corresponds to the JSON property `startTime`
5805
+ # @return [String]
5806
+ attr_accessor :start_time
5807
+
5808
+ def initialize(**args)
5809
+ update!(**args)
5810
+ end
5811
+
5812
+ # Update properties of this object
5813
+ def update!(**args)
5814
+ @conversation_profile = args[:conversation_profile] if args.key?(:conversation_profile)
5815
+ @conversation_stage = args[:conversation_stage] if args.key?(:conversation_stage)
5816
+ @end_time = args[:end_time] if args.key?(:end_time)
5817
+ @lifecycle_state = args[:lifecycle_state] if args.key?(:lifecycle_state)
5818
+ @name = args[:name] if args.key?(:name)
5819
+ @phone_number = args[:phone_number] if args.key?(:phone_number)
5820
+ @start_time = args[:start_time] if args.key?(:start_time)
5821
+ end
5822
+ end
5823
+
5824
+ # Represents a notification sent to Pub/Sub subscribers for conversation
5825
+ # lifecycle events.
5826
+ class GoogleCloudDialogflowV2ConversationEvent
5827
+ include Google::Apis::Core::Hashable
5828
+
5829
+ # The unique identifier of the conversation this notification refers to. Format:
5830
+ # `projects//conversations/`.
5831
+ # Corresponds to the JSON property `conversation`
5832
+ # @return [String]
5833
+ attr_accessor :conversation
5834
+
5835
+ # The `Status` type defines a logical error model that is suitable for different
5836
+ # programming environments, including REST APIs and RPC APIs. It is used by [
5837
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
5838
+ # data: error code, error message, and error details. You can find out more
5839
+ # about this error model and how to work with it in the [API Design Guide](https:
5840
+ # //cloud.google.com/apis/design/errors).
5841
+ # Corresponds to the JSON property `errorStatus`
5842
+ # @return [Google::Apis::DialogflowV2::GoogleRpcStatus]
5843
+ attr_accessor :error_status
5844
+
5845
+ # Represents a message posted into a conversation.
5846
+ # Corresponds to the JSON property `newMessagePayload`
5847
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Message]
5848
+ attr_accessor :new_message_payload
5849
+
5850
+ # The type of the event that this notification refers to.
5851
+ # Corresponds to the JSON property `type`
5852
+ # @return [String]
5853
+ attr_accessor :type
5854
+
5855
+ def initialize(**args)
5856
+ update!(**args)
5857
+ end
5242
5858
 
5243
5859
  # Update properties of this object
5244
5860
  def update!(**args)
@@ -5249,6 +5865,116 @@ module Google
5249
5865
  end
5250
5866
  end
5251
5867
 
5868
+ # Represents a phone number for telephony integration. It allows for connecting
5869
+ # a particular conversation over telephony.
5870
+ class GoogleCloudDialogflowV2ConversationPhoneNumber
5871
+ include Google::Apis::Core::Hashable
5872
+
5873
+ # Output only. The phone number to connect to this conversation.
5874
+ # Corresponds to the JSON property `phoneNumber`
5875
+ # @return [String]
5876
+ attr_accessor :phone_number
5877
+
5878
+ def initialize(**args)
5879
+ update!(**args)
5880
+ end
5881
+
5882
+ # Update properties of this object
5883
+ def update!(**args)
5884
+ @phone_number = args[:phone_number] if args.key?(:phone_number)
5885
+ end
5886
+ end
5887
+
5888
+ # Defines the services to connect to incoming Dialogflow conversations.
5889
+ class GoogleCloudDialogflowV2ConversationProfile
5890
+ include Google::Apis::Core::Hashable
5891
+
5892
+ # Defines the Automated Agent to connect to a conversation.
5893
+ # Corresponds to the JSON property `automatedAgentConfig`
5894
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2AutomatedAgentConfig]
5895
+ attr_accessor :automated_agent_config
5896
+
5897
+ # Output only. Create time of the conversation profile.
5898
+ # Corresponds to the JSON property `createTime`
5899
+ # @return [String]
5900
+ attr_accessor :create_time
5901
+
5902
+ # Required. Human readable name for this profile. Max length 1024 bytes.
5903
+ # Corresponds to the JSON property `displayName`
5904
+ # @return [String]
5905
+ attr_accessor :display_name
5906
+
5907
+ # Defines the Human Agent Assist to connect to a conversation.
5908
+ # Corresponds to the JSON property `humanAgentAssistantConfig`
5909
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentAssistantConfig]
5910
+ attr_accessor :human_agent_assistant_config
5911
+
5912
+ # Defines the hand off to a live agent, typically on which external agent
5913
+ # service provider to connect to a conversation. Currently, this feature is not
5914
+ # general available, please contact Google to get access.
5915
+ # Corresponds to the JSON property `humanAgentHandoffConfig`
5916
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentHandoffConfig]
5917
+ attr_accessor :human_agent_handoff_config
5918
+
5919
+ # Language which represents the conversationProfile. If unspecified, the default
5920
+ # language code en-us applies. Users need to create a ConversationProfile for
5921
+ # each language they want to support.
5922
+ # Corresponds to the JSON property `languageCode`
5923
+ # @return [String]
5924
+ attr_accessor :language_code
5925
+
5926
+ # Defines logging behavior for conversation lifecycle events.
5927
+ # Corresponds to the JSON property `loggingConfig`
5928
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2LoggingConfig]
5929
+ attr_accessor :logging_config
5930
+
5931
+ # The unique identifier of this conversation profile. Format: `projects//
5932
+ # locations//conversationProfiles/`.
5933
+ # Corresponds to the JSON property `name`
5934
+ # @return [String]
5935
+ attr_accessor :name
5936
+
5937
+ # Defines notification behavior.
5938
+ # Corresponds to the JSON property `newMessageEventNotificationConfig`
5939
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2NotificationConfig]
5940
+ attr_accessor :new_message_event_notification_config
5941
+
5942
+ # Defines notification behavior.
5943
+ # Corresponds to the JSON property `notificationConfig`
5944
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2NotificationConfig]
5945
+ attr_accessor :notification_config
5946
+
5947
+ # Configures speech transcription for ConversationProfile.
5948
+ # Corresponds to the JSON property `sttConfig`
5949
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SpeechToTextConfig]
5950
+ attr_accessor :stt_config
5951
+
5952
+ # Output only. Update time of the conversation profile.
5953
+ # Corresponds to the JSON property `updateTime`
5954
+ # @return [String]
5955
+ attr_accessor :update_time
5956
+
5957
+ def initialize(**args)
5958
+ update!(**args)
5959
+ end
5960
+
5961
+ # Update properties of this object
5962
+ def update!(**args)
5963
+ @automated_agent_config = args[:automated_agent_config] if args.key?(:automated_agent_config)
5964
+ @create_time = args[:create_time] if args.key?(:create_time)
5965
+ @display_name = args[:display_name] if args.key?(:display_name)
5966
+ @human_agent_assistant_config = args[:human_agent_assistant_config] if args.key?(:human_agent_assistant_config)
5967
+ @human_agent_handoff_config = args[:human_agent_handoff_config] if args.key?(:human_agent_handoff_config)
5968
+ @language_code = args[:language_code] if args.key?(:language_code)
5969
+ @logging_config = args[:logging_config] if args.key?(:logging_config)
5970
+ @name = args[:name] if args.key?(:name)
5971
+ @new_message_event_notification_config = args[:new_message_event_notification_config] if args.key?(:new_message_event_notification_config)
5972
+ @notification_config = args[:notification_config] if args.key?(:notification_config)
5973
+ @stt_config = args[:stt_config] if args.key?(:stt_config)
5974
+ @update_time = args[:update_time] if args.key?(:update_time)
5975
+ end
5976
+ end
5977
+
5252
5978
  # The request to detect user's intent.
5253
5979
  class GoogleCloudDialogflowV2DetectIntentRequest
5254
5980
  include Google::Apis::Core::Hashable
@@ -5362,6 +6088,150 @@ module Google
5362
6088
  end
5363
6089
  end
5364
6090
 
6091
+ # A knowledge document to be used by a KnowledgeBase. For more information, see
6092
+ # the [knowledge base guide](https://cloud.google.com/dialogflow/docs/how/
6093
+ # knowledge-bases). Note: The `projects.agent.knowledgeBases.documents` resource
6094
+ # is deprecated; only use `projects.knowledgeBases.documents`.
6095
+ class GoogleCloudDialogflowV2Document
6096
+ include Google::Apis::Core::Hashable
6097
+
6098
+ # The URI where the file content is located. For documents stored in Google
6099
+ # Cloud Storage, these URIs must have the form `gs:///`. NOTE: External URLs
6100
+ # must correspond to public webpages, i.e., they must be indexed by Google
6101
+ # Search. In particular, URLs for showing documents in Google Cloud Storage (i.e.
6102
+ # the URL in your browser) are not supported. Instead use the `gs://` format
6103
+ # URI described above.
6104
+ # Corresponds to the JSON property `contentUri`
6105
+ # @return [String]
6106
+ attr_accessor :content_uri
6107
+
6108
+ # Required. The display name of the document. The name must be 1024 bytes or
6109
+ # less; otherwise, the creation request fails.
6110
+ # Corresponds to the JSON property `displayName`
6111
+ # @return [String]
6112
+ attr_accessor :display_name
6113
+
6114
+ # Optional. If true, we try to automatically reload the document every day (at a
6115
+ # time picked by the system). If false or unspecified, we don't try to
6116
+ # automatically reload the document. Currently you can only enable automatic
6117
+ # reload for documents sourced from a public url, see `source` field for the
6118
+ # source types. Reload status can be tracked in `latest_reload_status`. If a
6119
+ # reload fails, we will keep the document unchanged. If a reload fails with
6120
+ # internal errors, the system will try to reload the document on the next day.
6121
+ # If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the
6122
+ # system will not try to reload the document anymore. You need to manually
6123
+ # reload the document successfully by calling `ReloadDocument` and clear the
6124
+ # errors.
6125
+ # Corresponds to the JSON property `enableAutoReload`
6126
+ # @return [Boolean]
6127
+ attr_accessor :enable_auto_reload
6128
+ alias_method :enable_auto_reload?, :enable_auto_reload
6129
+
6130
+ # Required. The knowledge type of document content.
6131
+ # Corresponds to the JSON property `knowledgeTypes`
6132
+ # @return [Array<String>]
6133
+ attr_accessor :knowledge_types
6134
+
6135
+ # The status of a reload attempt.
6136
+ # Corresponds to the JSON property `latestReloadStatus`
6137
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2DocumentReloadStatus]
6138
+ attr_accessor :latest_reload_status
6139
+
6140
+ # Optional. Metadata for the document. The metadata supports arbitrary key-value
6141
+ # pairs. Suggested use cases include storing a document's title, an external URL
6142
+ # distinct from the document's content_uri, etc. The max size of a `key` or a `
6143
+ # value` of the metadata is 1024 bytes.
6144
+ # Corresponds to the JSON property `metadata`
6145
+ # @return [Hash<String,String>]
6146
+ attr_accessor :metadata
6147
+
6148
+ # Required. The MIME type of this document.
6149
+ # Corresponds to the JSON property `mimeType`
6150
+ # @return [String]
6151
+ attr_accessor :mime_type
6152
+
6153
+ # Optional. The document resource name. The name must be empty when creating a
6154
+ # document. Format: `projects//locations//knowledgeBases//documents/`.
6155
+ # Corresponds to the JSON property `name`
6156
+ # @return [String]
6157
+ attr_accessor :name
6158
+
6159
+ # The raw content of the document. This field is only permitted for
6160
+ # EXTRACTIVE_QA and FAQ knowledge types.
6161
+ # Corresponds to the JSON property `rawContent`
6162
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
6163
+ # @return [String]
6164
+ attr_accessor :raw_content
6165
+
6166
+ def initialize(**args)
6167
+ update!(**args)
6168
+ end
6169
+
6170
+ # Update properties of this object
6171
+ def update!(**args)
6172
+ @content_uri = args[:content_uri] if args.key?(:content_uri)
6173
+ @display_name = args[:display_name] if args.key?(:display_name)
6174
+ @enable_auto_reload = args[:enable_auto_reload] if args.key?(:enable_auto_reload)
6175
+ @knowledge_types = args[:knowledge_types] if args.key?(:knowledge_types)
6176
+ @latest_reload_status = args[:latest_reload_status] if args.key?(:latest_reload_status)
6177
+ @metadata = args[:metadata] if args.key?(:metadata)
6178
+ @mime_type = args[:mime_type] if args.key?(:mime_type)
6179
+ @name = args[:name] if args.key?(:name)
6180
+ @raw_content = args[:raw_content] if args.key?(:raw_content)
6181
+ end
6182
+ end
6183
+
6184
+ # The status of a reload attempt.
6185
+ class GoogleCloudDialogflowV2DocumentReloadStatus
6186
+ include Google::Apis::Core::Hashable
6187
+
6188
+ # The `Status` type defines a logical error model that is suitable for different
6189
+ # programming environments, including REST APIs and RPC APIs. It is used by [
6190
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
6191
+ # data: error code, error message, and error details. You can find out more
6192
+ # about this error model and how to work with it in the [API Design Guide](https:
6193
+ # //cloud.google.com/apis/design/errors).
6194
+ # Corresponds to the JSON property `status`
6195
+ # @return [Google::Apis::DialogflowV2::GoogleRpcStatus]
6196
+ attr_accessor :status
6197
+
6198
+ # The time of a reload attempt. This reload may have been triggered
6199
+ # automatically or manually and may not have succeeded.
6200
+ # Corresponds to the JSON property `time`
6201
+ # @return [String]
6202
+ attr_accessor :time
6203
+
6204
+ def initialize(**args)
6205
+ update!(**args)
6206
+ end
6207
+
6208
+ # Update properties of this object
6209
+ def update!(**args)
6210
+ @status = args[:status] if args.key?(:status)
6211
+ @time = args[:time] if args.key?(:time)
6212
+ end
6213
+ end
6214
+
6215
+ # The message in the response that indicates the parameters of DTMF.
6216
+ class GoogleCloudDialogflowV2DtmfParameters
6217
+ include Google::Apis::Core::Hashable
6218
+
6219
+ # Indicates whether DTMF input can be handled in the next request.
6220
+ # Corresponds to the JSON property `acceptsDtmfInput`
6221
+ # @return [Boolean]
6222
+ attr_accessor :accepts_dtmf_input
6223
+ alias_method :accepts_dtmf_input?, :accepts_dtmf_input
6224
+
6225
+ def initialize(**args)
6226
+ update!(**args)
6227
+ end
6228
+
6229
+ # Update properties of this object
6230
+ def update!(**args)
6231
+ @accepts_dtmf_input = args[:accepts_dtmf_input] if args.key?(:accepts_dtmf_input)
6232
+ end
6233
+ end
6234
+
5365
6235
  # Each intent parameter has a type, called the entity type, which dictates
5366
6236
  # exactly how data from an end-user expression is extracted. Dialogflow provides
5367
6237
  # predefined system entities that can match many common types of data. For
@@ -5485,8 +6355,8 @@ module Google
5485
6355
  class GoogleCloudDialogflowV2Environment
5486
6356
  include Google::Apis::Core::Hashable
5487
6357
 
5488
- # Optional. The agent version loaded into this environment. Format: `projects//
5489
- # agent/versions/`.
6358
+ # Optional. The agent version loaded into this environment. Supported formats: -
6359
+ # `projects//agent/versions/` - `projects//locations//agent/versions/`
5490
6360
  # Corresponds to the JSON property `agentVersion`
5491
6361
  # @return [String]
5492
6362
  attr_accessor :agent_version
@@ -5497,9 +6367,21 @@ module Google
5497
6367
  # @return [String]
5498
6368
  attr_accessor :description
5499
6369
 
5500
- # Output only. The unique identifier of this agent environment. Format: `
5501
- # projects//agent/environments/`. For Environment ID, "-" is reserved for 'draft'
5502
- # environment.
6370
+ # By default, your agent responds to a matched intent with a static response. As
6371
+ # an alternative, you can provide a more dynamic response by using fulfillment.
6372
+ # When you enable fulfillment for an intent, Dialogflow responds to that intent
6373
+ # by calling a service that you define. For example, if an end-user wants to
6374
+ # schedule a haircut on Friday, your service can check your database and respond
6375
+ # to the end-user with availability information for Friday. For more information,
6376
+ # see the [fulfillment guide](https://cloud.google.com/dialogflow/docs/
6377
+ # fulfillment-overview).
6378
+ # Corresponds to the JSON property `fulfillment`
6379
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Fulfillment]
6380
+ attr_accessor :fulfillment
6381
+
6382
+ # Output only. The unique identifier of this agent environment. Supported
6383
+ # formats: - `projects//agent/environments/` - `projects//locations//agent/
6384
+ # environments/`
5503
6385
  # Corresponds to the JSON property `name`
5504
6386
  # @return [String]
5505
6387
  attr_accessor :name
@@ -5510,6 +6392,11 @@ module Google
5510
6392
  # @return [String]
5511
6393
  attr_accessor :state
5512
6394
 
6395
+ # Instructs the speech synthesizer on how to generate the output audio content.
6396
+ # Corresponds to the JSON property `textToSpeechSettings`
6397
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2TextToSpeechSettings]
6398
+ attr_accessor :text_to_speech_settings
6399
+
5513
6400
  # Output only. The last update time of this environment. This field is read-only,
5514
6401
  # i.e., it cannot be set by create and update methods.
5515
6402
  # Corresponds to the JSON property `updateTime`
@@ -5524,12 +6411,80 @@ module Google
5524
6411
  def update!(**args)
5525
6412
  @agent_version = args[:agent_version] if args.key?(:agent_version)
5526
6413
  @description = args[:description] if args.key?(:description)
6414
+ @fulfillment = args[:fulfillment] if args.key?(:fulfillment)
5527
6415
  @name = args[:name] if args.key?(:name)
5528
6416
  @state = args[:state] if args.key?(:state)
6417
+ @text_to_speech_settings = args[:text_to_speech_settings] if args.key?(:text_to_speech_settings)
5529
6418
  @update_time = args[:update_time] if args.key?(:update_time)
5530
6419
  end
5531
6420
  end
5532
6421
 
6422
+ # The response message for Environments.GetEnvironmentHistory.
6423
+ class GoogleCloudDialogflowV2EnvironmentHistory
6424
+ include Google::Apis::Core::Hashable
6425
+
6426
+ # Output only. The list of agent environments. There will be a maximum number of
6427
+ # items returned based on the page_size field in the request.
6428
+ # Corresponds to the JSON property `entries`
6429
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EnvironmentHistoryEntry>]
6430
+ attr_accessor :entries
6431
+
6432
+ # Output only. Token to retrieve the next page of results, or empty if there are
6433
+ # no more results in the list.
6434
+ # Corresponds to the JSON property `nextPageToken`
6435
+ # @return [String]
6436
+ attr_accessor :next_page_token
6437
+
6438
+ # Output only. The name of the environment this history is for. Supported
6439
+ # formats: - `projects//agent/environments/` - `projects//locations//agent/
6440
+ # environments/`
6441
+ # Corresponds to the JSON property `parent`
6442
+ # @return [String]
6443
+ attr_accessor :parent
6444
+
6445
+ def initialize(**args)
6446
+ update!(**args)
6447
+ end
6448
+
6449
+ # Update properties of this object
6450
+ def update!(**args)
6451
+ @entries = args[:entries] if args.key?(:entries)
6452
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
6453
+ @parent = args[:parent] if args.key?(:parent)
6454
+ end
6455
+ end
6456
+
6457
+ # Represents an environment history entry.
6458
+ class GoogleCloudDialogflowV2EnvironmentHistoryEntry
6459
+ include Google::Apis::Core::Hashable
6460
+
6461
+ # The agent version loaded into this environment history entry.
6462
+ # Corresponds to the JSON property `agentVersion`
6463
+ # @return [String]
6464
+ attr_accessor :agent_version
6465
+
6466
+ # The creation time of this environment history entry.
6467
+ # Corresponds to the JSON property `createTime`
6468
+ # @return [String]
6469
+ attr_accessor :create_time
6470
+
6471
+ # The developer-provided description for this environment history entry.
6472
+ # Corresponds to the JSON property `description`
6473
+ # @return [String]
6474
+ attr_accessor :description
6475
+
6476
+ def initialize(**args)
6477
+ update!(**args)
6478
+ end
6479
+
6480
+ # Update properties of this object
6481
+ def update!(**args)
6482
+ @agent_version = args[:agent_version] if args.key?(:agent_version)
6483
+ @create_time = args[:create_time] if args.key?(:create_time)
6484
+ @description = args[:description] if args.key?(:description)
6485
+ end
6486
+ end
6487
+
5533
6488
  # Events allow for matching intents by event name instead of the natural
5534
6489
  # language input. For instance, input `` can trigger a personalized welcome
5535
6490
  # response. The parameter `name` may be used by the agent in the response: `"
@@ -5623,24 +6578,79 @@ module Google
5623
6578
  end
5624
6579
  end
5625
6580
 
5626
- # By default, your agent responds to a matched intent with a static response. As
5627
- # an alternative, you can provide a more dynamic response by using fulfillment.
5628
- # When you enable fulfillment for an intent, Dialogflow responds to that intent
5629
- # by calling a service that you define. For example, if an end-user wants to
5630
- # schedule a haircut on Friday, your service can check your database and respond
5631
- # to the end-user with availability information for Friday. For more information,
5632
- # see the [fulfillment guide](https://cloud.google.com/dialogflow/docs/
5633
- # fulfillment-overview).
5634
- class GoogleCloudDialogflowV2Fulfillment
6581
+ # Represents answer from "frequently asked questions".
6582
+ class GoogleCloudDialogflowV2FaqAnswer
5635
6583
  include Google::Apis::Core::Hashable
5636
6584
 
5637
- # Optional. The human-readable name of the fulfillment, unique within the agent.
5638
- # Corresponds to the JSON property `displayName`
6585
+ # The piece of text from the `source` knowledge base document.
6586
+ # Corresponds to the JSON property `answer`
5639
6587
  # @return [String]
5640
- attr_accessor :display_name
6588
+ attr_accessor :answer
5641
6589
 
5642
- # Optional. Whether fulfillment is enabled.
5643
- # Corresponds to the JSON property `enabled`
6590
+ # The name of answer record, in the format of "projects//locations//
6591
+ # answerRecords/"
6592
+ # Corresponds to the JSON property `answerRecord`
6593
+ # @return [String]
6594
+ attr_accessor :answer_record
6595
+
6596
+ # The system's confidence score that this Knowledge answer is a good match for
6597
+ # this conversational query, range from 0.0 (completely uncertain) to 1.0 (
6598
+ # completely certain).
6599
+ # Corresponds to the JSON property `confidence`
6600
+ # @return [Float]
6601
+ attr_accessor :confidence
6602
+
6603
+ # A map that contains metadata about the answer and the document from which it
6604
+ # originates.
6605
+ # Corresponds to the JSON property `metadata`
6606
+ # @return [Hash<String,String>]
6607
+ attr_accessor :metadata
6608
+
6609
+ # The corresponding FAQ question.
6610
+ # Corresponds to the JSON property `question`
6611
+ # @return [String]
6612
+ attr_accessor :question
6613
+
6614
+ # Indicates which Knowledge Document this answer was extracted from. Format: `
6615
+ # projects//locations//agent/knowledgeBases//documents/`.
6616
+ # Corresponds to the JSON property `source`
6617
+ # @return [String]
6618
+ attr_accessor :source
6619
+
6620
+ def initialize(**args)
6621
+ update!(**args)
6622
+ end
6623
+
6624
+ # Update properties of this object
6625
+ def update!(**args)
6626
+ @answer = args[:answer] if args.key?(:answer)
6627
+ @answer_record = args[:answer_record] if args.key?(:answer_record)
6628
+ @confidence = args[:confidence] if args.key?(:confidence)
6629
+ @metadata = args[:metadata] if args.key?(:metadata)
6630
+ @question = args[:question] if args.key?(:question)
6631
+ @source = args[:source] if args.key?(:source)
6632
+ end
6633
+ end
6634
+
6635
+ # By default, your agent responds to a matched intent with a static response. As
6636
+ # an alternative, you can provide a more dynamic response by using fulfillment.
6637
+ # When you enable fulfillment for an intent, Dialogflow responds to that intent
6638
+ # by calling a service that you define. For example, if an end-user wants to
6639
+ # schedule a haircut on Friday, your service can check your database and respond
6640
+ # to the end-user with availability information for Friday. For more information,
6641
+ # see the [fulfillment guide](https://cloud.google.com/dialogflow/docs/
6642
+ # fulfillment-overview).
6643
+ class GoogleCloudDialogflowV2Fulfillment
6644
+ include Google::Apis::Core::Hashable
6645
+
6646
+ # Optional. The human-readable name of the fulfillment, unique within the agent.
6647
+ # This field is not used for Fulfillment in an Environment.
6648
+ # Corresponds to the JSON property `displayName`
6649
+ # @return [String]
6650
+ attr_accessor :display_name
6651
+
6652
+ # Optional. Whether fulfillment is enabled.
6653
+ # Corresponds to the JSON property `enabled`
5644
6654
  # @return [Boolean]
5645
6655
  attr_accessor :enabled
5646
6656
  alias_method :enabled?, :enabled
@@ -5660,8 +6670,9 @@ module Google
5660
6670
  # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2FulfillmentGenericWebService]
5661
6671
  attr_accessor :generic_web_service
5662
6672
 
5663
- # Required. The unique identifier of the fulfillment. Format: `projects//agent/
5664
- # fulfillment`.
6673
+ # Required. The unique identifier of the fulfillment. Supported formats: - `
6674
+ # projects//agent/fulfillment` - `projects//locations//agent/fulfillment` This
6675
+ # field is not used for Fulfillment in an Environment.
5665
6676
  # Corresponds to the JSON property `name`
5666
6677
  # @return [String]
5667
6678
  attr_accessor :name
@@ -5708,7 +6719,8 @@ module Google
5708
6719
  include Google::Apis::Core::Hashable
5709
6720
 
5710
6721
  # Optional. Indicates if generic web service is created through Cloud Functions
5711
- # integration. Defaults to false.
6722
+ # integration. Defaults to false. is_cloud_function is deprecated. Cloud
6723
+ # functions can be configured by its uri as a regular web service now.
5712
6724
  # Corresponds to the JSON property `isCloudFunction`
5713
6725
  # @return [Boolean]
5714
6726
  attr_accessor :is_cloud_function
@@ -5728,12 +6740,499 @@ module Google
5728
6740
  # protocol.
5729
6741
  # Corresponds to the JSON property `uri`
5730
6742
  # @return [String]
5731
- attr_accessor :uri
6743
+ attr_accessor :uri
6744
+
6745
+ # Optional. The user name for HTTP Basic authentication.
6746
+ # Corresponds to the JSON property `username`
6747
+ # @return [String]
6748
+ attr_accessor :username
6749
+
6750
+ def initialize(**args)
6751
+ update!(**args)
6752
+ end
6753
+
6754
+ # Update properties of this object
6755
+ def update!(**args)
6756
+ @is_cloud_function = args[:is_cloud_function] if args.key?(:is_cloud_function)
6757
+ @password = args[:password] if args.key?(:password)
6758
+ @request_headers = args[:request_headers] if args.key?(:request_headers)
6759
+ @uri = args[:uri] if args.key?(:uri)
6760
+ @username = args[:username] if args.key?(:username)
6761
+ end
6762
+ end
6763
+
6764
+ # Defines the Human Agent Assist to connect to a conversation.
6765
+ class GoogleCloudDialogflowV2HumanAgentAssistantConfig
6766
+ include Google::Apis::Core::Hashable
6767
+
6768
+ # Detail human agent assistant config.
6769
+ # Corresponds to the JSON property `endUserSuggestionConfig`
6770
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig]
6771
+ attr_accessor :end_user_suggestion_config
6772
+
6773
+ # Detail human agent assistant config.
6774
+ # Corresponds to the JSON property `humanAgentSuggestionConfig`
6775
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig]
6776
+ attr_accessor :human_agent_suggestion_config
6777
+
6778
+ # Configuration for analyses to run on each conversation message.
6779
+ # Corresponds to the JSON property `messageAnalysisConfig`
6780
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentAssistantConfigMessageAnalysisConfig]
6781
+ attr_accessor :message_analysis_config
6782
+
6783
+ # Defines notification behavior.
6784
+ # Corresponds to the JSON property `notificationConfig`
6785
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2NotificationConfig]
6786
+ attr_accessor :notification_config
6787
+
6788
+ def initialize(**args)
6789
+ update!(**args)
6790
+ end
6791
+
6792
+ # Update properties of this object
6793
+ def update!(**args)
6794
+ @end_user_suggestion_config = args[:end_user_suggestion_config] if args.key?(:end_user_suggestion_config)
6795
+ @human_agent_suggestion_config = args[:human_agent_suggestion_config] if args.key?(:human_agent_suggestion_config)
6796
+ @message_analysis_config = args[:message_analysis_config] if args.key?(:message_analysis_config)
6797
+ @notification_config = args[:notification_config] if args.key?(:notification_config)
6798
+ end
6799
+ end
6800
+
6801
+ # Custom conversation models used in agent assist feature. Supported feature:
6802
+ # ARTICLE_SUGGESTION, SMART_COMPOSE, SMART_REPLY.
6803
+ class GoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig
6804
+ include Google::Apis::Core::Hashable
6805
+
6806
+ # Conversation model resource name. Format: `projects//conversationModels/`.
6807
+ # Corresponds to the JSON property `model`
6808
+ # @return [String]
6809
+ attr_accessor :model
6810
+
6811
+ def initialize(**args)
6812
+ update!(**args)
6813
+ end
6814
+
6815
+ # Update properties of this object
6816
+ def update!(**args)
6817
+ @model = args[:model] if args.key?(:model)
6818
+ end
6819
+ end
6820
+
6821
+ # Configuration for analyses to run on each conversation message.
6822
+ class GoogleCloudDialogflowV2HumanAgentAssistantConfigMessageAnalysisConfig
6823
+ include Google::Apis::Core::Hashable
6824
+
6825
+ # Enable entity extraction in conversation messages on [agent assist stage](
6826
+ # https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages).
6827
+ # If unspecified, defaults to false. Currently, this feature is not general
6828
+ # available, please contact Google to get access.
6829
+ # Corresponds to the JSON property `enableEntityExtraction`
6830
+ # @return [Boolean]
6831
+ attr_accessor :enable_entity_extraction
6832
+ alias_method :enable_entity_extraction?, :enable_entity_extraction
6833
+
6834
+ # Enable sentiment analysis in conversation messages on [agent assist stage](
6835
+ # https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages).
6836
+ # If unspecified, defaults to false. Sentiment analysis inspects user input and
6837
+ # identifies the prevailing subjective opinion, especially to determine a user's
6838
+ # attitude as positive, negative, or neutral: https://cloud.google.com/natural-
6839
+ # language/docs/basics#sentiment_analysis For Participants.
6840
+ # StreamingAnalyzeContent method, result will be in
6841
+ # StreamingAnalyzeContentResponse.message.SentimentAnalysisResult. For
6842
+ # Participants.AnalyzeContent method, result will be in AnalyzeContentResponse.
6843
+ # message.SentimentAnalysisResult For Conversations.ListMessages method, result
6844
+ # will be in ListMessagesResponse.messages.SentimentAnalysisResult If Pub/Sub
6845
+ # notification is configured, result will be in ConversationEvent.
6846
+ # new_message_payload.SentimentAnalysisResult.
6847
+ # Corresponds to the JSON property `enableSentimentAnalysis`
6848
+ # @return [Boolean]
6849
+ attr_accessor :enable_sentiment_analysis
6850
+ alias_method :enable_sentiment_analysis?, :enable_sentiment_analysis
6851
+
6852
+ def initialize(**args)
6853
+ update!(**args)
6854
+ end
6855
+
6856
+ # Update properties of this object
6857
+ def update!(**args)
6858
+ @enable_entity_extraction = args[:enable_entity_extraction] if args.key?(:enable_entity_extraction)
6859
+ @enable_sentiment_analysis = args[:enable_sentiment_analysis] if args.key?(:enable_sentiment_analysis)
6860
+ end
6861
+ end
6862
+
6863
+ # Detail human agent assistant config.
6864
+ class GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig
6865
+ include Google::Apis::Core::Hashable
6866
+
6867
+ # Configuration of different suggestion features. One feature can have only one
6868
+ # config.
6869
+ # Corresponds to the JSON property `featureConfigs`
6870
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig>]
6871
+ attr_accessor :feature_configs
6872
+
6873
+ # If `group_suggestion_responses` is false, and there are multiple `
6874
+ # feature_configs` in `event based suggestion` or StreamingAnalyzeContent, we
6875
+ # will try to deliver suggestions to customers as soon as we get new suggestion.
6876
+ # Different type of suggestions based on the same context will be in separate
6877
+ # Pub/Sub event or `StreamingAnalyzeContentResponse`. If `
6878
+ # group_suggestion_responses` set to true. All the suggestions to the same
6879
+ # participant based on the same context will be grouped into a single Pub/Sub
6880
+ # event or StreamingAnalyzeContentResponse.
6881
+ # Corresponds to the JSON property `groupSuggestionResponses`
6882
+ # @return [Boolean]
6883
+ attr_accessor :group_suggestion_responses
6884
+ alias_method :group_suggestion_responses?, :group_suggestion_responses
6885
+
6886
+ def initialize(**args)
6887
+ update!(**args)
6888
+ end
6889
+
6890
+ # Update properties of this object
6891
+ def update!(**args)
6892
+ @feature_configs = args[:feature_configs] if args.key?(:feature_configs)
6893
+ @group_suggestion_responses = args[:group_suggestion_responses] if args.key?(:group_suggestion_responses)
6894
+ end
6895
+ end
6896
+
6897
+ # Config for suggestion features.
6898
+ class GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig
6899
+ include Google::Apis::Core::Hashable
6900
+
6901
+ # Custom conversation models used in agent assist feature. Supported feature:
6902
+ # ARTICLE_SUGGESTION, SMART_COMPOSE, SMART_REPLY.
6903
+ # Corresponds to the JSON property `conversationModelConfig`
6904
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig]
6905
+ attr_accessor :conversation_model_config
6906
+
6907
+ # Automatically iterates all participants and tries to compile suggestions.
6908
+ # Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST.
6909
+ # Corresponds to the JSON property `enableEventBasedSuggestion`
6910
+ # @return [Boolean]
6911
+ attr_accessor :enable_event_based_suggestion
6912
+ alias_method :enable_event_based_suggestion?, :enable_event_based_suggestion
6913
+
6914
+ # Config for suggestion query.
6915
+ # Corresponds to the JSON property `queryConfig`
6916
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig]
6917
+ attr_accessor :query_config
6918
+
6919
+ # The type of Human Agent Assistant API suggestion to perform, and the maximum
6920
+ # number of results to return for that type. Multiple `Feature` objects can be
6921
+ # specified in the `features` list.
6922
+ # Corresponds to the JSON property `suggestionFeature`
6923
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SuggestionFeature]
6924
+ attr_accessor :suggestion_feature
6925
+
6926
+ # Settings of suggestion trigger.
6927
+ # Corresponds to the JSON property `suggestionTriggerSettings`
6928
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionTriggerSettings]
6929
+ attr_accessor :suggestion_trigger_settings
6930
+
6931
+ def initialize(**args)
6932
+ update!(**args)
6933
+ end
6934
+
6935
+ # Update properties of this object
6936
+ def update!(**args)
6937
+ @conversation_model_config = args[:conversation_model_config] if args.key?(:conversation_model_config)
6938
+ @enable_event_based_suggestion = args[:enable_event_based_suggestion] if args.key?(:enable_event_based_suggestion)
6939
+ @query_config = args[:query_config] if args.key?(:query_config)
6940
+ @suggestion_feature = args[:suggestion_feature] if args.key?(:suggestion_feature)
6941
+ @suggestion_trigger_settings = args[:suggestion_trigger_settings] if args.key?(:suggestion_trigger_settings)
6942
+ end
6943
+ end
6944
+
6945
+ # Config for suggestion query.
6946
+ class GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig
6947
+ include Google::Apis::Core::Hashable
6948
+
6949
+ # Confidence threshold of query result. Agent Assist gives each suggestion a
6950
+ # score in the range [0.0, 1.0], based on the relevance between the suggestion
6951
+ # and the current conversation context. A score of 0.0 has no relevance, while a
6952
+ # score of 1.0 has high relevance. Only suggestions with a score greater than or
6953
+ # equal to the value of this field are included in the results. For a baseline
6954
+ # model (the default), the recommended value is in the range [0.05, 0.1]. For a
6955
+ # custom model, there is no recommended value. Tune this value by starting from
6956
+ # a very low value and slowly increasing until you have desired results. If this
6957
+ # field is not set, it defaults to 0.0, which means that all suggestions are
6958
+ # returned. Supported features: ARTICLE_SUGGESTION.
6959
+ # Corresponds to the JSON property `confidenceThreshold`
6960
+ # @return [Float]
6961
+ attr_accessor :confidence_threshold
6962
+
6963
+ # Settings that determine how to filter recent conversation context when
6964
+ # generating suggestions.
6965
+ # Corresponds to the JSON property `contextFilterSettings`
6966
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings]
6967
+ attr_accessor :context_filter_settings
6968
+
6969
+ # Dialogflow source setting. Supported feature: DIALOGFLOW_ASSIST.
6970
+ # Corresponds to the JSON property `dialogflowQuerySource`
6971
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource]
6972
+ attr_accessor :dialogflow_query_source
6973
+
6974
+ # Document source settings. Supported features: SMART_REPLY, SMART_COMPOSE.
6975
+ # Corresponds to the JSON property `documentQuerySource`
6976
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource]
6977
+ attr_accessor :document_query_source
6978
+
6979
+ # Knowledge base source settings. Supported features: ARTICLE_SUGGESTION, FAQ.
6980
+ # Corresponds to the JSON property `knowledgeBaseQuerySource`
6981
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource]
6982
+ attr_accessor :knowledge_base_query_source
6983
+
6984
+ # Maximum number of results to return. Currently, if unset, defaults to 10. And
6985
+ # the max number is 20.
6986
+ # Corresponds to the JSON property `maxResults`
6987
+ # @return [Fixnum]
6988
+ attr_accessor :max_results
6989
+
6990
+ def initialize(**args)
6991
+ update!(**args)
6992
+ end
6993
+
6994
+ # Update properties of this object
6995
+ def update!(**args)
6996
+ @confidence_threshold = args[:confidence_threshold] if args.key?(:confidence_threshold)
6997
+ @context_filter_settings = args[:context_filter_settings] if args.key?(:context_filter_settings)
6998
+ @dialogflow_query_source = args[:dialogflow_query_source] if args.key?(:dialogflow_query_source)
6999
+ @document_query_source = args[:document_query_source] if args.key?(:document_query_source)
7000
+ @knowledge_base_query_source = args[:knowledge_base_query_source] if args.key?(:knowledge_base_query_source)
7001
+ @max_results = args[:max_results] if args.key?(:max_results)
7002
+ end
7003
+ end
7004
+
7005
+ # Settings that determine how to filter recent conversation context when
7006
+ # generating suggestions.
7007
+ class GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings
7008
+ include Google::Apis::Core::Hashable
7009
+
7010
+ # If set to true, the last message from virtual agent (hand off message) and the
7011
+ # message before it (trigger message of hand off) are dropped.
7012
+ # Corresponds to the JSON property `dropHandoffMessages`
7013
+ # @return [Boolean]
7014
+ attr_accessor :drop_handoff_messages
7015
+ alias_method :drop_handoff_messages?, :drop_handoff_messages
7016
+
7017
+ # If set to true, all messages from ivr stage are dropped.
7018
+ # Corresponds to the JSON property `dropIvrMessages`
7019
+ # @return [Boolean]
7020
+ attr_accessor :drop_ivr_messages
7021
+ alias_method :drop_ivr_messages?, :drop_ivr_messages
7022
+
7023
+ # If set to true, all messages from virtual agent are dropped.
7024
+ # Corresponds to the JSON property `dropVirtualAgentMessages`
7025
+ # @return [Boolean]
7026
+ attr_accessor :drop_virtual_agent_messages
7027
+ alias_method :drop_virtual_agent_messages?, :drop_virtual_agent_messages
7028
+
7029
+ def initialize(**args)
7030
+ update!(**args)
7031
+ end
7032
+
7033
+ # Update properties of this object
7034
+ def update!(**args)
7035
+ @drop_handoff_messages = args[:drop_handoff_messages] if args.key?(:drop_handoff_messages)
7036
+ @drop_ivr_messages = args[:drop_ivr_messages] if args.key?(:drop_ivr_messages)
7037
+ @drop_virtual_agent_messages = args[:drop_virtual_agent_messages] if args.key?(:drop_virtual_agent_messages)
7038
+ end
7039
+ end
7040
+
7041
+ # Dialogflow source setting. Supported feature: DIALOGFLOW_ASSIST.
7042
+ class GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource
7043
+ include Google::Apis::Core::Hashable
7044
+
7045
+ # Required. The name of a Dialogflow virtual agent used for end user side intent
7046
+ # detection and suggestion. Format: `projects//locations//agent`. When multiple
7047
+ # agents are allowed in the same Dialogflow project.
7048
+ # Corresponds to the JSON property `agent`
7049
+ # @return [String]
7050
+ attr_accessor :agent
7051
+
7052
+ def initialize(**args)
7053
+ update!(**args)
7054
+ end
7055
+
7056
+ # Update properties of this object
7057
+ def update!(**args)
7058
+ @agent = args[:agent] if args.key?(:agent)
7059
+ end
7060
+ end
7061
+
7062
+ # Document source settings. Supported features: SMART_REPLY, SMART_COMPOSE.
7063
+ class GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource
7064
+ include Google::Apis::Core::Hashable
7065
+
7066
+ # Required. Knowledge documents to query from. Format: `projects//locations//
7067
+ # knowledgeBases//documents/`. Currently, at most 5 documents are supported.
7068
+ # Corresponds to the JSON property `documents`
7069
+ # @return [Array<String>]
7070
+ attr_accessor :documents
7071
+
7072
+ def initialize(**args)
7073
+ update!(**args)
7074
+ end
7075
+
7076
+ # Update properties of this object
7077
+ def update!(**args)
7078
+ @documents = args[:documents] if args.key?(:documents)
7079
+ end
7080
+ end
7081
+
7082
+ # Knowledge base source settings. Supported features: ARTICLE_SUGGESTION, FAQ.
7083
+ class GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource
7084
+ include Google::Apis::Core::Hashable
7085
+
7086
+ # Required. Knowledge bases to query. Format: `projects//locations//
7087
+ # knowledgeBases/`. Currently, at most 5 knowledge bases are supported.
7088
+ # Corresponds to the JSON property `knowledgeBases`
7089
+ # @return [Array<String>]
7090
+ attr_accessor :knowledge_bases
7091
+
7092
+ def initialize(**args)
7093
+ update!(**args)
7094
+ end
7095
+
7096
+ # Update properties of this object
7097
+ def update!(**args)
7098
+ @knowledge_bases = args[:knowledge_bases] if args.key?(:knowledge_bases)
7099
+ end
7100
+ end
7101
+
7102
+ # Settings of suggestion trigger.
7103
+ class GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionTriggerSettings
7104
+ include Google::Apis::Core::Hashable
7105
+
7106
+ # Do not trigger if last utterance is small talk.
7107
+ # Corresponds to the JSON property `noSmalltalk`
7108
+ # @return [Boolean]
7109
+ attr_accessor :no_smalltalk
7110
+ alias_method :no_smalltalk?, :no_smalltalk
7111
+
7112
+ # Only trigger suggestion if participant role of last utterance is END_USER.
7113
+ # Corresponds to the JSON property `onlyEndUser`
7114
+ # @return [Boolean]
7115
+ attr_accessor :only_end_user
7116
+ alias_method :only_end_user?, :only_end_user
7117
+
7118
+ def initialize(**args)
7119
+ update!(**args)
7120
+ end
7121
+
7122
+ # Update properties of this object
7123
+ def update!(**args)
7124
+ @no_smalltalk = args[:no_smalltalk] if args.key?(:no_smalltalk)
7125
+ @only_end_user = args[:only_end_user] if args.key?(:only_end_user)
7126
+ end
7127
+ end
7128
+
7129
+ # Represents a notification sent to Cloud Pub/Sub subscribers for human agent
7130
+ # assistant events in a specific conversation.
7131
+ class GoogleCloudDialogflowV2HumanAgentAssistantEvent
7132
+ include Google::Apis::Core::Hashable
7133
+
7134
+ # The conversation this notification refers to. Format: `projects//conversations/
7135
+ # `.
7136
+ # Corresponds to the JSON property `conversation`
7137
+ # @return [String]
7138
+ attr_accessor :conversation
7139
+
7140
+ # The participant that the suggestion is compiled for. Format: `projects//
7141
+ # conversations//participants/`. It will not be set in legacy workflow.
7142
+ # Corresponds to the JSON property `participant`
7143
+ # @return [String]
7144
+ attr_accessor :participant
7145
+
7146
+ # The suggestion results payload that this notification refers to.
7147
+ # Corresponds to the JSON property `suggestionResults`
7148
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SuggestionResult>]
7149
+ attr_accessor :suggestion_results
7150
+
7151
+ def initialize(**args)
7152
+ update!(**args)
7153
+ end
7154
+
7155
+ # Update properties of this object
7156
+ def update!(**args)
7157
+ @conversation = args[:conversation] if args.key?(:conversation)
7158
+ @participant = args[:participant] if args.key?(:participant)
7159
+ @suggestion_results = args[:suggestion_results] if args.key?(:suggestion_results)
7160
+ end
7161
+ end
7162
+
7163
+ # Defines the hand off to a live agent, typically on which external agent
7164
+ # service provider to connect to a conversation. Currently, this feature is not
7165
+ # general available, please contact Google to get access.
7166
+ class GoogleCloudDialogflowV2HumanAgentHandoffConfig
7167
+ include Google::Apis::Core::Hashable
7168
+
7169
+ # Configuration specific to LivePerson (https://www.liveperson.com).
7170
+ # Corresponds to the JSON property `livePersonConfig`
7171
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentHandoffConfigLivePersonConfig]
7172
+ attr_accessor :live_person_config
7173
+
7174
+ # Configuration specific to Salesforce Live Agent.
7175
+ # Corresponds to the JSON property `salesforceLiveAgentConfig`
7176
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2HumanAgentHandoffConfigSalesforceLiveAgentConfig]
7177
+ attr_accessor :salesforce_live_agent_config
7178
+
7179
+ def initialize(**args)
7180
+ update!(**args)
7181
+ end
7182
+
7183
+ # Update properties of this object
7184
+ def update!(**args)
7185
+ @live_person_config = args[:live_person_config] if args.key?(:live_person_config)
7186
+ @salesforce_live_agent_config = args[:salesforce_live_agent_config] if args.key?(:salesforce_live_agent_config)
7187
+ end
7188
+ end
7189
+
7190
+ # Configuration specific to LivePerson (https://www.liveperson.com).
7191
+ class GoogleCloudDialogflowV2HumanAgentHandoffConfigLivePersonConfig
7192
+ include Google::Apis::Core::Hashable
7193
+
7194
+ # Required. Account number of the LivePerson account to connect. This is the
7195
+ # account number you input at the login page.
7196
+ # Corresponds to the JSON property `accountNumber`
7197
+ # @return [String]
7198
+ attr_accessor :account_number
7199
+
7200
+ def initialize(**args)
7201
+ update!(**args)
7202
+ end
7203
+
7204
+ # Update properties of this object
7205
+ def update!(**args)
7206
+ @account_number = args[:account_number] if args.key?(:account_number)
7207
+ end
7208
+ end
7209
+
7210
+ # Configuration specific to Salesforce Live Agent.
7211
+ class GoogleCloudDialogflowV2HumanAgentHandoffConfigSalesforceLiveAgentConfig
7212
+ include Google::Apis::Core::Hashable
7213
+
7214
+ # Required. Live Agent chat button ID.
7215
+ # Corresponds to the JSON property `buttonId`
7216
+ # @return [String]
7217
+ attr_accessor :button_id
7218
+
7219
+ # Required. Live Agent deployment ID.
7220
+ # Corresponds to the JSON property `deploymentId`
7221
+ # @return [String]
7222
+ attr_accessor :deployment_id
7223
+
7224
+ # Required. Domain of the Live Agent endpoint for this agent. You can find the
7225
+ # endpoint URL in the `Live Agent settings` page. For example if URL has the
7226
+ # form https://d.la4-c2-phx.salesforceliveagent.com/..., you should fill in d.
7227
+ # la4-c2-phx.salesforceliveagent.com.
7228
+ # Corresponds to the JSON property `endpointDomain`
7229
+ # @return [String]
7230
+ attr_accessor :endpoint_domain
5732
7231
 
5733
- # Optional. The user name for HTTP Basic authentication.
5734
- # Corresponds to the JSON property `username`
7232
+ # Required. The organization ID of the Salesforce account.
7233
+ # Corresponds to the JSON property `organizationId`
5735
7234
  # @return [String]
5736
- attr_accessor :username
7235
+ attr_accessor :organization_id
5737
7236
 
5738
7237
  def initialize(**args)
5739
7238
  update!(**args)
@@ -5741,11 +7240,10 @@ module Google
5741
7240
 
5742
7241
  # Update properties of this object
5743
7242
  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)
7243
+ @button_id = args[:button_id] if args.key?(:button_id)
7244
+ @deployment_id = args[:deployment_id] if args.key?(:deployment_id)
7245
+ @endpoint_domain = args[:endpoint_domain] if args.key?(:endpoint_domain)
7246
+ @organization_id = args[:organization_id] if args.key?(:organization_id)
5749
7247
  end
5750
7248
  end
5751
7249
 
@@ -5785,6 +7283,14 @@ module Google
5785
7283
  # @return [String]
5786
7284
  attr_accessor :audio_encoding
5787
7285
 
7286
+ # Only used in Participants.AnalyzeContent and Participants.
7287
+ # StreamingAnalyzeContent. If `false` and recognition doesn't return any result,
7288
+ # trigger `NO_SPEECH_RECOGNIZED` event to Dialogflow agent.
7289
+ # Corresponds to the JSON property `disableNoSpeechRecognizedEvent`
7290
+ # @return [Boolean]
7291
+ attr_accessor :disable_no_speech_recognized_event
7292
+ alias_method :disable_no_speech_recognized_event?, :disable_no_speech_recognized_event
7293
+
5788
7294
  # If `true`, Dialogflow returns SpeechWordInfo in StreamingRecognitionResult
5789
7295
  # with information about the recognized speech words, e.g. start and end time
5790
7296
  # offsets. If false or unspecified, Speech doesn't return any word-level
@@ -5864,6 +7370,7 @@ module Google
5864
7370
  # Update properties of this object
5865
7371
  def update!(**args)
5866
7372
  @audio_encoding = args[:audio_encoding] if args.key?(:audio_encoding)
7373
+ @disable_no_speech_recognized_event = args[:disable_no_speech_recognized_event] if args.key?(:disable_no_speech_recognized_event)
5867
7374
  @enable_word_info = args[:enable_word_info] if args.key?(:enable_word_info)
5868
7375
  @language_code = args[:language_code] if args.key?(:language_code)
5869
7376
  @model = args[:model] if args.key?(:model)
@@ -5902,6 +7409,14 @@ module Google
5902
7409
  # @return [String]
5903
7410
  attr_accessor :display_name
5904
7411
 
7412
+ # Optional. Indicates that this intent ends an interaction. Some integrations (e.
7413
+ # g., Actions on Google or Dialogflow phone gateway) use this information to
7414
+ # close interaction with an end user. Default is false.
7415
+ # Corresponds to the JSON property `endInteraction`
7416
+ # @return [Boolean]
7417
+ attr_accessor :end_interaction
7418
+ alias_method :end_interaction?, :end_interaction
7419
+
5905
7420
  # Optional. The collection of event names that trigger the intent. If the
5906
7421
  # collection of input contexts is not empty, all of the contexts must be present
5907
7422
  # in the active user session for an event to trigger this intent. Event names
@@ -5928,6 +7443,14 @@ module Google
5928
7443
  attr_accessor :is_fallback
5929
7444
  alias_method :is_fallback?, :is_fallback
5930
7445
 
7446
+ # Optional. Indicates that a live agent should be brought in to handle the
7447
+ # interaction with the user. In most cases, when you set this flag to true, you
7448
+ # would also want to set end_interaction to true as well. Default is false.
7449
+ # Corresponds to the JSON property `liveAgentHandoff`
7450
+ # @return [Boolean]
7451
+ attr_accessor :live_agent_handoff
7452
+ alias_method :live_agent_handoff?, :live_agent_handoff
7453
+
5931
7454
  # Optional. The collection of rich messages corresponding to the `Response`
5932
7455
  # field in the Dialogflow console.
5933
7456
  # Corresponds to the JSON property `messages`
@@ -6014,10 +7537,12 @@ module Google
6014
7537
  @action = args[:action] if args.key?(:action)
6015
7538
  @default_response_platforms = args[:default_response_platforms] if args.key?(:default_response_platforms)
6016
7539
  @display_name = args[:display_name] if args.key?(:display_name)
7540
+ @end_interaction = args[:end_interaction] if args.key?(:end_interaction)
6017
7541
  @events = args[:events] if args.key?(:events)
6018
7542
  @followup_intent_info = args[:followup_intent_info] if args.key?(:followup_intent_info)
6019
7543
  @input_context_names = args[:input_context_names] if args.key?(:input_context_names)
6020
7544
  @is_fallback = args[:is_fallback] if args.key?(:is_fallback)
7545
+ @live_agent_handoff = args[:live_agent_handoff] if args.key?(:live_agent_handoff)
6021
7546
  @messages = args[:messages] if args.key?(:messages)
6022
7547
  @ml_disabled = args[:ml_disabled] if args.key?(:ml_disabled)
6023
7548
  @name = args[:name] if args.key?(:name)
@@ -7125,6 +8650,94 @@ module Google
7125
8650
  end
7126
8651
  end
7127
8652
 
8653
+ # A knowledge base represents a collection of knowledge documents that you
8654
+ # provide to Dialogflow. Your knowledge documents contain information that may
8655
+ # be useful during conversations with end-users. Some Dialogflow features use
8656
+ # knowledge bases when looking for a response to an end-user input. For more
8657
+ # information, see the [knowledge base guide](https://cloud.google.com/
8658
+ # dialogflow/docs/how/knowledge-bases). Note: The `projects.agent.knowledgeBases`
8659
+ # resource is deprecated; only use `projects.knowledgeBases`.
8660
+ class GoogleCloudDialogflowV2KnowledgeBase
8661
+ include Google::Apis::Core::Hashable
8662
+
8663
+ # Required. The display name of the knowledge base. The name must be 1024 bytes
8664
+ # or less; otherwise, the creation request fails.
8665
+ # Corresponds to the JSON property `displayName`
8666
+ # @return [String]
8667
+ attr_accessor :display_name
8668
+
8669
+ # Language which represents the KnowledgeBase. When the KnowledgeBase is created/
8670
+ # updated, expect this to be present for non en-us languages. When unspecified,
8671
+ # the default language code en-us applies.
8672
+ # Corresponds to the JSON property `languageCode`
8673
+ # @return [String]
8674
+ attr_accessor :language_code
8675
+
8676
+ # The knowledge base resource name. The name must be empty when creating a
8677
+ # knowledge base. Format: `projects//locations//knowledgeBases/`.
8678
+ # Corresponds to the JSON property `name`
8679
+ # @return [String]
8680
+ attr_accessor :name
8681
+
8682
+ def initialize(**args)
8683
+ update!(**args)
8684
+ end
8685
+
8686
+ # Update properties of this object
8687
+ def update!(**args)
8688
+ @display_name = args[:display_name] if args.key?(:display_name)
8689
+ @language_code = args[:language_code] if args.key?(:language_code)
8690
+ @name = args[:name] if args.key?(:name)
8691
+ end
8692
+ end
8693
+
8694
+ # Metadata in google::longrunning::Operation for Knowledge operations.
8695
+ class GoogleCloudDialogflowV2KnowledgeOperationMetadata
8696
+ include Google::Apis::Core::Hashable
8697
+
8698
+ # Output only. The current state of this operation.
8699
+ # Corresponds to the JSON property `state`
8700
+ # @return [String]
8701
+ attr_accessor :state
8702
+
8703
+ def initialize(**args)
8704
+ update!(**args)
8705
+ end
8706
+
8707
+ # Update properties of this object
8708
+ def update!(**args)
8709
+ @state = args[:state] if args.key?(:state)
8710
+ end
8711
+ end
8712
+
8713
+ # Response message for AnswerRecords.ListAnswerRecords.
8714
+ class GoogleCloudDialogflowV2ListAnswerRecordsResponse
8715
+ include Google::Apis::Core::Hashable
8716
+
8717
+ # The list of answer records.
8718
+ # Corresponds to the JSON property `answerRecords`
8719
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2AnswerRecord>]
8720
+ attr_accessor :answer_records
8721
+
8722
+ # A token to retrieve next page of results. Or empty if there are no more
8723
+ # results. Pass this value in the ListAnswerRecordsRequest.page_token field in
8724
+ # the subsequent call to `ListAnswerRecords` method to retrieve the next page of
8725
+ # results.
8726
+ # Corresponds to the JSON property `nextPageToken`
8727
+ # @return [String]
8728
+ attr_accessor :next_page_token
8729
+
8730
+ def initialize(**args)
8731
+ update!(**args)
8732
+ end
8733
+
8734
+ # Update properties of this object
8735
+ def update!(**args)
8736
+ @answer_records = args[:answer_records] if args.key?(:answer_records)
8737
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
8738
+ end
8739
+ end
8740
+
7128
8741
  # The response message for Contexts.ListContexts.
7129
8742
  class GoogleCloudDialogflowV2ListContextsResponse
7130
8743
  include Google::Apis::Core::Hashable
@@ -7152,6 +8765,86 @@ module Google
7152
8765
  end
7153
8766
  end
7154
8767
 
8768
+ # The response message for ConversationProfiles.ListConversationProfiles.
8769
+ class GoogleCloudDialogflowV2ListConversationProfilesResponse
8770
+ include Google::Apis::Core::Hashable
8771
+
8772
+ # The list of project conversation profiles. There is a maximum number of items
8773
+ # returned based on the page_size field in the request.
8774
+ # Corresponds to the JSON property `conversationProfiles`
8775
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ConversationProfile>]
8776
+ attr_accessor :conversation_profiles
8777
+
8778
+ # Token to retrieve the next page of results, or empty if there are no more
8779
+ # results in the list.
8780
+ # Corresponds to the JSON property `nextPageToken`
8781
+ # @return [String]
8782
+ attr_accessor :next_page_token
8783
+
8784
+ def initialize(**args)
8785
+ update!(**args)
8786
+ end
8787
+
8788
+ # Update properties of this object
8789
+ def update!(**args)
8790
+ @conversation_profiles = args[:conversation_profiles] if args.key?(:conversation_profiles)
8791
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
8792
+ end
8793
+ end
8794
+
8795
+ # The response message for Conversations.ListConversations.
8796
+ class GoogleCloudDialogflowV2ListConversationsResponse
8797
+ include Google::Apis::Core::Hashable
8798
+
8799
+ # The list of conversations. There will be a maximum number of items returned
8800
+ # based on the page_size field in the request.
8801
+ # Corresponds to the JSON property `conversations`
8802
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Conversation>]
8803
+ attr_accessor :conversations
8804
+
8805
+ # Token to retrieve the next page of results, or empty if there are no more
8806
+ # results in the list.
8807
+ # Corresponds to the JSON property `nextPageToken`
8808
+ # @return [String]
8809
+ attr_accessor :next_page_token
8810
+
8811
+ def initialize(**args)
8812
+ update!(**args)
8813
+ end
8814
+
8815
+ # Update properties of this object
8816
+ def update!(**args)
8817
+ @conversations = args[:conversations] if args.key?(:conversations)
8818
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
8819
+ end
8820
+ end
8821
+
8822
+ # Response message for Documents.ListDocuments.
8823
+ class GoogleCloudDialogflowV2ListDocumentsResponse
8824
+ include Google::Apis::Core::Hashable
8825
+
8826
+ # The list of documents.
8827
+ # Corresponds to the JSON property `documents`
8828
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Document>]
8829
+ attr_accessor :documents
8830
+
8831
+ # Token to retrieve the next page of results, or empty if there are no more
8832
+ # results in the list.
8833
+ # Corresponds to the JSON property `nextPageToken`
8834
+ # @return [String]
8835
+ attr_accessor :next_page_token
8836
+
8837
+ def initialize(**args)
8838
+ update!(**args)
8839
+ end
8840
+
8841
+ # Update properties of this object
8842
+ def update!(**args)
8843
+ @documents = args[:documents] if args.key?(:documents)
8844
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
8845
+ end
8846
+ end
8847
+
7155
8848
  # The response message for EntityTypes.ListEntityTypes.
7156
8849
  class GoogleCloudDialogflowV2ListEntityTypesResponse
7157
8850
  include Google::Apis::Core::Hashable
@@ -7162,92 +8855,222 @@ module Google
7162
8855
  # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EntityType>]
7163
8856
  attr_accessor :entity_types
7164
8857
 
7165
- # Token to retrieve the next page of results, or empty if there are no more
8858
+ # Token to retrieve the next page of results, or empty if there are no more
8859
+ # results in the list.
8860
+ # Corresponds to the JSON property `nextPageToken`
8861
+ # @return [String]
8862
+ attr_accessor :next_page_token
8863
+
8864
+ def initialize(**args)
8865
+ update!(**args)
8866
+ end
8867
+
8868
+ # Update properties of this object
8869
+ def update!(**args)
8870
+ @entity_types = args[:entity_types] if args.key?(:entity_types)
8871
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
8872
+ end
8873
+ end
8874
+
8875
+ # The response message for Environments.ListEnvironments.
8876
+ class GoogleCloudDialogflowV2ListEnvironmentsResponse
8877
+ include Google::Apis::Core::Hashable
8878
+
8879
+ # The list of agent environments. There will be a maximum number of items
8880
+ # returned based on the page_size field in the request.
8881
+ # Corresponds to the JSON property `environments`
8882
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Environment>]
8883
+ attr_accessor :environments
8884
+
8885
+ # Token to retrieve the next page of results, or empty if there are no more
8886
+ # results in the list.
8887
+ # Corresponds to the JSON property `nextPageToken`
8888
+ # @return [String]
8889
+ attr_accessor :next_page_token
8890
+
8891
+ def initialize(**args)
8892
+ update!(**args)
8893
+ end
8894
+
8895
+ # Update properties of this object
8896
+ def update!(**args)
8897
+ @environments = args[:environments] if args.key?(:environments)
8898
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
8899
+ end
8900
+ end
8901
+
8902
+ # The response message for Intents.ListIntents.
8903
+ class GoogleCloudDialogflowV2ListIntentsResponse
8904
+ include Google::Apis::Core::Hashable
8905
+
8906
+ # The list of agent intents. There will be a maximum number of items returned
8907
+ # based on the page_size field in the request.
8908
+ # Corresponds to the JSON property `intents`
8909
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Intent>]
8910
+ attr_accessor :intents
8911
+
8912
+ # Token to retrieve the next page of results, or empty if there are no more
8913
+ # results in the list.
8914
+ # Corresponds to the JSON property `nextPageToken`
8915
+ # @return [String]
8916
+ attr_accessor :next_page_token
8917
+
8918
+ def initialize(**args)
8919
+ update!(**args)
8920
+ end
8921
+
8922
+ # Update properties of this object
8923
+ def update!(**args)
8924
+ @intents = args[:intents] if args.key?(:intents)
8925
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
8926
+ end
8927
+ end
8928
+
8929
+ # Response message for KnowledgeBases.ListKnowledgeBases.
8930
+ class GoogleCloudDialogflowV2ListKnowledgeBasesResponse
8931
+ include Google::Apis::Core::Hashable
8932
+
8933
+ # The list of knowledge bases.
8934
+ # Corresponds to the JSON property `knowledgeBases`
8935
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2KnowledgeBase>]
8936
+ attr_accessor :knowledge_bases
8937
+
8938
+ # Token to retrieve the next page of results, or empty if there are no more
8939
+ # results in the list.
8940
+ # Corresponds to the JSON property `nextPageToken`
8941
+ # @return [String]
8942
+ attr_accessor :next_page_token
8943
+
8944
+ def initialize(**args)
8945
+ update!(**args)
8946
+ end
8947
+
8948
+ # Update properties of this object
8949
+ def update!(**args)
8950
+ @knowledge_bases = args[:knowledge_bases] if args.key?(:knowledge_bases)
8951
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
8952
+ end
8953
+ end
8954
+
8955
+ # The response message for Conversations.ListMessages.
8956
+ class GoogleCloudDialogflowV2ListMessagesResponse
8957
+ include Google::Apis::Core::Hashable
8958
+
8959
+ # The list of messages. There will be a maximum number of items returned based
8960
+ # on the page_size field in the request. `messages` is sorted by `create_time`
8961
+ # in descending order.
8962
+ # Corresponds to the JSON property `messages`
8963
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Message>]
8964
+ attr_accessor :messages
8965
+
8966
+ # Token to retrieve the next page of results, or empty if there are no more
8967
+ # results in the list.
8968
+ # Corresponds to the JSON property `nextPageToken`
8969
+ # @return [String]
8970
+ attr_accessor :next_page_token
8971
+
8972
+ def initialize(**args)
8973
+ update!(**args)
8974
+ end
8975
+
8976
+ # Update properties of this object
8977
+ def update!(**args)
8978
+ @messages = args[:messages] if args.key?(:messages)
8979
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
8980
+ end
8981
+ end
8982
+
8983
+ # The response message for Participants.ListParticipants.
8984
+ class GoogleCloudDialogflowV2ListParticipantsResponse
8985
+ include Google::Apis::Core::Hashable
8986
+
8987
+ # Token to retrieve the next page of results or empty if there are no more
7166
8988
  # results in the list.
7167
8989
  # Corresponds to the JSON property `nextPageToken`
7168
8990
  # @return [String]
7169
8991
  attr_accessor :next_page_token
7170
8992
 
8993
+ # The list of participants. There is a maximum number of items returned based on
8994
+ # the page_size field in the request.
8995
+ # Corresponds to the JSON property `participants`
8996
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Participant>]
8997
+ attr_accessor :participants
8998
+
7171
8999
  def initialize(**args)
7172
9000
  update!(**args)
7173
9001
  end
7174
9002
 
7175
9003
  # Update properties of this object
7176
9004
  def update!(**args)
7177
- @entity_types = args[:entity_types] if args.key?(:entity_types)
7178
9005
  @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
9006
+ @participants = args[:participants] if args.key?(:participants)
7179
9007
  end
7180
9008
  end
7181
9009
 
7182
- # The response message for Environments.ListEnvironments.
7183
- class GoogleCloudDialogflowV2ListEnvironmentsResponse
9010
+ # The response message for SessionEntityTypes.ListSessionEntityTypes.
9011
+ class GoogleCloudDialogflowV2ListSessionEntityTypesResponse
7184
9012
  include Google::Apis::Core::Hashable
7185
9013
 
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
7191
-
7192
9014
  # Token to retrieve the next page of results, or empty if there are no more
7193
9015
  # results in the list.
7194
9016
  # Corresponds to the JSON property `nextPageToken`
7195
9017
  # @return [String]
7196
9018
  attr_accessor :next_page_token
7197
9019
 
9020
+ # The list of session entity types. There will be a maximum number of items
9021
+ # returned based on the page_size field in the request.
9022
+ # Corresponds to the JSON property `sessionEntityTypes`
9023
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType>]
9024
+ attr_accessor :session_entity_types
9025
+
7198
9026
  def initialize(**args)
7199
9027
  update!(**args)
7200
9028
  end
7201
9029
 
7202
9030
  # Update properties of this object
7203
9031
  def update!(**args)
7204
- @environments = args[:environments] if args.key?(:environments)
7205
9032
  @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
9033
+ @session_entity_types = args[:session_entity_types] if args.key?(:session_entity_types)
7206
9034
  end
7207
9035
  end
7208
9036
 
7209
- # The response message for Intents.ListIntents.
7210
- class GoogleCloudDialogflowV2ListIntentsResponse
9037
+ # The response message for Versions.ListVersions.
9038
+ class GoogleCloudDialogflowV2ListVersionsResponse
7211
9039
  include Google::Apis::Core::Hashable
7212
9040
 
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
9041
  # Token to retrieve the next page of results, or empty if there are no more
7220
9042
  # results in the list.
7221
9043
  # Corresponds to the JSON property `nextPageToken`
7222
9044
  # @return [String]
7223
9045
  attr_accessor :next_page_token
7224
9046
 
9047
+ # The list of agent versions. There will be a maximum number of items returned
9048
+ # based on the page_size field in the request.
9049
+ # Corresponds to the JSON property `versions`
9050
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Version>]
9051
+ attr_accessor :versions
9052
+
7225
9053
  def initialize(**args)
7226
9054
  update!(**args)
7227
9055
  end
7228
9056
 
7229
9057
  # Update properties of this object
7230
9058
  def update!(**args)
7231
- @intents = args[:intents] if args.key?(:intents)
7232
9059
  @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
9060
+ @versions = args[:versions] if args.key?(:versions)
7233
9061
  end
7234
9062
  end
7235
9063
 
7236
- # The response message for SessionEntityTypes.ListSessionEntityTypes.
7237
- class GoogleCloudDialogflowV2ListSessionEntityTypesResponse
9064
+ # Defines logging behavior for conversation lifecycle events.
9065
+ class GoogleCloudDialogflowV2LoggingConfig
7238
9066
  include Google::Apis::Core::Hashable
7239
9067
 
7240
- # Token to retrieve the next page of results, or empty if there are no more
7241
- # results in the list.
7242
- # Corresponds to the JSON property `nextPageToken`
7243
- # @return [String]
7244
- attr_accessor :next_page_token
7245
-
7246
- # The list of session entity types. There will be a maximum number of items
7247
- # returned based on the page_size field in the request.
7248
- # Corresponds to the JSON property `sessionEntityTypes`
7249
- # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType>]
7250
- attr_accessor :session_entity_types
9068
+ # Whether to log conversation events like CONVERSATION_STARTED to Stackdriver in
9069
+ # the conversation project as JSON format ConversationEvent protos.
9070
+ # Corresponds to the JSON property `enableStackdriverLogging`
9071
+ # @return [Boolean]
9072
+ attr_accessor :enable_stackdriver_logging
9073
+ alias_method :enable_stackdriver_logging?, :enable_stackdriver_logging
7251
9074
 
7252
9075
  def initialize(**args)
7253
9076
  update!(**args)
@@ -7255,8 +9078,7 @@ module Google
7255
9078
 
7256
9079
  # Update properties of this object
7257
9080
  def update!(**args)
7258
- @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
7259
- @session_entity_types = args[:session_entity_types] if args.key?(:session_entity_types)
9081
+ @enable_stackdriver_logging = args[:enable_stackdriver_logging] if args.key?(:enable_stackdriver_logging)
7260
9082
  end
7261
9083
  end
7262
9084
 
@@ -7345,6 +9167,36 @@ module Google
7345
9167
  end
7346
9168
  end
7347
9169
 
9170
+ # Defines notification behavior.
9171
+ class GoogleCloudDialogflowV2NotificationConfig
9172
+ include Google::Apis::Core::Hashable
9173
+
9174
+ # Format of message.
9175
+ # Corresponds to the JSON property `messageFormat`
9176
+ # @return [String]
9177
+ attr_accessor :message_format
9178
+
9179
+ # Name of the Pub/Sub topic to publish conversation events like
9180
+ # CONVERSATION_STARTED as serialized ConversationEvent protos. Notification
9181
+ # works for phone calls, if this topic either is in the same project as the
9182
+ # conversation or you grant `service-@gcp-sa-dialogflow.iam.gserviceaccount.com`
9183
+ # the `Dialogflow Service Agent` role in the topic project. Format: `projects//
9184
+ # locations//topics/`.
9185
+ # Corresponds to the JSON property `topic`
9186
+ # @return [String]
9187
+ attr_accessor :topic
9188
+
9189
+ def initialize(**args)
9190
+ update!(**args)
9191
+ end
9192
+
9193
+ # Update properties of this object
9194
+ def update!(**args)
9195
+ @message_format = args[:message_format] if args.key?(:message_format)
9196
+ @topic = args[:topic] if args.key?(:topic)
9197
+ end
9198
+ end
9199
+
7348
9200
  # Represents the contents of the original request that was passed to the `[
7349
9201
  # Streaming]DetectIntent` call.
7350
9202
  class GoogleCloudDialogflowV2OriginalDetectIntentRequest
@@ -7385,6 +9237,34 @@ module Google
7385
9237
  end
7386
9238
  end
7387
9239
 
9240
+ # Represents the natural language speech audio to be played to the end user.
9241
+ class GoogleCloudDialogflowV2OutputAudio
9242
+ include Google::Apis::Core::Hashable
9243
+
9244
+ # The natural language speech audio.
9245
+ # Corresponds to the JSON property `audio`
9246
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
9247
+ # @return [String]
9248
+ attr_accessor :audio
9249
+
9250
+ # Instructs the speech synthesizer on how to generate the output audio content.
9251
+ # If this audio config is supplied in a request, it overrides all existing text-
9252
+ # to-speech settings applied to the agent.
9253
+ # Corresponds to the JSON property `config`
9254
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2OutputAudioConfig]
9255
+ attr_accessor :config
9256
+
9257
+ def initialize(**args)
9258
+ update!(**args)
9259
+ end
9260
+
9261
+ # Update properties of this object
9262
+ def update!(**args)
9263
+ @audio = args[:audio] if args.key?(:audio)
9264
+ @config = args[:config] if args.key?(:config)
9265
+ end
9266
+ end
9267
+
7388
9268
  # Instructs the speech synthesizer on how to generate the output audio content.
7389
9269
  # If this audio config is supplied in a request, it overrides all existing text-
7390
9270
  # to-speech settings applied to the agent.
@@ -7422,6 +9302,41 @@ module Google
7422
9302
  end
7423
9303
  end
7424
9304
 
9305
+ # Represents a conversation participant (human agent, virtual agent, end-user).
9306
+ class GoogleCloudDialogflowV2Participant
9307
+ include Google::Apis::Core::Hashable
9308
+
9309
+ # Optional. The unique identifier of this participant. Format: `projects//
9310
+ # locations//conversations//participants/`.
9311
+ # Corresponds to the JSON property `name`
9312
+ # @return [String]
9313
+ attr_accessor :name
9314
+
9315
+ # Immutable. The role this participant plays in the conversation. This field
9316
+ # must be set during participant creation and is then immutable.
9317
+ # Corresponds to the JSON property `role`
9318
+ # @return [String]
9319
+ attr_accessor :role
9320
+
9321
+ # Optional. Label applied to streams representing this participant in SIPREC XML
9322
+ # metadata and SDP. This is used to assign transcriptions from that media stream
9323
+ # to this participant. This field can be updated.
9324
+ # Corresponds to the JSON property `sipRecordingMediaLabel`
9325
+ # @return [String]
9326
+ attr_accessor :sip_recording_media_label
9327
+
9328
+ def initialize(**args)
9329
+ update!(**args)
9330
+ end
9331
+
9332
+ # Update properties of this object
9333
+ def update!(**args)
9334
+ @name = args[:name] if args.key?(:name)
9335
+ @role = args[:role] if args.key?(:role)
9336
+ @sip_recording_media_label = args[:sip_recording_media_label] if args.key?(:sip_recording_media_label)
9337
+ end
9338
+ end
9339
+
7425
9340
  # Represents the query input. It can contain either: 1. An audio config which
7426
9341
  # instructs the speech recognizer how to process the speech audio. 2. A
7427
9342
  # conversational query in the form of text,. 3. An event that specifies which
@@ -7470,8 +9385,8 @@ module Google
7470
9385
 
7471
9386
  # An object that represents a latitude/longitude pair. This is expressed as a
7472
9387
  # pair of doubles to represent degrees latitude and degrees longitude. Unless
7473
- # specified otherwise, this must conform to the WGS84 standard. Values must be
7474
- # within normalized ranges.
9388
+ # specified otherwise, this object must conform to the WGS84 standard. Values
9389
+ # must be within normalized ranges.
7475
9390
  # Corresponds to the JSON property `geoLocation`
7476
9391
  # @return [Google::Apis::DialogflowV2::GoogleTypeLatLng]
7477
9392
  attr_accessor :geo_location
@@ -7693,6 +9608,27 @@ module Google
7693
9608
  end
7694
9609
  end
7695
9610
 
9611
+ # Request message for Documents.ReloadDocument.
9612
+ class GoogleCloudDialogflowV2ReloadDocumentRequest
9613
+ include Google::Apis::Core::Hashable
9614
+
9615
+ # Optional. The path of gcs source file for reloading document content. For now,
9616
+ # only gcs uri is supported. For documents stored in Google Cloud Storage, these
9617
+ # URIs must have the form `gs:///`.
9618
+ # Corresponds to the JSON property `contentUri`
9619
+ # @return [String]
9620
+ attr_accessor :content_uri
9621
+
9622
+ def initialize(**args)
9623
+ update!(**args)
9624
+ end
9625
+
9626
+ # Update properties of this object
9627
+ def update!(**args)
9628
+ @content_uri = args[:content_uri] if args.key?(:content_uri)
9629
+ end
9630
+ end
9631
+
7696
9632
  # The request message for Agents.RestoreAgent.
7697
9633
  class GoogleCloudDialogflowV2RestoreAgentRequest
7698
9634
  include Google::Apis::Core::Hashable
@@ -7901,6 +9837,211 @@ module Google
7901
9837
  end
7902
9838
  end
7903
9839
 
9840
+ # Configures speech transcription for ConversationProfile.
9841
+ class GoogleCloudDialogflowV2SpeechToTextConfig
9842
+ include Google::Apis::Core::Hashable
9843
+
9844
+ # Optional. The speech model used in speech to text. `
9845
+ # SPEECH_MODEL_VARIANT_UNSPECIFIED`, `USE_BEST_AVAILABLE` will be treated as `
9846
+ # USE_ENHANCED`. It can be overridden in AnalyzeContentRequest and
9847
+ # StreamingAnalyzeContentRequest request.
9848
+ # Corresponds to the JSON property `speechModelVariant`
9849
+ # @return [String]
9850
+ attr_accessor :speech_model_variant
9851
+
9852
+ def initialize(**args)
9853
+ update!(**args)
9854
+ end
9855
+
9856
+ # Update properties of this object
9857
+ def update!(**args)
9858
+ @speech_model_variant = args[:speech_model_variant] if args.key?(:speech_model_variant)
9859
+ end
9860
+ end
9861
+
9862
+ # The request message for Participants.SuggestArticles.
9863
+ class GoogleCloudDialogflowV2SuggestArticlesRequest
9864
+ include Google::Apis::Core::Hashable
9865
+
9866
+ # Max number of messages prior to and including latest_message to use as context
9867
+ # when compiling the suggestion. By default 20 and at most 50.
9868
+ # Corresponds to the JSON property `contextSize`
9869
+ # @return [Fixnum]
9870
+ attr_accessor :context_size
9871
+
9872
+ # The name of the latest conversation message to compile suggestion for. If
9873
+ # empty, it will be the latest message of the conversation. Format: `projects//
9874
+ # locations//conversations//messages/`.
9875
+ # Corresponds to the JSON property `latestMessage`
9876
+ # @return [String]
9877
+ attr_accessor :latest_message
9878
+
9879
+ def initialize(**args)
9880
+ update!(**args)
9881
+ end
9882
+
9883
+ # Update properties of this object
9884
+ def update!(**args)
9885
+ @context_size = args[:context_size] if args.key?(:context_size)
9886
+ @latest_message = args[:latest_message] if args.key?(:latest_message)
9887
+ end
9888
+ end
9889
+
9890
+ # The response message for Participants.SuggestArticles.
9891
+ class GoogleCloudDialogflowV2SuggestArticlesResponse
9892
+ include Google::Apis::Core::Hashable
9893
+
9894
+ # Articles ordered by score in descending order.
9895
+ # Corresponds to the JSON property `articleAnswers`
9896
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2ArticleAnswer>]
9897
+ attr_accessor :article_answers
9898
+
9899
+ # Number of messages prior to and including latest_message to compile the
9900
+ # suggestion. It may be smaller than the SuggestArticlesRequest.context_size
9901
+ # field in the request if there aren't that many messages in the conversation.
9902
+ # Corresponds to the JSON property `contextSize`
9903
+ # @return [Fixnum]
9904
+ attr_accessor :context_size
9905
+
9906
+ # The name of the latest conversation message used to compile suggestion for.
9907
+ # Format: `projects//locations//conversations//messages/`.
9908
+ # Corresponds to the JSON property `latestMessage`
9909
+ # @return [String]
9910
+ attr_accessor :latest_message
9911
+
9912
+ def initialize(**args)
9913
+ update!(**args)
9914
+ end
9915
+
9916
+ # Update properties of this object
9917
+ def update!(**args)
9918
+ @article_answers = args[:article_answers] if args.key?(:article_answers)
9919
+ @context_size = args[:context_size] if args.key?(:context_size)
9920
+ @latest_message = args[:latest_message] if args.key?(:latest_message)
9921
+ end
9922
+ end
9923
+
9924
+ # The request message for Participants.SuggestFaqAnswers.
9925
+ class GoogleCloudDialogflowV2SuggestFaqAnswersRequest
9926
+ include Google::Apis::Core::Hashable
9927
+
9928
+ # Max number of messages prior to and including [latest_message] to use as
9929
+ # context when compiling the suggestion. By default 20 and at most 50.
9930
+ # Corresponds to the JSON property `contextSize`
9931
+ # @return [Fixnum]
9932
+ attr_accessor :context_size
9933
+
9934
+ # The name of the latest conversation message to compile suggestion for. If
9935
+ # empty, it will be the latest message of the conversation. Format: `projects//
9936
+ # locations//conversations//messages/`.
9937
+ # Corresponds to the JSON property `latestMessage`
9938
+ # @return [String]
9939
+ attr_accessor :latest_message
9940
+
9941
+ def initialize(**args)
9942
+ update!(**args)
9943
+ end
9944
+
9945
+ # Update properties of this object
9946
+ def update!(**args)
9947
+ @context_size = args[:context_size] if args.key?(:context_size)
9948
+ @latest_message = args[:latest_message] if args.key?(:latest_message)
9949
+ end
9950
+ end
9951
+
9952
+ # The request message for Participants.SuggestFaqAnswers.
9953
+ class GoogleCloudDialogflowV2SuggestFaqAnswersResponse
9954
+ include Google::Apis::Core::Hashable
9955
+
9956
+ # Number of messages prior to and including latest_message to compile the
9957
+ # suggestion. It may be smaller than the SuggestFaqAnswersRequest.context_size
9958
+ # field in the request if there aren't that many messages in the conversation.
9959
+ # Corresponds to the JSON property `contextSize`
9960
+ # @return [Fixnum]
9961
+ attr_accessor :context_size
9962
+
9963
+ # Answers extracted from FAQ documents.
9964
+ # Corresponds to the JSON property `faqAnswers`
9965
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2FaqAnswer>]
9966
+ attr_accessor :faq_answers
9967
+
9968
+ # The name of the latest conversation message used to compile suggestion for.
9969
+ # Format: `projects//locations//conversations//messages/`.
9970
+ # Corresponds to the JSON property `latestMessage`
9971
+ # @return [String]
9972
+ attr_accessor :latest_message
9973
+
9974
+ def initialize(**args)
9975
+ update!(**args)
9976
+ end
9977
+
9978
+ # Update properties of this object
9979
+ def update!(**args)
9980
+ @context_size = args[:context_size] if args.key?(:context_size)
9981
+ @faq_answers = args[:faq_answers] if args.key?(:faq_answers)
9982
+ @latest_message = args[:latest_message] if args.key?(:latest_message)
9983
+ end
9984
+ end
9985
+
9986
+ # The type of Human Agent Assistant API suggestion to perform, and the maximum
9987
+ # number of results to return for that type. Multiple `Feature` objects can be
9988
+ # specified in the `features` list.
9989
+ class GoogleCloudDialogflowV2SuggestionFeature
9990
+ include Google::Apis::Core::Hashable
9991
+
9992
+ # Type of Human Agent Assistant API feature to request.
9993
+ # Corresponds to the JSON property `type`
9994
+ # @return [String]
9995
+ attr_accessor :type
9996
+
9997
+ def initialize(**args)
9998
+ update!(**args)
9999
+ end
10000
+
10001
+ # Update properties of this object
10002
+ def update!(**args)
10003
+ @type = args[:type] if args.key?(:type)
10004
+ end
10005
+ end
10006
+
10007
+ # One response of different type of suggestion response which is used in the
10008
+ # response of Participants.AnalyzeContent and Participants.AnalyzeContent, as
10009
+ # well as HumanAgentAssistantEvent.
10010
+ class GoogleCloudDialogflowV2SuggestionResult
10011
+ include Google::Apis::Core::Hashable
10012
+
10013
+ # The `Status` type defines a logical error model that is suitable for different
10014
+ # programming environments, including REST APIs and RPC APIs. It is used by [
10015
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
10016
+ # data: error code, error message, and error details. You can find out more
10017
+ # about this error model and how to work with it in the [API Design Guide](https:
10018
+ # //cloud.google.com/apis/design/errors).
10019
+ # Corresponds to the JSON property `error`
10020
+ # @return [Google::Apis::DialogflowV2::GoogleRpcStatus]
10021
+ attr_accessor :error
10022
+
10023
+ # The response message for Participants.SuggestArticles.
10024
+ # Corresponds to the JSON property `suggestArticlesResponse`
10025
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SuggestArticlesResponse]
10026
+ attr_accessor :suggest_articles_response
10027
+
10028
+ # The request message for Participants.SuggestFaqAnswers.
10029
+ # Corresponds to the JSON property `suggestFaqAnswersResponse`
10030
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SuggestFaqAnswersResponse]
10031
+ attr_accessor :suggest_faq_answers_response
10032
+
10033
+ def initialize(**args)
10034
+ update!(**args)
10035
+ end
10036
+
10037
+ # Update properties of this object
10038
+ def update!(**args)
10039
+ @error = args[:error] if args.key?(:error)
10040
+ @suggest_articles_response = args[:suggest_articles_response] if args.key?(:suggest_articles_response)
10041
+ @suggest_faq_answers_response = args[:suggest_faq_answers_response] if args.key?(:suggest_faq_answers_response)
10042
+ end
10043
+ end
10044
+
7904
10045
  # Configuration of how speech should be synthesized.
7905
10046
  class GoogleCloudDialogflowV2SynthesizeSpeechConfig
7906
10047
  include Google::Apis::Core::Hashable
@@ -7974,7 +10115,50 @@ module Google
7974
10115
  # must not exceed 256 characters.
7975
10116
  # Corresponds to the JSON property `text`
7976
10117
  # @return [String]
7977
- attr_accessor :text
10118
+ attr_accessor :text
10119
+
10120
+ def initialize(**args)
10121
+ update!(**args)
10122
+ end
10123
+
10124
+ # Update properties of this object
10125
+ def update!(**args)
10126
+ @language_code = args[:language_code] if args.key?(:language_code)
10127
+ @text = args[:text] if args.key?(:text)
10128
+ end
10129
+ end
10130
+
10131
+ # Instructs the speech synthesizer on how to generate the output audio content.
10132
+ class GoogleCloudDialogflowV2TextToSpeechSettings
10133
+ include Google::Apis::Core::Hashable
10134
+
10135
+ # Optional. Indicates whether text to speech is enabled. Even when this field is
10136
+ # false, other settings in this proto are still retained.
10137
+ # Corresponds to the JSON property `enableTextToSpeech`
10138
+ # @return [Boolean]
10139
+ attr_accessor :enable_text_to_speech
10140
+ alias_method :enable_text_to_speech?, :enable_text_to_speech
10141
+
10142
+ # Required. Audio encoding of the synthesized audio content.
10143
+ # Corresponds to the JSON property `outputAudioEncoding`
10144
+ # @return [String]
10145
+ attr_accessor :output_audio_encoding
10146
+
10147
+ # Optional. The synthesis sample rate (in hertz) for this audio. If not provided,
10148
+ # then the synthesizer will use the default sample rate based on the audio
10149
+ # encoding. If this is different from the voice's natural sample rate, then the
10150
+ # synthesizer will honor this request by converting to the desired sample rate (
10151
+ # which might result in worse audio quality).
10152
+ # Corresponds to the JSON property `sampleRateHertz`
10153
+ # @return [Fixnum]
10154
+ attr_accessor :sample_rate_hertz
10155
+
10156
+ # Optional. Configuration of how speech should be synthesized, mapping from
10157
+ # language (https://cloud.google.com/dialogflow/docs/reference/language) to
10158
+ # SynthesizeSpeechConfig.
10159
+ # Corresponds to the JSON property `synthesizeSpeechConfigs`
10160
+ # @return [Hash<String,Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SynthesizeSpeechConfig>]
10161
+ attr_accessor :synthesize_speech_configs
7978
10162
 
7979
10163
  def initialize(**args)
7980
10164
  update!(**args)
@@ -7982,8 +10166,10 @@ module Google
7982
10166
 
7983
10167
  # Update properties of this object
7984
10168
  def update!(**args)
7985
- @language_code = args[:language_code] if args.key?(:language_code)
7986
- @text = args[:text] if args.key?(:text)
10169
+ @enable_text_to_speech = args[:enable_text_to_speech] if args.key?(:enable_text_to_speech)
10170
+ @output_audio_encoding = args[:output_audio_encoding] if args.key?(:output_audio_encoding)
10171
+ @sample_rate_hertz = args[:sample_rate_hertz] if args.key?(:sample_rate_hertz)
10172
+ @synthesize_speech_configs = args[:synthesize_speech_configs] if args.key?(:synthesize_speech_configs)
7987
10173
  end
7988
10174
  end
7989
10175
 
@@ -8056,6 +10242,61 @@ module Google
8056
10242
  end
8057
10243
  end
8058
10244
 
10245
+ # You can create multiple versions of your agent and publish them to separate
10246
+ # environments. When you edit an agent, you are editing the draft agent. At any
10247
+ # point, you can save the draft agent as an agent version, which is an immutable
10248
+ # snapshot of your agent. When you save the draft agent, it is published to the
10249
+ # default environment. When you create agent versions, you can publish them to
10250
+ # custom environments. You can create a variety of custom environments for: -
10251
+ # testing - development - production - etc. For more information, see the [
10252
+ # versions and environments guide](https://cloud.google.com/dialogflow/docs/
10253
+ # agents-versions).
10254
+ class GoogleCloudDialogflowV2Version
10255
+ include Google::Apis::Core::Hashable
10256
+
10257
+ # Output only. The creation time of this version. This field is read-only, i.e.,
10258
+ # it cannot be set by create and update methods.
10259
+ # Corresponds to the JSON property `createTime`
10260
+ # @return [String]
10261
+ attr_accessor :create_time
10262
+
10263
+ # Optional. The developer-provided description of this version.
10264
+ # Corresponds to the JSON property `description`
10265
+ # @return [String]
10266
+ attr_accessor :description
10267
+
10268
+ # Output only. The unique identifier of this agent version. Supported formats: -
10269
+ # `projects//agent/versions/` - `projects//locations//agent/versions/`
10270
+ # Corresponds to the JSON property `name`
10271
+ # @return [String]
10272
+ attr_accessor :name
10273
+
10274
+ # Output only. The status of this version. This field is read-only and cannot be
10275
+ # set by create and update methods.
10276
+ # Corresponds to the JSON property `status`
10277
+ # @return [String]
10278
+ attr_accessor :status
10279
+
10280
+ # Output only. The sequential number of this version. This field is read-only
10281
+ # which means it cannot be set by create and update methods.
10282
+ # Corresponds to the JSON property `versionNumber`
10283
+ # @return [Fixnum]
10284
+ attr_accessor :version_number
10285
+
10286
+ def initialize(**args)
10287
+ update!(**args)
10288
+ end
10289
+
10290
+ # Update properties of this object
10291
+ def update!(**args)
10292
+ @create_time = args[:create_time] if args.key?(:create_time)
10293
+ @description = args[:description] if args.key?(:description)
10294
+ @name = args[:name] if args.key?(:name)
10295
+ @status = args[:status] if args.key?(:status)
10296
+ @version_number = args[:version_number] if args.key?(:version_number)
10297
+ end
10298
+ end
10299
+
8059
10300
  # Description of which voice to use for speech synthesis.
8060
10301
  class GoogleCloudDialogflowV2VoiceSelectionParams
8061
10302
  include Google::Apis::Core::Hashable
@@ -8212,6 +10453,89 @@ module Google
8212
10453
  end
8213
10454
  end
8214
10455
 
10456
+ # Represents a part of a message possibly annotated with an entity. The part can
10457
+ # be an entity or purely a part of the message between two entities or message
10458
+ # start/end.
10459
+ class GoogleCloudDialogflowV2beta1AnnotatedMessagePart
10460
+ include Google::Apis::Core::Hashable
10461
+
10462
+ # Optional. The [Dialogflow system entity type](https://cloud.google.com/
10463
+ # dialogflow/docs/reference/system-entities) of this message part. If this is
10464
+ # empty, Dialogflow could not annotate the phrase part with a system entity.
10465
+ # Corresponds to the JSON property `entityType`
10466
+ # @return [String]
10467
+ attr_accessor :entity_type
10468
+
10469
+ # Optional. The [Dialogflow system entity formatted value ](https://cloud.google.
10470
+ # com/dialogflow/docs/reference/system-entities) of this message part. For
10471
+ # example for a system entity of type `@sys.unit-currency`, this may contain: ` "
10472
+ # amount": 5, "currency": "USD" `
10473
+ # Corresponds to the JSON property `formattedValue`
10474
+ # @return [Object]
10475
+ attr_accessor :formatted_value
10476
+
10477
+ # Required. A part of a message possibly annotated with an entity.
10478
+ # Corresponds to the JSON property `text`
10479
+ # @return [String]
10480
+ attr_accessor :text
10481
+
10482
+ def initialize(**args)
10483
+ update!(**args)
10484
+ end
10485
+
10486
+ # Update properties of this object
10487
+ def update!(**args)
10488
+ @entity_type = args[:entity_type] if args.key?(:entity_type)
10489
+ @formatted_value = args[:formatted_value] if args.key?(:formatted_value)
10490
+ @text = args[:text] if args.key?(:text)
10491
+ end
10492
+ end
10493
+
10494
+ # Represents article answer.
10495
+ class GoogleCloudDialogflowV2beta1ArticleAnswer
10496
+ include Google::Apis::Core::Hashable
10497
+
10498
+ # The name of answer record, in the format of "projects//locations//
10499
+ # answerRecords/"
10500
+ # Corresponds to the JSON property `answerRecord`
10501
+ # @return [String]
10502
+ attr_accessor :answer_record
10503
+
10504
+ # A map that contains metadata about the answer and the document from which it
10505
+ # originates.
10506
+ # Corresponds to the JSON property `metadata`
10507
+ # @return [Hash<String,String>]
10508
+ attr_accessor :metadata
10509
+
10510
+ # Output only. Article snippets.
10511
+ # Corresponds to the JSON property `snippets`
10512
+ # @return [Array<String>]
10513
+ attr_accessor :snippets
10514
+
10515
+ # The article title.
10516
+ # Corresponds to the JSON property `title`
10517
+ # @return [String]
10518
+ attr_accessor :title
10519
+
10520
+ # The article URI.
10521
+ # Corresponds to the JSON property `uri`
10522
+ # @return [String]
10523
+ attr_accessor :uri
10524
+
10525
+ def initialize(**args)
10526
+ update!(**args)
10527
+ end
10528
+
10529
+ # Update properties of this object
10530
+ def update!(**args)
10531
+ @answer_record = args[:answer_record] if args.key?(:answer_record)
10532
+ @metadata = args[:metadata] if args.key?(:metadata)
10533
+ @snippets = args[:snippets] if args.key?(:snippets)
10534
+ @title = args[:title] if args.key?(:title)
10535
+ @uri = args[:uri] if args.key?(:uri)
10536
+ end
10537
+ end
10538
+
8215
10539
  # The response message for EntityTypes.BatchUpdateEntityTypes.
8216
10540
  class GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse
8217
10541
  include Google::Apis::Core::Hashable
@@ -8312,6 +10636,50 @@ module Google
8312
10636
  end
8313
10637
  end
8314
10638
 
10639
+ # Represents a notification sent to Pub/Sub subscribers for conversation
10640
+ # lifecycle events.
10641
+ class GoogleCloudDialogflowV2beta1ConversationEvent
10642
+ include Google::Apis::Core::Hashable
10643
+
10644
+ # Required. The unique identifier of the conversation this notification refers
10645
+ # to. Format: `projects//conversations/`.
10646
+ # Corresponds to the JSON property `conversation`
10647
+ # @return [String]
10648
+ attr_accessor :conversation
10649
+
10650
+ # The `Status` type defines a logical error model that is suitable for different
10651
+ # programming environments, including REST APIs and RPC APIs. It is used by [
10652
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
10653
+ # data: error code, error message, and error details. You can find out more
10654
+ # about this error model and how to work with it in the [API Design Guide](https:
10655
+ # //cloud.google.com/apis/design/errors).
10656
+ # Corresponds to the JSON property `errorStatus`
10657
+ # @return [Google::Apis::DialogflowV2::GoogleRpcStatus]
10658
+ attr_accessor :error_status
10659
+
10660
+ # Represents a message posted into a conversation.
10661
+ # Corresponds to the JSON property `newMessagePayload`
10662
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1Message]
10663
+ attr_accessor :new_message_payload
10664
+
10665
+ # Required. The type of the event that this notification refers to.
10666
+ # Corresponds to the JSON property `type`
10667
+ # @return [String]
10668
+ attr_accessor :type
10669
+
10670
+ def initialize(**args)
10671
+ update!(**args)
10672
+ end
10673
+
10674
+ # Update properties of this object
10675
+ def update!(**args)
10676
+ @conversation = args[:conversation] if args.key?(:conversation)
10677
+ @error_status = args[:error_status] if args.key?(:error_status)
10678
+ @new_message_payload = args[:new_message_payload] if args.key?(:new_message_payload)
10679
+ @type = args[:type] if args.key?(:type)
10680
+ end
10681
+ end
10682
+
8315
10683
  # Each intent parameter has a type, called the entity type, which dictates
8316
10684
  # exactly how data from an end-user expression is extracted. Dialogflow provides
8317
10685
  # predefined system entities that can match many common types of data. For
@@ -8405,38 +10773,157 @@ module Google
8405
10773
  end
8406
10774
  end
8407
10775
 
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
10776
+ # Events allow for matching intents by event name instead of the natural
10777
+ # language input. For instance, input `` can trigger a personalized welcome
10778
+ # response. The parameter `name` may be used by the agent in the response: `"
10779
+ # Hello #welcome_event.name! What can I do for you today?"`.
10780
+ class GoogleCloudDialogflowV2beta1EventInput
10781
+ include Google::Apis::Core::Hashable
10782
+
10783
+ # Required. The language of this query. See [Language Support](https://cloud.
10784
+ # google.com/dialogflow/docs/reference/language) for a list of the currently
10785
+ # supported language codes. Note that queries in the same session do not
10786
+ # necessarily need to specify the same language.
10787
+ # Corresponds to the JSON property `languageCode`
10788
+ # @return [String]
10789
+ attr_accessor :language_code
10790
+
10791
+ # Required. The unique identifier of the event.
10792
+ # Corresponds to the JSON property `name`
10793
+ # @return [String]
10794
+ attr_accessor :name
10795
+
10796
+ # The collection of parameters associated with the event. Depending on your
10797
+ # protocol or client library language, this is a map, associative array, symbol
10798
+ # table, dictionary, or JSON object composed of a collection of (MapKey,
10799
+ # MapValue) pairs: - MapKey type: string - MapKey value: parameter name -
10800
+ # MapValue type: - If parameter's entity type is a composite entity: map - Else:
10801
+ # depending on parameter value type, could be one of string, number, boolean,
10802
+ # null, list or map - MapValue value: - If parameter's entity type is a
10803
+ # composite entity: map from composite entity property names to property values -
10804
+ # Else: parameter value
10805
+ # Corresponds to the JSON property `parameters`
10806
+ # @return [Hash<String,Object>]
10807
+ attr_accessor :parameters
10808
+
10809
+ def initialize(**args)
10810
+ update!(**args)
10811
+ end
10812
+
10813
+ # Update properties of this object
10814
+ def update!(**args)
10815
+ @language_code = args[:language_code] if args.key?(:language_code)
10816
+ @name = args[:name] if args.key?(:name)
10817
+ @parameters = args[:parameters] if args.key?(:parameters)
10818
+ end
10819
+ end
10820
+
10821
+ # The response message for Agents.ExportAgent.
10822
+ class GoogleCloudDialogflowV2beta1ExportAgentResponse
10823
+ include Google::Apis::Core::Hashable
10824
+
10825
+ # Zip compressed raw byte content for agent.
10826
+ # Corresponds to the JSON property `agentContent`
10827
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
10828
+ # @return [String]
10829
+ attr_accessor :agent_content
10830
+
10831
+ # The URI to a file containing the exported agent. This field is populated only
10832
+ # if `agent_uri` is specified in `ExportAgentRequest`.
10833
+ # Corresponds to the JSON property `agentUri`
10834
+ # @return [String]
10835
+ attr_accessor :agent_uri
10836
+
10837
+ def initialize(**args)
10838
+ update!(**args)
10839
+ end
10840
+
10841
+ # Update properties of this object
10842
+ def update!(**args)
10843
+ @agent_content = args[:agent_content] if args.key?(:agent_content)
10844
+ @agent_uri = args[:agent_uri] if args.key?(:agent_uri)
10845
+ end
10846
+ end
10847
+
10848
+ # Represents answer from "frequently asked questions".
10849
+ class GoogleCloudDialogflowV2beta1FaqAnswer
10850
+ include Google::Apis::Core::Hashable
10851
+
10852
+ # The piece of text from the `source` knowledge base document.
10853
+ # Corresponds to the JSON property `answer`
10854
+ # @return [String]
10855
+ attr_accessor :answer
10856
+
10857
+ # The name of answer record, in the format of "projects//locations//
10858
+ # answerRecords/"
10859
+ # Corresponds to the JSON property `answerRecord`
10860
+ # @return [String]
10861
+ attr_accessor :answer_record
10862
+
10863
+ # The system's confidence score that this Knowledge answer is a good match for
10864
+ # this conversational query, range from 0.0 (completely uncertain) to 1.0 (
10865
+ # completely certain).
10866
+ # Corresponds to the JSON property `confidence`
10867
+ # @return [Float]
10868
+ attr_accessor :confidence
10869
+
10870
+ # A map that contains metadata about the answer and the document from which it
10871
+ # originates.
10872
+ # Corresponds to the JSON property `metadata`
10873
+ # @return [Hash<String,String>]
10874
+ attr_accessor :metadata
10875
+
10876
+ # The corresponding FAQ question.
10877
+ # Corresponds to the JSON property `question`
10878
+ # @return [String]
10879
+ attr_accessor :question
10880
+
10881
+ # Indicates which Knowledge Document this answer was extracted from. Format: `
10882
+ # projects//locations//agent/knowledgeBases//documents/`.
10883
+ # Corresponds to the JSON property `source`
10884
+ # @return [String]
10885
+ attr_accessor :source
10886
+
10887
+ def initialize(**args)
10888
+ update!(**args)
10889
+ end
10890
+
10891
+ # Update properties of this object
10892
+ def update!(**args)
10893
+ @answer = args[:answer] if args.key?(:answer)
10894
+ @answer_record = args[:answer_record] if args.key?(:answer_record)
10895
+ @confidence = args[:confidence] if args.key?(:confidence)
10896
+ @metadata = args[:metadata] if args.key?(:metadata)
10897
+ @question = args[:question] if args.key?(:question)
10898
+ @source = args[:source] if args.key?(:source)
10899
+ end
10900
+ end
10901
+
10902
+ # Output only. Represents a notification sent to Pub/Sub subscribers for agent
10903
+ # assistant events in a specific conversation.
10904
+ class GoogleCloudDialogflowV2beta1HumanAgentAssistantEvent
8413
10905
  include Google::Apis::Core::Hashable
8414
10906
 
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`
10907
+ # The conversation this notification refers to. Format: `projects//conversations/
10908
+ # `.
10909
+ # Corresponds to the JSON property `conversation`
8420
10910
  # @return [String]
8421
- attr_accessor :language_code
10911
+ attr_accessor :conversation
8422
10912
 
8423
- # Required. The unique identifier of the event.
8424
- # Corresponds to the JSON property `name`
10913
+ # The participant that the suggestion is compiled for. And This field is used to
10914
+ # call Participants.ListSuggestions API. Format: `projects//conversations//
10915
+ # participants/`. It will not be set in legacy workflow.
10916
+ # HumanAgentAssistantConfig.name for more information.
10917
+ # Corresponds to the JSON property `participant`
8425
10918
  # @return [String]
8426
- attr_accessor :name
10919
+ attr_accessor :participant
8427
10920
 
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
10921
+ # The suggestion results payload that this notification refers to. It will only
10922
+ # be set when HumanAgentAssistantConfig.SuggestionConfig.
10923
+ # group_suggestion_responses sets to true.
10924
+ # Corresponds to the JSON property `suggestionResults`
10925
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1SuggestionResult>]
10926
+ attr_accessor :suggestion_results
8440
10927
 
8441
10928
  def initialize(**args)
8442
10929
  update!(**args)
@@ -8444,27 +10931,20 @@ module Google
8444
10931
 
8445
10932
  # Update properties of this object
8446
10933
  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)
10934
+ @conversation = args[:conversation] if args.key?(:conversation)
10935
+ @participant = args[:participant] if args.key?(:participant)
10936
+ @suggestion_results = args[:suggestion_results] if args.key?(:suggestion_results)
8450
10937
  end
8451
10938
  end
8452
10939
 
8453
- # The response message for Agents.ExportAgent.
8454
- class GoogleCloudDialogflowV2beta1ExportAgentResponse
10940
+ # Response message for Documents.ImportDocuments.
10941
+ class GoogleCloudDialogflowV2beta1ImportDocumentsResponse
8455
10942
  include Google::Apis::Core::Hashable
8456
10943
 
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
10944
+ # Includes details about skipped documents or any other warnings.
10945
+ # Corresponds to the JSON property `warnings`
10946
+ # @return [Array<Google::Apis::DialogflowV2::GoogleRpcStatus>]
10947
+ attr_accessor :warnings
8468
10948
 
8469
10949
  def initialize(**args)
8470
10950
  update!(**args)
@@ -8472,8 +10952,7 @@ module Google
8472
10952
 
8473
10953
  # Update properties of this object
8474
10954
  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)
10955
+ @warnings = args[:warnings] if args.key?(:warnings)
8477
10956
  end
8478
10957
  end
8479
10958
 
@@ -8539,6 +11018,14 @@ module Google
8539
11018
  attr_accessor :is_fallback
8540
11019
  alias_method :is_fallback?, :is_fallback
8541
11020
 
11021
+ # Optional. Indicates that a live agent should be brought in to handle the
11022
+ # interaction with the user. In most cases, when you set this flag to true, you
11023
+ # would also want to set end_interaction to true as well. Default is false.
11024
+ # Corresponds to the JSON property `liveAgentHandoff`
11025
+ # @return [Boolean]
11026
+ attr_accessor :live_agent_handoff
11027
+ alias_method :live_agent_handoff?, :live_agent_handoff
11028
+
8542
11029
  # Optional. The collection of rich messages corresponding to the `Response`
8543
11030
  # field in the Dialogflow console.
8544
11031
  # Corresponds to the JSON property `messages`
@@ -8643,6 +11130,7 @@ module Google
8643
11130
  @followup_intent_info = args[:followup_intent_info] if args.key?(:followup_intent_info)
8644
11131
  @input_context_names = args[:input_context_names] if args.key?(:input_context_names)
8645
11132
  @is_fallback = args[:is_fallback] if args.key?(:is_fallback)
11133
+ @live_agent_handoff = args[:live_agent_handoff] if args.key?(:live_agent_handoff)
8646
11134
  @messages = args[:messages] if args.key?(:messages)
8647
11135
  @ml_disabled = args[:ml_disabled] if args.key?(:ml_disabled)
8648
11136
  @ml_enabled = args[:ml_enabled] if args.key?(:ml_enabled)
@@ -10285,6 +12773,110 @@ module Google
10285
12773
  end
10286
12774
  end
10287
12775
 
12776
+ # Represents a message posted into a conversation.
12777
+ class GoogleCloudDialogflowV2beta1Message
12778
+ include Google::Apis::Core::Hashable
12779
+
12780
+ # Required. The message content.
12781
+ # Corresponds to the JSON property `content`
12782
+ # @return [String]
12783
+ attr_accessor :content
12784
+
12785
+ # Output only. The time when the message was created in Contact Center AI.
12786
+ # Corresponds to the JSON property `createTime`
12787
+ # @return [String]
12788
+ attr_accessor :create_time
12789
+
12790
+ # Optional. The message language. This should be a [BCP-47](https://www.rfc-
12791
+ # editor.org/rfc/bcp/bcp47.txt) language tag. Example: "en-US".
12792
+ # Corresponds to the JSON property `languageCode`
12793
+ # @return [String]
12794
+ attr_accessor :language_code
12795
+
12796
+ # Represents the result of annotation for the message.
12797
+ # Corresponds to the JSON property `messageAnnotation`
12798
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1MessageAnnotation]
12799
+ attr_accessor :message_annotation
12800
+
12801
+ # Optional. The unique identifier of the message. Format: `projects//locations//
12802
+ # conversations//messages/`.
12803
+ # Corresponds to the JSON property `name`
12804
+ # @return [String]
12805
+ attr_accessor :name
12806
+
12807
+ # Output only. The participant that sends this message.
12808
+ # Corresponds to the JSON property `participant`
12809
+ # @return [String]
12810
+ attr_accessor :participant
12811
+
12812
+ # Output only. The role of the participant.
12813
+ # Corresponds to the JSON property `participantRole`
12814
+ # @return [String]
12815
+ attr_accessor :participant_role
12816
+
12817
+ # Optional. The time when the message was sent.
12818
+ # Corresponds to the JSON property `sendTime`
12819
+ # @return [String]
12820
+ attr_accessor :send_time
12821
+
12822
+ # The result of sentiment analysis. Sentiment analysis inspects user input and
12823
+ # identifies the prevailing subjective opinion, especially to determine a user's
12824
+ # attitude as positive, negative, or neutral. For Participants.DetectIntent, it
12825
+ # needs to be configured in DetectIntentRequest.query_params. For Participants.
12826
+ # StreamingDetectIntent, it needs to be configured in
12827
+ # StreamingDetectIntentRequest.query_params. And for Participants.AnalyzeContent
12828
+ # and Participants.StreamingAnalyzeContent, it needs to be configured in
12829
+ # ConversationProfile.human_agent_assistant_config
12830
+ # Corresponds to the JSON property `sentimentAnalysis`
12831
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1SentimentAnalysisResult]
12832
+ attr_accessor :sentiment_analysis
12833
+
12834
+ def initialize(**args)
12835
+ update!(**args)
12836
+ end
12837
+
12838
+ # Update properties of this object
12839
+ def update!(**args)
12840
+ @content = args[:content] if args.key?(:content)
12841
+ @create_time = args[:create_time] if args.key?(:create_time)
12842
+ @language_code = args[:language_code] if args.key?(:language_code)
12843
+ @message_annotation = args[:message_annotation] if args.key?(:message_annotation)
12844
+ @name = args[:name] if args.key?(:name)
12845
+ @participant = args[:participant] if args.key?(:participant)
12846
+ @participant_role = args[:participant_role] if args.key?(:participant_role)
12847
+ @send_time = args[:send_time] if args.key?(:send_time)
12848
+ @sentiment_analysis = args[:sentiment_analysis] if args.key?(:sentiment_analysis)
12849
+ end
12850
+ end
12851
+
12852
+ # Represents the result of annotation for the message.
12853
+ class GoogleCloudDialogflowV2beta1MessageAnnotation
12854
+ include Google::Apis::Core::Hashable
12855
+
12856
+ # Required. Indicates whether the text message contains entities.
12857
+ # Corresponds to the JSON property `containEntities`
12858
+ # @return [Boolean]
12859
+ attr_accessor :contain_entities
12860
+ alias_method :contain_entities?, :contain_entities
12861
+
12862
+ # Optional. The collection of annotated message parts ordered by their position
12863
+ # in the message. You can recover the annotated message by concatenating [
12864
+ # AnnotatedMessagePart.text].
12865
+ # Corresponds to the JSON property `parts`
12866
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1AnnotatedMessagePart>]
12867
+ attr_accessor :parts
12868
+
12869
+ def initialize(**args)
12870
+ update!(**args)
12871
+ end
12872
+
12873
+ # Update properties of this object
12874
+ def update!(**args)
12875
+ @contain_entities = args[:contain_entities] if args.key?(:contain_entities)
12876
+ @parts = args[:parts] if args.key?(:parts)
12877
+ end
12878
+ end
12879
+
10288
12880
  # Represents the contents of the original request that was passed to the `[
10289
12881
  # Streaming]DetectIntent` call.
10290
12882
  class GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest
@@ -10585,6 +13177,188 @@ module Google
10585
13177
  end
10586
13178
  end
10587
13179
 
13180
+ # Represents a smart reply answer.
13181
+ class GoogleCloudDialogflowV2beta1SmartReplyAnswer
13182
+ include Google::Apis::Core::Hashable
13183
+
13184
+ # The name of answer record, in the format of "projects//locations//
13185
+ # answerRecords/"
13186
+ # Corresponds to the JSON property `answerRecord`
13187
+ # @return [String]
13188
+ attr_accessor :answer_record
13189
+
13190
+ # Smart reply confidence. The system's confidence score that this reply is a
13191
+ # good match for this conversation, as a value from 0.0 (completely uncertain)
13192
+ # to 1.0 (completely certain).
13193
+ # Corresponds to the JSON property `confidence`
13194
+ # @return [Float]
13195
+ attr_accessor :confidence
13196
+
13197
+ # The content of the reply.
13198
+ # Corresponds to the JSON property `reply`
13199
+ # @return [String]
13200
+ attr_accessor :reply
13201
+
13202
+ def initialize(**args)
13203
+ update!(**args)
13204
+ end
13205
+
13206
+ # Update properties of this object
13207
+ def update!(**args)
13208
+ @answer_record = args[:answer_record] if args.key?(:answer_record)
13209
+ @confidence = args[:confidence] if args.key?(:confidence)
13210
+ @reply = args[:reply] if args.key?(:reply)
13211
+ end
13212
+ end
13213
+
13214
+ # The response message for Participants.SuggestArticles.
13215
+ class GoogleCloudDialogflowV2beta1SuggestArticlesResponse
13216
+ include Google::Apis::Core::Hashable
13217
+
13218
+ # Output only. Articles ordered by score in descending order.
13219
+ # Corresponds to the JSON property `articleAnswers`
13220
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1ArticleAnswer>]
13221
+ attr_accessor :article_answers
13222
+
13223
+ # Number of messages prior to and including latest_message to compile the
13224
+ # suggestion. It may be smaller than the SuggestArticlesResponse.context_size
13225
+ # field in the request if there aren't that many messages in the conversation.
13226
+ # Corresponds to the JSON property `contextSize`
13227
+ # @return [Fixnum]
13228
+ attr_accessor :context_size
13229
+
13230
+ # The name of the latest conversation message used to compile suggestion for.
13231
+ # Format: `projects//locations//conversations//messages/`.
13232
+ # Corresponds to the JSON property `latestMessage`
13233
+ # @return [String]
13234
+ attr_accessor :latest_message
13235
+
13236
+ def initialize(**args)
13237
+ update!(**args)
13238
+ end
13239
+
13240
+ # Update properties of this object
13241
+ def update!(**args)
13242
+ @article_answers = args[:article_answers] if args.key?(:article_answers)
13243
+ @context_size = args[:context_size] if args.key?(:context_size)
13244
+ @latest_message = args[:latest_message] if args.key?(:latest_message)
13245
+ end
13246
+ end
13247
+
13248
+ # The request message for Participants.SuggestFaqAnswers.
13249
+ class GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse
13250
+ include Google::Apis::Core::Hashable
13251
+
13252
+ # Number of messages prior to and including latest_message to compile the
13253
+ # suggestion. It may be smaller than the SuggestFaqAnswersRequest.context_size
13254
+ # field in the request if there aren't that many messages in the conversation.
13255
+ # Corresponds to the JSON property `contextSize`
13256
+ # @return [Fixnum]
13257
+ attr_accessor :context_size
13258
+
13259
+ # Output only. Answers extracted from FAQ documents.
13260
+ # Corresponds to the JSON property `faqAnswers`
13261
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1FaqAnswer>]
13262
+ attr_accessor :faq_answers
13263
+
13264
+ # The name of the latest conversation message used to compile suggestion for.
13265
+ # Format: `projects//locations//conversations//messages/`.
13266
+ # Corresponds to the JSON property `latestMessage`
13267
+ # @return [String]
13268
+ attr_accessor :latest_message
13269
+
13270
+ def initialize(**args)
13271
+ update!(**args)
13272
+ end
13273
+
13274
+ # Update properties of this object
13275
+ def update!(**args)
13276
+ @context_size = args[:context_size] if args.key?(:context_size)
13277
+ @faq_answers = args[:faq_answers] if args.key?(:faq_answers)
13278
+ @latest_message = args[:latest_message] if args.key?(:latest_message)
13279
+ end
13280
+ end
13281
+
13282
+ # The response message for Participants.SuggestSmartReplies.
13283
+ class GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse
13284
+ include Google::Apis::Core::Hashable
13285
+
13286
+ # Number of messages prior to and including latest_message to compile the
13287
+ # suggestion. It may be smaller than the SuggestSmartRepliesRequest.context_size
13288
+ # field in the request if there aren't that many messages in the conversation.
13289
+ # Corresponds to the JSON property `contextSize`
13290
+ # @return [Fixnum]
13291
+ attr_accessor :context_size
13292
+
13293
+ # The name of the latest conversation message used to compile suggestion for.
13294
+ # Format: `projects//locations//conversations//messages/`.
13295
+ # Corresponds to the JSON property `latestMessage`
13296
+ # @return [String]
13297
+ attr_accessor :latest_message
13298
+
13299
+ # Output only. Multiple reply options provided by smart reply service. The order
13300
+ # is based on the rank of the model prediction. The maximum number of the
13301
+ # returned replies is set in SmartReplyConfig.
13302
+ # Corresponds to the JSON property `smartReplyAnswers`
13303
+ # @return [Array<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1SmartReplyAnswer>]
13304
+ attr_accessor :smart_reply_answers
13305
+
13306
+ def initialize(**args)
13307
+ update!(**args)
13308
+ end
13309
+
13310
+ # Update properties of this object
13311
+ def update!(**args)
13312
+ @context_size = args[:context_size] if args.key?(:context_size)
13313
+ @latest_message = args[:latest_message] if args.key?(:latest_message)
13314
+ @smart_reply_answers = args[:smart_reply_answers] if args.key?(:smart_reply_answers)
13315
+ end
13316
+ end
13317
+
13318
+ # One response of different type of suggestion response which is used in the
13319
+ # response of Participants.AnalyzeContent and Participants.AnalyzeContent, as
13320
+ # well as HumanAgentAssistantEvent.
13321
+ class GoogleCloudDialogflowV2beta1SuggestionResult
13322
+ include Google::Apis::Core::Hashable
13323
+
13324
+ # The `Status` type defines a logical error model that is suitable for different
13325
+ # programming environments, including REST APIs and RPC APIs. It is used by [
13326
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
13327
+ # data: error code, error message, and error details. You can find out more
13328
+ # about this error model and how to work with it in the [API Design Guide](https:
13329
+ # //cloud.google.com/apis/design/errors).
13330
+ # Corresponds to the JSON property `error`
13331
+ # @return [Google::Apis::DialogflowV2::GoogleRpcStatus]
13332
+ attr_accessor :error
13333
+
13334
+ # The response message for Participants.SuggestArticles.
13335
+ # Corresponds to the JSON property `suggestArticlesResponse`
13336
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1SuggestArticlesResponse]
13337
+ attr_accessor :suggest_articles_response
13338
+
13339
+ # The request message for Participants.SuggestFaqAnswers.
13340
+ # Corresponds to the JSON property `suggestFaqAnswersResponse`
13341
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse]
13342
+ attr_accessor :suggest_faq_answers_response
13343
+
13344
+ # The response message for Participants.SuggestSmartReplies.
13345
+ # Corresponds to the JSON property `suggestSmartRepliesResponse`
13346
+ # @return [Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse]
13347
+ attr_accessor :suggest_smart_replies_response
13348
+
13349
+ def initialize(**args)
13350
+ update!(**args)
13351
+ end
13352
+
13353
+ # Update properties of this object
13354
+ def update!(**args)
13355
+ @error = args[:error] if args.key?(:error)
13356
+ @suggest_articles_response = args[:suggest_articles_response] if args.key?(:suggest_articles_response)
13357
+ @suggest_faq_answers_response = args[:suggest_faq_answers_response] if args.key?(:suggest_faq_answers_response)
13358
+ @suggest_smart_replies_response = args[:suggest_smart_replies_response] if args.key?(:suggest_smart_replies_response)
13359
+ end
13360
+ end
13361
+
10588
13362
  # The request message for a webhook call.
10589
13363
  class GoogleCloudDialogflowV2beta1WebhookRequest
10590
13364
  include Google::Apis::Core::Hashable
@@ -10675,6 +13449,14 @@ module Google
10675
13449
  # @return [String]
10676
13450
  attr_accessor :fulfillment_text
10677
13451
 
13452
+ # Indicates that a live agent should be brought in to handle the interaction
13453
+ # with the user. In most cases, when you set this flag to true, you would also
13454
+ # want to set end_interaction to true as well. Default is false.
13455
+ # Corresponds to the JSON property `liveAgentHandoff`
13456
+ # @return [Boolean]
13457
+ attr_accessor :live_agent_handoff
13458
+ alias_method :live_agent_handoff?, :live_agent_handoff
13459
+
10678
13460
  # Optional. The collection of output contexts that will overwrite currently
10679
13461
  # active contexts for the session and reset their lifespans. When provided,
10680
13462
  # Dialogflow uses this field to populate QueryResult.output_contexts sent to the
@@ -10721,6 +13503,7 @@ module Google
10721
13503
  @followup_event_input = args[:followup_event_input] if args.key?(:followup_event_input)
10722
13504
  @fulfillment_messages = args[:fulfillment_messages] if args.key?(:fulfillment_messages)
10723
13505
  @fulfillment_text = args[:fulfillment_text] if args.key?(:fulfillment_text)
13506
+ @live_agent_handoff = args[:live_agent_handoff] if args.key?(:live_agent_handoff)
10724
13507
  @output_contexts = args[:output_contexts] if args.key?(:output_contexts)
10725
13508
  @payload = args[:payload] if args.key?(:payload)
10726
13509
  @session_entity_types = args[:session_entity_types] if args.key?(:session_entity_types)
@@ -11006,8 +13789,8 @@ module Google
11006
13789
 
11007
13790
  # An object that represents a latitude/longitude pair. This is expressed as a
11008
13791
  # pair of doubles to represent degrees latitude and degrees longitude. Unless
11009
- # specified otherwise, this must conform to the WGS84 standard. Values must be
11010
- # within normalized ranges.
13792
+ # specified otherwise, this object must conform to the WGS84 standard. Values
13793
+ # must be within normalized ranges.
11011
13794
  class GoogleTypeLatLng
11012
13795
  include Google::Apis::Core::Hashable
11013
13796