google-cloud-dialogflow-cx-v3 0.19.0 → 0.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/dialogflow/cx/v3/agent_pb.rb +6 -1
  3. data/lib/google/cloud/dialogflow/cx/v3/agent_services_pb.rb +4 -0
  4. data/lib/google/cloud/dialogflow/cx/v3/agents/client.rb +200 -1
  5. data/lib/google/cloud/dialogflow/cx/v3/agents/operations.rb +10 -1
  6. data/lib/google/cloud/dialogflow/cx/v3/agents/paths.rb +19 -0
  7. data/lib/google/cloud/dialogflow/cx/v3/agents/rest/client.rb +338 -0
  8. data/lib/google/cloud/dialogflow/cx/v3/agents/rest/operations.rb +75 -0
  9. data/lib/google/cloud/dialogflow/cx/v3/agents/rest/service_stub.rb +119 -0
  10. data/lib/google/cloud/dialogflow/cx/v3/changelogs/client.rb +10 -1
  11. data/lib/google/cloud/dialogflow/cx/v3/changelogs/rest/client.rb +36 -0
  12. data/lib/google/cloud/dialogflow/cx/v3/data_store_connection_pb.rb +45 -0
  13. data/lib/google/cloud/dialogflow/cx/v3/deployments/client.rb +10 -1
  14. data/lib/google/cloud/dialogflow/cx/v3/deployments/rest/client.rb +36 -0
  15. data/lib/google/cloud/dialogflow/cx/v3/entity_types/client.rb +10 -1
  16. data/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/client.rb +84 -0
  17. data/lib/google/cloud/dialogflow/cx/v3/environments/client.rb +10 -1
  18. data/lib/google/cloud/dialogflow/cx/v3/environments/operations.rb +10 -1
  19. data/lib/google/cloud/dialogflow/cx/v3/environments/rest/client.rb +184 -0
  20. data/lib/google/cloud/dialogflow/cx/v3/environments/rest/operations.rb +75 -0
  21. data/lib/google/cloud/dialogflow/cx/v3/experiments/client.rb +10 -1
  22. data/lib/google/cloud/dialogflow/cx/v3/experiments/rest/client.rb +116 -0
  23. data/lib/google/cloud/dialogflow/cx/v3/flow_pb.rb +3 -1
  24. data/lib/google/cloud/dialogflow/cx/v3/flows/client.rb +14 -2
  25. data/lib/google/cloud/dialogflow/cx/v3/flows/operations.rb +10 -1
  26. data/lib/google/cloud/dialogflow/cx/v3/flows/paths.rb +40 -14
  27. data/lib/google/cloud/dialogflow/cx/v3/flows/rest/client.rb +189 -1
  28. data/lib/google/cloud/dialogflow/cx/v3/flows/rest/operations.rb +75 -0
  29. data/lib/google/cloud/dialogflow/cx/v3/generative_settings_pb.rb +51 -0
  30. data/lib/google/cloud/dialogflow/cx/v3/import_strategy_pb.rb +44 -0
  31. data/lib/google/cloud/dialogflow/cx/v3/intents/client.rb +10 -1
  32. data/lib/google/cloud/dialogflow/cx/v3/intents/rest/client.rb +84 -0
  33. data/lib/google/cloud/dialogflow/cx/v3/page_pb.rb +4 -1
  34. data/lib/google/cloud/dialogflow/cx/v3/pages/client.rb +10 -1
  35. data/lib/google/cloud/dialogflow/cx/v3/pages/paths.rb +40 -14
  36. data/lib/google/cloud/dialogflow/cx/v3/pages/rest/client.rb +84 -0
  37. data/lib/google/cloud/dialogflow/cx/v3/response_message_pb.rb +3 -1
  38. data/lib/google/cloud/dialogflow/cx/v3/safety_settings_pb.rb +47 -0
  39. data/lib/google/cloud/dialogflow/cx/v3/security_settings_pb.rb +2 -1
  40. data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/client.rb +10 -1
  41. data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/rest/client.rb +84 -0
  42. data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/client.rb +10 -1
  43. data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/rest/client.rb +84 -0
  44. data/lib/google/cloud/dialogflow/cx/v3/session_pb.rb +1 -1
  45. data/lib/google/cloud/dialogflow/cx/v3/sessions/client.rb +10 -1
  46. data/lib/google/cloud/dialogflow/cx/v3/sessions/rest/client.rb +48 -0
  47. data/lib/google/cloud/dialogflow/cx/v3/test_cases/client.rb +10 -1
  48. data/lib/google/cloud/dialogflow/cx/v3/test_cases/operations.rb +10 -1
  49. data/lib/google/cloud/dialogflow/cx/v3/test_cases/paths.rb +39 -13
  50. data/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/client.rb +228 -0
  51. data/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/operations.rb +75 -0
  52. data/lib/google/cloud/dialogflow/cx/v3/transition_route_group_pb.rb +1 -1
  53. data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/client.rb +20 -5
  54. data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/paths.rb +58 -13
  55. data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/rest/client.rb +94 -4
  56. data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/rest/service_stub.rb +37 -0
  57. data/lib/google/cloud/dialogflow/cx/v3/validation_message_pb.rb +1 -1
  58. data/lib/google/cloud/dialogflow/cx/v3/version.rb +1 -1
  59. data/lib/google/cloud/dialogflow/cx/v3/versions/client.rb +10 -1
  60. data/lib/google/cloud/dialogflow/cx/v3/versions/operations.rb +10 -1
  61. data/lib/google/cloud/dialogflow/cx/v3/versions/rest/client.rb +130 -0
  62. data/lib/google/cloud/dialogflow/cx/v3/versions/rest/operations.rb +75 -0
  63. data/lib/google/cloud/dialogflow/cx/v3/webhooks/client.rb +10 -1
  64. data/lib/google/cloud/dialogflow/cx/v3/webhooks/rest/client.rb +84 -0
  65. data/proto_docs/google/api/field_behavior.rb +14 -0
  66. data/proto_docs/google/cloud/dialogflow/cx/v3/agent.rb +49 -4
  67. data/proto_docs/google/cloud/dialogflow/cx/v3/data_store_connection.rb +61 -0
  68. data/proto_docs/google/cloud/dialogflow/cx/v3/flow.rb +24 -1
  69. data/proto_docs/google/cloud/dialogflow/cx/v3/generative_settings.rb +109 -0
  70. data/proto_docs/google/cloud/dialogflow/cx/v3/import_strategy.rb +54 -0
  71. data/proto_docs/google/cloud/dialogflow/cx/v3/page.rb +48 -3
  72. data/proto_docs/google/cloud/dialogflow/cx/v3/response_message.rb +38 -0
  73. data/proto_docs/google/cloud/dialogflow/cx/v3/safety_settings.rb +49 -0
  74. data/proto_docs/google/cloud/dialogflow/cx/v3/security_settings.rb +17 -2
  75. data/proto_docs/google/cloud/dialogflow/cx/v3/session.rb +9 -6
  76. data/proto_docs/google/cloud/dialogflow/cx/v3/transition_route_group.rb +13 -6
  77. data/proto_docs/google/cloud/dialogflow/cx/v3/validation_message.rb +3 -0
  78. metadata +13 -5
@@ -189,6 +189,26 @@ module Google
189
189
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Webhook>]
190
190
  #
191
191
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
192
+ #
193
+ # @example Basic example
194
+ # require "google/cloud/dialogflow/cx/v3"
195
+ #
196
+ # # Create a client object. The client can be reused for multiple calls.
197
+ # client = Google::Cloud::Dialogflow::CX::V3::Webhooks::Rest::Client.new
198
+ #
199
+ # # Create a request. To set request fields, pass in keyword arguments.
200
+ # request = Google::Cloud::Dialogflow::CX::V3::ListWebhooksRequest.new
201
+ #
202
+ # # Call the list_webhooks method.
203
+ # result = client.list_webhooks request
204
+ #
205
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
206
+ # # over elements, and API calls will be issued to fetch pages as needed.
207
+ # result.each do |item|
208
+ # # Each element is of type ::Google::Cloud::Dialogflow::CX::V3::Webhook.
209
+ # p item
210
+ # end
211
+ #
192
212
  def list_webhooks request, options = nil
193
213
  raise ::ArgumentError, "request must be provided" if request.nil?
194
214
 
@@ -254,6 +274,22 @@ module Google
254
274
  # @return [::Google::Cloud::Dialogflow::CX::V3::Webhook]
255
275
  #
256
276
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
277
+ #
278
+ # @example Basic example
279
+ # require "google/cloud/dialogflow/cx/v3"
280
+ #
281
+ # # Create a client object. The client can be reused for multiple calls.
282
+ # client = Google::Cloud::Dialogflow::CX::V3::Webhooks::Rest::Client.new
283
+ #
284
+ # # Create a request. To set request fields, pass in keyword arguments.
285
+ # request = Google::Cloud::Dialogflow::CX::V3::GetWebhookRequest.new
286
+ #
287
+ # # Call the get_webhook method.
288
+ # result = client.get_webhook request
289
+ #
290
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Webhook.
291
+ # p result
292
+ #
257
293
  def get_webhook request, options = nil
258
294
  raise ::ArgumentError, "request must be provided" if request.nil?
259
295
 
@@ -319,6 +355,22 @@ module Google
319
355
  # @return [::Google::Cloud::Dialogflow::CX::V3::Webhook]
320
356
  #
321
357
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
358
+ #
359
+ # @example Basic example
360
+ # require "google/cloud/dialogflow/cx/v3"
361
+ #
362
+ # # Create a client object. The client can be reused for multiple calls.
363
+ # client = Google::Cloud::Dialogflow::CX::V3::Webhooks::Rest::Client.new
364
+ #
365
+ # # Create a request. To set request fields, pass in keyword arguments.
366
+ # request = Google::Cloud::Dialogflow::CX::V3::CreateWebhookRequest.new
367
+ #
368
+ # # Call the create_webhook method.
369
+ # result = client.create_webhook request
370
+ #
371
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Webhook.
372
+ # p result
373
+ #
322
374
  def create_webhook request, options = nil
323
375
  raise ::ArgumentError, "request must be provided" if request.nil?
324
376
 
@@ -384,6 +436,22 @@ module Google
384
436
  # @return [::Google::Cloud::Dialogflow::CX::V3::Webhook]
385
437
  #
386
438
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
439
+ #
440
+ # @example Basic example
441
+ # require "google/cloud/dialogflow/cx/v3"
442
+ #
443
+ # # Create a client object. The client can be reused for multiple calls.
444
+ # client = Google::Cloud::Dialogflow::CX::V3::Webhooks::Rest::Client.new
445
+ #
446
+ # # Create a request. To set request fields, pass in keyword arguments.
447
+ # request = Google::Cloud::Dialogflow::CX::V3::UpdateWebhookRequest.new
448
+ #
449
+ # # Call the update_webhook method.
450
+ # result = client.update_webhook request
451
+ #
452
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Webhook.
453
+ # p result
454
+ #
387
455
  def update_webhook request, options = nil
388
456
  raise ::ArgumentError, "request must be provided" if request.nil?
389
457
 
@@ -459,6 +527,22 @@ module Google
459
527
  # @return [::Google::Protobuf::Empty]
460
528
  #
461
529
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
530
+ #
531
+ # @example Basic example
532
+ # require "google/cloud/dialogflow/cx/v3"
533
+ #
534
+ # # Create a client object. The client can be reused for multiple calls.
535
+ # client = Google::Cloud::Dialogflow::CX::V3::Webhooks::Rest::Client.new
536
+ #
537
+ # # Create a request. To set request fields, pass in keyword arguments.
538
+ # request = Google::Cloud::Dialogflow::CX::V3::DeleteWebhookRequest.new
539
+ #
540
+ # # Call the delete_webhook method.
541
+ # result = client.delete_webhook request
542
+ #
543
+ # # The returned object is of type Google::Protobuf::Empty.
544
+ # p result
545
+ #
462
546
  def delete_webhook request, options = nil
463
547
  raise ::ArgumentError, "request must be provided" if request.nil?
464
548
 
@@ -66,6 +66,20 @@ module Google
66
66
  # a non-empty value will be returned. The user will not be aware of what
67
67
  # non-empty value to expect.
68
68
  NON_EMPTY_DEFAULT = 7
69
+
70
+ # Denotes that the field in a resource (a message annotated with
71
+ # google.api.resource) is used in the resource name to uniquely identify the
72
+ # resource. For AIP-compliant APIs, this should only be applied to the
73
+ # `name` field on the resource.
74
+ #
75
+ # This behavior should not be applied to references to other resources within
76
+ # the message.
77
+ #
78
+ # The identifier field of resources often have different field behavior
79
+ # depending on the request it is embedded in (e.g. for Create methods name
80
+ # is optional and unused, while for Update methods it is required). Instead
81
+ # of method-specific annotations, only `IDENTIFIER` is required.
82
+ IDENTIFIER = 8
69
83
  end
70
84
  end
71
85
  end
@@ -41,8 +41,9 @@ module Google
41
41
  # Types][google.cloud.dialogflow.cx.v3.EntityType],
42
42
  # {::Google::Cloud::Dialogflow::CX::V3::Flow Flows},
43
43
  # {::Google::Cloud::Dialogflow::CX::V3::Fulfillment Fulfillments},
44
- # {::Google::Cloud::Dialogflow::CX::V3::Webhook Webhooks}, and so on to manage the
45
- # conversation flows..
44
+ # {::Google::Cloud::Dialogflow::CX::V3::Webhook Webhooks},
45
+ # {::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup TransitionRouteGroups}
46
+ # and so on to manage the conversation flows.
46
47
  # @!attribute [rw] name
47
48
  # @return [::String]
48
49
  # The unique identifier of the agent.
@@ -123,6 +124,9 @@ module Google
123
124
  # @return [::Google::Cloud::Dialogflow::CX::V3::TextToSpeechSettings]
124
125
  # Settings on instructing the speech synthesizer on how to generate the
125
126
  # output audio content.
127
+ # @!attribute [rw] gen_app_builder_settings
128
+ # @return [::Google::Cloud::Dialogflow::CX::V3::Agent::GenAppBuilderSettings]
129
+ # Gen App Builder-related agent-level settings.
126
130
  class Agent
127
131
  include ::Google::Protobuf::MessageExts
128
132
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -144,7 +148,7 @@ module Google
144
148
  # The GitHub repository URI related to the agent.
145
149
  # @!attribute [rw] tracking_branch
146
150
  # @return [::String]
147
- # The branch of GitHub repository tracked for this agent.
151
+ # The branch of the GitHub repository tracked for this agent.
148
152
  # @!attribute [rw] access_token
149
153
  # @return [::String]
150
154
  # The access token used to authenticate the access to the GitHub
@@ -157,6 +161,17 @@ module Google
157
161
  extend ::Google::Protobuf::MessageExts::ClassMethods
158
162
  end
159
163
  end
164
+
165
+ # Settings for Gen App Builder.
166
+ # @!attribute [rw] engine
167
+ # @return [::String]
168
+ # Required. The full name of the Gen App Builder engine related to this
169
+ # agent if there is one. Format: `projects/{Project ID}/locations/{Location
170
+ # ID}/collections/\\{Collection ID}/engines/\\{Engine ID}`
171
+ class GenAppBuilderSettings
172
+ include ::Google::Protobuf::MessageExts
173
+ extend ::Google::Protobuf::MessageExts::ClassMethods
174
+ end
160
175
  end
161
176
 
162
177
  # The request message for
@@ -319,7 +334,7 @@ module Google
319
334
  # @!attribute [rw] commit_sha
320
335
  # @return [::String]
321
336
  # Commit SHA of the git push. This field is populated if
322
- # `git_destination` are specified in
337
+ # `git_destination` is specified in
323
338
  # {::Google::Cloud::Dialogflow::CX::V3::ExportAgentRequest ExportAgentRequest}.
324
339
  class ExportAgentResponse
325
340
  include ::Google::Protobuf::MessageExts
@@ -424,6 +439,36 @@ module Google
424
439
  include ::Google::Protobuf::MessageExts
425
440
  extend ::Google::Protobuf::MessageExts::ClassMethods
426
441
  end
442
+
443
+ # Request for
444
+ # {::Google::Cloud::Dialogflow::CX::V3::Agents::Client#get_generative_settings GetGenerativeSettings}
445
+ # RPC.
446
+ # @!attribute [rw] name
447
+ # @return [::String]
448
+ # Required. Format: `projects/<Project ID>/locations/<Location
449
+ # ID>/agents/<Agent ID>/generativeSettings`.
450
+ # @!attribute [rw] language_code
451
+ # @return [::String]
452
+ # Required. Language code of the generative settings.
453
+ class GetGenerativeSettingsRequest
454
+ include ::Google::Protobuf::MessageExts
455
+ extend ::Google::Protobuf::MessageExts::ClassMethods
456
+ end
457
+
458
+ # Request for
459
+ # {::Google::Cloud::Dialogflow::CX::V3::Agents::Client#update_generative_settings UpdateGenerativeSettings}
460
+ # RPC.
461
+ # @!attribute [rw] generative_settings
462
+ # @return [::Google::Cloud::Dialogflow::CX::V3::GenerativeSettings]
463
+ # Required. Generative settings to update.
464
+ # @!attribute [rw] update_mask
465
+ # @return [::Google::Protobuf::FieldMask]
466
+ # Optional. The mask to control which fields get updated. If the mask is not
467
+ # present, all fields will be updated.
468
+ class UpdateGenerativeSettingsRequest
469
+ include ::Google::Protobuf::MessageExts
470
+ extend ::Google::Protobuf::MessageExts::ClassMethods
471
+ end
427
472
  end
428
473
  end
429
474
  end
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Dialogflow
23
+ module CX
24
+ module V3
25
+ # A data store connection. It represents a data store in Discovery Engine and
26
+ # the type of the contents it contains.
27
+ # @!attribute [rw] data_store_type
28
+ # @return [::Google::Cloud::Dialogflow::CX::V3::DataStoreType]
29
+ # The type of the connected data store.
30
+ # @!attribute [rw] data_store
31
+ # @return [::String]
32
+ # The full name of the referenced data store.
33
+ # Formats:
34
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
35
+ # `projects/{project}/locations/{location}/dataStores/{data_store}`
36
+ class DataStoreConnection
37
+ include ::Google::Protobuf::MessageExts
38
+ extend ::Google::Protobuf::MessageExts::ClassMethods
39
+ end
40
+
41
+ # Type of a data store.
42
+ # Determines how search is performed in the data store.
43
+ module DataStoreType
44
+ # Not specified. This value indicates that the data store type is not
45
+ # specified, so it will not be used during search.
46
+ DATA_STORE_TYPE_UNSPECIFIED = 0
47
+
48
+ # A data store that contains public web content.
49
+ PUBLIC_WEB = 1
50
+
51
+ # A data store that contains unstructured private data.
52
+ UNSTRUCTURED = 2
53
+
54
+ # A data store that contains structured data (for example FAQ).
55
+ STRUCTURED = 3
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
@@ -138,10 +138,16 @@ module Google
138
138
  # defined in the page have higher priority than those defined in the flow.
139
139
  #
140
140
  # Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
141
- # ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
141
+ # ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
142
+ # or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
143
+ # ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
144
+ # groups.
142
145
  # @!attribute [rw] nlu_settings
143
146
  # @return [::Google::Cloud::Dialogflow::CX::V3::NluSettings]
144
147
  # NLU related settings of the flow.
148
+ # @!attribute [rw] knowledge_connector_settings
149
+ # @return [::Google::Cloud::Dialogflow::CX::V3::KnowledgeConnectorSettings]
150
+ # Optional. Knowledge connector configuration.
145
151
  class Flow
146
152
  include ::Google::Protobuf::MessageExts
147
153
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -385,6 +391,10 @@ module Google
385
391
  # @!attribute [rw] import_option
386
392
  # @return [::Google::Cloud::Dialogflow::CX::V3::ImportFlowRequest::ImportOption]
387
393
  # Flow import mode. If not specified, `KEEP` is assumed.
394
+ # @!attribute [rw] flow_import_strategy
395
+ # @return [::Google::Cloud::Dialogflow::CX::V3::FlowImportStrategy]
396
+ # Optional. Specifies the import strategy used when resolving resource
397
+ # conflicts.
388
398
  class ImportFlowRequest
389
399
  include ::Google::Protobuf::MessageExts
390
400
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -406,6 +416,19 @@ module Google
406
416
  end
407
417
  end
408
418
 
419
+ # The flow import strategy used for resource conflict resolution associated
420
+ # with an {::Google::Cloud::Dialogflow::CX::V3::ImportFlowRequest ImportFlowRequest}.
421
+ # @!attribute [rw] global_import_strategy
422
+ # @return [::Google::Cloud::Dialogflow::CX::V3::ImportStrategy]
423
+ # Optional. Import strategy for resource conflict resolution, applied
424
+ # globally throughout the flow. It will be applied for all display name
425
+ # conflicts in the imported content. If not specified, 'CREATE_NEW' is
426
+ # assumed.
427
+ class FlowImportStrategy
428
+ include ::Google::Protobuf::MessageExts
429
+ extend ::Google::Protobuf::MessageExts::ClassMethods
430
+ end
431
+
409
432
  # The response message for
410
433
  # {::Google::Cloud::Dialogflow::CX::V3::Flows::Client#import_flow Flows.ImportFlow}.
411
434
  # @!attribute [rw] flow
@@ -0,0 +1,109 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Dialogflow
23
+ module CX
24
+ module V3
25
+ # Settings for Generative AI.
26
+ # @!attribute [rw] name
27
+ # @return [::String]
28
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
29
+ # ID>/generativeSettings`.
30
+ # @!attribute [rw] fallback_settings
31
+ # @return [::Google::Cloud::Dialogflow::CX::V3::GenerativeSettings::FallbackSettings]
32
+ # Settings for Generative Fallback.
33
+ # @!attribute [rw] generative_safety_settings
34
+ # @return [::Google::Cloud::Dialogflow::CX::V3::SafetySettings]
35
+ # Settings for Generative Safety.
36
+ # @!attribute [rw] knowledge_connector_settings
37
+ # @return [::Google::Cloud::Dialogflow::CX::V3::GenerativeSettings::KnowledgeConnectorSettings]
38
+ # Settings for knowledge connector.
39
+ # @!attribute [rw] language_code
40
+ # @return [::String]
41
+ # Language for this settings.
42
+ class GenerativeSettings
43
+ include ::Google::Protobuf::MessageExts
44
+ extend ::Google::Protobuf::MessageExts::ClassMethods
45
+
46
+ # Settings for Generative Fallback.
47
+ # @!attribute [rw] selected_prompt
48
+ # @return [::String]
49
+ # Display name of the selected prompt.
50
+ # @!attribute [rw] prompt_templates
51
+ # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::GenerativeSettings::FallbackSettings::PromptTemplate>]
52
+ # Stored prompts that can be selected, for example default templates like
53
+ # "conservative" or "chatty", or user defined ones.
54
+ class FallbackSettings
55
+ include ::Google::Protobuf::MessageExts
56
+ extend ::Google::Protobuf::MessageExts::ClassMethods
57
+
58
+ # Prompt template.
59
+ # @!attribute [rw] display_name
60
+ # @return [::String]
61
+ # Prompt name.
62
+ # @!attribute [rw] prompt_text
63
+ # @return [::String]
64
+ # Prompt text that is sent to a LLM on no-match default, placeholders are
65
+ # filled downstream. For example: "Here is a conversation $conversation,
66
+ # a response is: "
67
+ # @!attribute [rw] frozen
68
+ # @return [::Boolean]
69
+ # If the flag is true, the prompt is frozen and cannot be modified by
70
+ # users.
71
+ class PromptTemplate
72
+ include ::Google::Protobuf::MessageExts
73
+ extend ::Google::Protobuf::MessageExts::ClassMethods
74
+ end
75
+ end
76
+
77
+ # Settings for knowledge connector. These parameters are used for LLM prompt
78
+ # like "You are <agent>. You are a helpful and verbose <agent_identity> at
79
+ # <business>, <business_description>. Your task is to help humans on
80
+ # <agent_scope>".
81
+ # @!attribute [rw] business
82
+ # @return [::String]
83
+ # Name of the company, organization or other entity that the agent
84
+ # represents. Used for knowledge connector LLM prompt and for knowledge
85
+ # search.
86
+ # @!attribute [rw] agent
87
+ # @return [::String]
88
+ # Name of the virtual agent. Used for LLM prompt. Can be left empty.
89
+ # @!attribute [rw] agent_identity
90
+ # @return [::String]
91
+ # Identity of the agent, e.g. "virtual agent", "AI assistant".
92
+ # @!attribute [rw] business_description
93
+ # @return [::String]
94
+ # Company description, used for LLM prompt, e.g. "a family company selling
95
+ # freshly roasted coffee beans".
96
+ # @!attribute [rw] agent_scope
97
+ # @return [::String]
98
+ # Agent scope, e.g. "Example company website", "internal Example
99
+ # company website for employees", "manual of car owner".
100
+ class KnowledgeConnectorSettings
101
+ include ::Google::Protobuf::MessageExts
102
+ extend ::Google::Protobuf::MessageExts::ClassMethods
103
+ end
104
+ end
105
+ end
106
+ end
107
+ end
108
+ end
109
+ end
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Dialogflow
23
+ module CX
24
+ module V3
25
+ # Import strategies for the conflict resolution of resources (i.e. intents,
26
+ # entities, and webhooks) with identical display names during import
27
+ # operations.
28
+ module ImportStrategy
29
+ # Unspecified. Treated as 'CREATE_NEW'.
30
+ IMPORT_STRATEGY_UNSPECIFIED = 0
31
+
32
+ # Create a new resource with a numeric suffix appended to the end of the
33
+ # existing display name.
34
+ IMPORT_STRATEGY_CREATE_NEW = 1
35
+
36
+ # Replace existing resource with incoming resource in the content to be
37
+ # imported.
38
+ IMPORT_STRATEGY_REPLACE = 2
39
+
40
+ # Keep existing resource and discard incoming resource in the content to be
41
+ # imported.
42
+ IMPORT_STRATEGY_KEEP = 3
43
+
44
+ # Combine existing and incoming resources when a conflict is encountered.
45
+ IMPORT_STRATEGY_MERGE = 4
46
+
47
+ # Throw error if a conflict is encountered.
48
+ IMPORT_STRATEGY_THROW_ERROR = 5
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
@@ -61,8 +61,10 @@ module Google
61
61
  # @return [::Array<::String>]
62
62
  # Ordered list of
63
63
  # {::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup `TransitionRouteGroups`}
64
- # associated with the page. Transition route groups must be unique within a
65
- # page.
64
+ # added to the page. Transition route groups must be unique within a page. If
65
+ # the page links both flow-level transition route groups and agent-level
66
+ # transition route groups, the flow-level ones will have higher priority and
67
+ # will be put before the agent-level ones.
66
68
  #
67
69
  # * If multiple transition routes within a page scope refer to the same
68
70
  # intent, then the precedence order is: page's transition route -> page's
@@ -72,7 +74,10 @@ module Google
72
74
  # intent, then the first group in the ordered list takes precedence.
73
75
  #
74
76
  # Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
75
- # ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
77
+ # ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`
78
+ # or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
79
+ # ID>/transitionRouteGroups/<TransitionRouteGroup ID>` for agent-level
80
+ # groups.
76
81
  # @!attribute [rw] transition_routes
77
82
  # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::TransitionRoute>]
78
83
  # A list of transitions for the transition rules of this page.
@@ -101,6 +106,9 @@ module Google
101
106
  # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::EventHandler>]
102
107
  # Handlers associated with the page to handle events such as webhook errors,
103
108
  # no match or no input.
109
+ # @!attribute [rw] knowledge_connector_settings
110
+ # @return [::Google::Cloud::Dialogflow::CX::V3::KnowledgeConnectorSettings]
111
+ # Optional. Knowledge connector configuration.
104
112
  class Page
105
113
  include ::Google::Protobuf::MessageExts
106
114
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -267,6 +275,10 @@ module Google
267
275
  # @!attribute [r] name
268
276
  # @return [::String]
269
277
  # Output only. The unique identifier of this transition route.
278
+ # @!attribute [rw] description
279
+ # @return [::String]
280
+ # Optional. The description of the transition route. The maximum length is
281
+ # 500 characters.
270
282
  # @!attribute [rw] intent
271
283
  # @return [::String]
272
284
  # The unique identifier of an {::Google::Cloud::Dialogflow::CX::V3::Intent Intent}.
@@ -496,6 +508,39 @@ module Google
496
508
  include ::Google::Protobuf::MessageExts
497
509
  extend ::Google::Protobuf::MessageExts::ClassMethods
498
510
  end
511
+
512
+ # The Knowledge Connector settings for this page or flow.
513
+ # This includes information such as the attached Knowledge Bases, and the way
514
+ # to execute fulfillment.
515
+ # @!attribute [rw] enabled
516
+ # @return [::Boolean]
517
+ # Whether Knowledge Connector is enabled or not.
518
+ # @!attribute [rw] trigger_fulfillment
519
+ # @return [::Google::Cloud::Dialogflow::CX::V3::Fulfillment]
520
+ # The fulfillment to be triggered.
521
+ #
522
+ # When the answers from the Knowledge Connector are selected by Dialogflow,
523
+ # you can utitlize the request scoped parameter `$request.knowledge.answers`
524
+ # (contains up to the 5 highest confidence answers) and
525
+ # `$request.knowledge.questions` (contains the corresponding questions) to
526
+ # construct the fulfillment.
527
+ # @!attribute [rw] target_page
528
+ # @return [::String]
529
+ # The target page to transition to.
530
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
531
+ # ID>/flows/<Flow ID>/pages/<Page ID>`.
532
+ # @!attribute [rw] target_flow
533
+ # @return [::String]
534
+ # The target flow to transition to.
535
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
536
+ # ID>/flows/<Flow ID>`.
537
+ # @!attribute [rw] data_store_connections
538
+ # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::DataStoreConnection>]
539
+ # Optional. List of related data store connections.
540
+ class KnowledgeConnectorSettings
541
+ include ::Google::Protobuf::MessageExts
542
+ extend ::Google::Protobuf::MessageExts::ClassMethods
543
+ end
499
544
  end
500
545
  end
501
546
  end
@@ -81,6 +81,13 @@ module Google
81
81
  # @return [::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::TelephonyTransferCall]
82
82
  # A signal that the client should transfer the phone call connected to
83
83
  # this agent to a third-party endpoint.
84
+ # @!attribute [rw] knowledge_info_card
85
+ # @return [::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::KnowledgeInfoCard]
86
+ # Represents info card for knowledge answers, to be better rendered in
87
+ # Dialogflow Messenger.
88
+ # @!attribute [rw] response_type
89
+ # @return [::Google::Cloud::Dialogflow::CX::V3::ResponseMessage::ResponseType]
90
+ # Response type.
84
91
  # @!attribute [rw] channel
85
92
  # @return [::String]
86
93
  # The channel which the response is associated with. Clients can specify the
@@ -238,6 +245,37 @@ module Google
238
245
  include ::Google::Protobuf::MessageExts
239
246
  extend ::Google::Protobuf::MessageExts::ClassMethods
240
247
  end
248
+
249
+ # Represents info card response. If the response contains generative
250
+ # knowledge prediction, Dialogflow will return a payload with Infobot
251
+ # Messenger compatible info card.
252
+ #
253
+ # Otherwise, the info card response is skipped.
254
+ class KnowledgeInfoCard
255
+ include ::Google::Protobuf::MessageExts
256
+ extend ::Google::Protobuf::MessageExts::ClassMethods
257
+ end
258
+
259
+ # Represents different response types.
260
+ module ResponseType
261
+ # Not specified.
262
+ RESPONSE_TYPE_UNSPECIFIED = 0
263
+
264
+ # The response is from an [entry
265
+ # prompt][google.cloud.dialogflow.cx.v3.Page.entry_fulfillment] in the
266
+ # page.
267
+ ENTRY_PROMPT = 1
268
+
269
+ # The response is from [form-filling
270
+ # prompt][google.cloud.dialogflow.cx.v3.Form.Parameter.fill_behavior] in
271
+ # the page.
272
+ PARAMETER_PROMPT = 2
273
+
274
+ # The response is from a [transition
275
+ # route][google.cloud.dialogflow.cx.v3.TransitionRoute] or an [event
276
+ # handler][EventHandler] in the page or flow or transition route group.
277
+ HANDLER_PROMPT = 3
278
+ end
241
279
  end
242
280
  end
243
281
  end