google-cloud-dialogflow-v2 0.11.3 → 0.13.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.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/AUTHENTICATION.md +7 -25
  4. data/lib/google/cloud/dialogflow/v2/agents/client.rb +215 -27
  5. data/lib/google/cloud/dialogflow/v2/agents/operations.rb +115 -12
  6. data/lib/google/cloud/dialogflow/v2/answer_records/client.rb +46 -6
  7. data/lib/google/cloud/dialogflow/v2/contexts/client.rb +126 -18
  8. data/lib/google/cloud/dialogflow/v2/conversation_profile_pb.rb +4 -0
  9. data/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb +106 -15
  10. data/lib/google/cloud/dialogflow/v2/conversation_profiles/paths.rb +19 -0
  11. data/lib/google/cloud/dialogflow/v2/conversations/client.rb +112 -15
  12. data/lib/google/cloud/dialogflow/v2/document_pb.rb +13 -0
  13. data/lib/google/cloud/dialogflow/v2/document_services_pb.rb +10 -0
  14. data/lib/google/cloud/dialogflow/v2/documents/client.rb +303 -20
  15. data/lib/google/cloud/dialogflow/v2/documents/operations.rb +115 -12
  16. data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +242 -30
  17. data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +115 -12
  18. data/lib/google/cloud/dialogflow/v2/environments/client.rb +132 -18
  19. data/lib/google/cloud/dialogflow/v2/fulfillments/client.rb +40 -6
  20. data/lib/google/cloud/dialogflow/v2/gcs_pb.rb +4 -0
  21. data/lib/google/cloud/dialogflow/v2/intents/client.rb +161 -21
  22. data/lib/google/cloud/dialogflow/v2/intents/operations.rb +115 -12
  23. data/lib/google/cloud/dialogflow/v2/knowledge_base_pb.rb +1 -0
  24. data/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +134 -16
  25. data/lib/google/cloud/dialogflow/v2/participant_pb.rb +9 -0
  26. data/lib/google/cloud/dialogflow/v2/participants/client.rb +155 -24
  27. data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +106 -15
  28. data/lib/google/cloud/dialogflow/v2/session_pb.rb +1 -0
  29. data/lib/google/cloud/dialogflow/v2/sessions/client.rb +44 -3
  30. data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
  31. data/lib/google/cloud/dialogflow/v2/versions/client.rb +106 -15
  32. data/proto_docs/google/api/resource.rb +10 -71
  33. data/proto_docs/google/cloud/dialogflow/v2/agent.rb +4 -3
  34. data/proto_docs/google/cloud/dialogflow/v2/audio_config.rb +4 -1
  35. data/proto_docs/google/cloud/dialogflow/v2/conversation_profile.rb +28 -8
  36. data/proto_docs/google/cloud/dialogflow/v2/document.rb +53 -0
  37. data/proto_docs/google/cloud/dialogflow/v2/gcs.rb +39 -0
  38. data/proto_docs/google/cloud/dialogflow/v2/knowledge_base.rb +28 -0
  39. data/proto_docs/google/cloud/dialogflow/v2/participant.rb +69 -0
  40. data/proto_docs/google/cloud/dialogflow/v2/session.rb +38 -33
  41. metadata +4 -3
@@ -187,6 +187,27 @@ module Google
187
187
  #
188
188
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
189
189
  #
190
+ # @example Basic example
191
+ # require "google/cloud/dialogflow/v2"
192
+ #
193
+ # # Create a client object. The client can be reused for multiple calls.
194
+ # client = Google::Cloud::Dialogflow::V2::Versions::Client.new
195
+ #
196
+ # # Create a request. To set request fields, pass in keyword arguments.
197
+ # request = Google::Cloud::Dialogflow::V2::ListVersionsRequest.new
198
+ #
199
+ # # Call the list_versions method.
200
+ # result = client.list_versions request
201
+ #
202
+ # # The returned object is of type Gapic::PagedEnumerable. You can
203
+ # # iterate over all elements by calling #each, and the enumerable
204
+ # # will lazily make API calls to fetch subsequent pages. Other
205
+ # # methods are also available for managing paging directly.
206
+ # result.each do |response|
207
+ # # Each element is of type ::Google::Cloud::Dialogflow::V2::Version.
208
+ # p response
209
+ # end
210
+ #
190
211
  def list_versions request, options = nil
191
212
  raise ::ArgumentError, "request must be provided" if request.nil?
192
213
 
@@ -204,9 +225,11 @@ module Google
204
225
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
205
226
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
206
227
 
207
- header_params = {
208
- "parent" => request.parent
209
- }
228
+ header_params = {}
229
+ if request.parent
230
+ header_params["parent"] = request.parent
231
+ end
232
+
210
233
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
211
234
  metadata[:"x-goog-request-params"] ||= request_params_header
212
235
 
@@ -261,6 +284,21 @@ module Google
261
284
  #
262
285
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
263
286
  #
287
+ # @example Basic example
288
+ # require "google/cloud/dialogflow/v2"
289
+ #
290
+ # # Create a client object. The client can be reused for multiple calls.
291
+ # client = Google::Cloud::Dialogflow::V2::Versions::Client.new
292
+ #
293
+ # # Create a request. To set request fields, pass in keyword arguments.
294
+ # request = Google::Cloud::Dialogflow::V2::GetVersionRequest.new
295
+ #
296
+ # # Call the get_version method.
297
+ # result = client.get_version request
298
+ #
299
+ # # The returned object is of type Google::Cloud::Dialogflow::V2::Version.
300
+ # p result
301
+ #
264
302
  def get_version request, options = nil
265
303
  raise ::ArgumentError, "request must be provided" if request.nil?
266
304
 
@@ -278,9 +316,11 @@ module Google
278
316
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
279
317
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
280
318
 
281
- header_params = {
282
- "name" => request.name
283
- }
319
+ header_params = {}
320
+ if request.name
321
+ header_params["name"] = request.name
322
+ end
323
+
284
324
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
285
325
  metadata[:"x-goog-request-params"] ||= request_params_header
286
326
 
@@ -337,6 +377,21 @@ module Google
337
377
  #
338
378
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
339
379
  #
380
+ # @example Basic example
381
+ # require "google/cloud/dialogflow/v2"
382
+ #
383
+ # # Create a client object. The client can be reused for multiple calls.
384
+ # client = Google::Cloud::Dialogflow::V2::Versions::Client.new
385
+ #
386
+ # # Create a request. To set request fields, pass in keyword arguments.
387
+ # request = Google::Cloud::Dialogflow::V2::CreateVersionRequest.new
388
+ #
389
+ # # Call the create_version method.
390
+ # result = client.create_version request
391
+ #
392
+ # # The returned object is of type Google::Cloud::Dialogflow::V2::Version.
393
+ # p result
394
+ #
340
395
  def create_version request, options = nil
341
396
  raise ::ArgumentError, "request must be provided" if request.nil?
342
397
 
@@ -354,9 +409,11 @@ module Google
354
409
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
355
410
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
356
411
 
357
- header_params = {
358
- "parent" => request.parent
359
- }
412
+ header_params = {}
413
+ if request.parent
414
+ header_params["parent"] = request.parent
415
+ end
416
+
360
417
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
361
418
  metadata[:"x-goog-request-params"] ||= request_params_header
362
419
 
@@ -416,6 +473,21 @@ module Google
416
473
  #
417
474
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
418
475
  #
476
+ # @example Basic example
477
+ # require "google/cloud/dialogflow/v2"
478
+ #
479
+ # # Create a client object. The client can be reused for multiple calls.
480
+ # client = Google::Cloud::Dialogflow::V2::Versions::Client.new
481
+ #
482
+ # # Create a request. To set request fields, pass in keyword arguments.
483
+ # request = Google::Cloud::Dialogflow::V2::UpdateVersionRequest.new
484
+ #
485
+ # # Call the update_version method.
486
+ # result = client.update_version request
487
+ #
488
+ # # The returned object is of type Google::Cloud::Dialogflow::V2::Version.
489
+ # p result
490
+ #
419
491
  def update_version request, options = nil
420
492
  raise ::ArgumentError, "request must be provided" if request.nil?
421
493
 
@@ -433,9 +505,11 @@ module Google
433
505
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
434
506
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
435
507
 
436
- header_params = {
437
- "version.name" => request.version.name
438
- }
508
+ header_params = {}
509
+ if request.version&.name
510
+ header_params["version.name"] = request.version.name
511
+ end
512
+
439
513
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
440
514
  metadata[:"x-goog-request-params"] ||= request_params_header
441
515
 
@@ -489,6 +563,21 @@ module Google
489
563
  #
490
564
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
491
565
  #
566
+ # @example Basic example
567
+ # require "google/cloud/dialogflow/v2"
568
+ #
569
+ # # Create a client object. The client can be reused for multiple calls.
570
+ # client = Google::Cloud::Dialogflow::V2::Versions::Client.new
571
+ #
572
+ # # Create a request. To set request fields, pass in keyword arguments.
573
+ # request = Google::Cloud::Dialogflow::V2::DeleteVersionRequest.new
574
+ #
575
+ # # Call the delete_version method.
576
+ # result = client.delete_version request
577
+ #
578
+ # # The returned object is of type Google::Protobuf::Empty.
579
+ # p result
580
+ #
492
581
  def delete_version request, options = nil
493
582
  raise ::ArgumentError, "request must be provided" if request.nil?
494
583
 
@@ -506,9 +595,11 @@ module Google
506
595
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
507
596
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
508
597
 
509
- header_params = {
510
- "name" => request.name
511
- }
598
+ header_params = {}
599
+ if request.name
600
+ header_params["name"] = request.name
601
+ end
602
+
512
603
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
513
604
  metadata[:"x-goog-request-params"] ||= request_params_header
514
605
 
@@ -33,11 +33,7 @@ module Google
33
33
  # // For Kubernetes resources, the format is {api group}/{kind}.
34
34
  # option (google.api.resource) = {
35
35
  # type: "pubsub.googleapis.com/Topic"
36
- # name_descriptor: {
37
- # pattern: "projects/{project}/topics/{topic}"
38
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
39
- # parent_name_extractor: "projects/{project}"
40
- # }
36
+ # pattern: "projects/{project}/topics/{topic}"
41
37
  # };
42
38
  # }
43
39
  #
@@ -45,10 +41,7 @@ module Google
45
41
  #
46
42
  # resources:
47
43
  # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/{project}/topics/{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/{project}"
44
+ # pattern: "projects/{project}/topics/{topic}"
52
45
  #
53
46
  # Sometimes, resources have multiple patterns, typically because they can
54
47
  # live under multiple parents.
@@ -58,26 +51,10 @@ module Google
58
51
  # message LogEntry {
59
52
  # option (google.api.resource) = {
60
53
  # type: "logging.googleapis.com/LogEntry"
61
- # name_descriptor: {
62
- # pattern: "projects/{project}/logs/{log}"
63
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
64
- # parent_name_extractor: "projects/{project}"
65
- # }
66
- # name_descriptor: {
67
- # pattern: "folders/{folder}/logs/{log}"
68
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
69
- # parent_name_extractor: "folders/{folder}"
70
- # }
71
- # name_descriptor: {
72
- # pattern: "organizations/{organization}/logs/{log}"
73
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
74
- # parent_name_extractor: "organizations/{organization}"
75
- # }
76
- # name_descriptor: {
77
- # pattern: "billingAccounts/{billing_account}/logs/{log}"
78
- # parent_type: "billing.googleapis.com/BillingAccount"
79
- # parent_name_extractor: "billingAccounts/{billing_account}"
80
- # }
54
+ # pattern: "projects/{project}/logs/{log}"
55
+ # pattern: "folders/{folder}/logs/{log}"
56
+ # pattern: "organizations/{organization}/logs/{log}"
57
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
81
58
  # };
82
59
  # }
83
60
  #
@@ -85,48 +62,10 @@ module Google
85
62
  #
86
63
  # resources:
87
64
  # - type: 'logging.googleapis.com/LogEntry'
88
- # name_descriptor:
89
- # - pattern: "projects/{project}/logs/{log}"
90
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
91
- # parent_name_extractor: "projects/{project}"
92
- # - pattern: "folders/{folder}/logs/{log}"
93
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
94
- # parent_name_extractor: "folders/{folder}"
95
- # - pattern: "organizations/{organization}/logs/{log}"
96
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
97
- # parent_name_extractor: "organizations/{organization}"
98
- # - pattern: "billingAccounts/{billing_account}/logs/{log}"
99
- # parent_type: "billing.googleapis.com/BillingAccount"
100
- # parent_name_extractor: "billingAccounts/{billing_account}"
101
- #
102
- # For flexible resources, the resource name doesn't contain parent names, but
103
- # the resource itself has parents for policy evaluation.
104
- #
105
- # Example:
106
- #
107
- # message Shelf {
108
- # option (google.api.resource) = {
109
- # type: "library.googleapis.com/Shelf"
110
- # name_descriptor: {
111
- # pattern: "shelves/{shelf}"
112
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
113
- # }
114
- # name_descriptor: {
115
- # pattern: "shelves/{shelf}"
116
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
117
- # }
118
- # };
119
- # }
120
- #
121
- # The ResourceDescriptor Yaml config will look like:
122
- #
123
- # resources:
124
- # - type: 'library.googleapis.com/Shelf'
125
- # name_descriptor:
126
- # - pattern: "shelves/{shelf}"
127
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
128
- # - pattern: "shelves/{shelf}"
129
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
65
+ # pattern: "projects/{project}/logs/{log}"
66
+ # pattern: "folders/{folder}/logs/{log}"
67
+ # pattern: "organizations/{organization}/logs/{log}"
68
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
130
69
  # @!attribute [rw] type
131
70
  # @return [::String]
132
71
  # The resource type. It must be in the format of
@@ -126,13 +126,14 @@ module Google
126
126
  # Not specified. This value should never be used.
127
127
  TIER_UNSPECIFIED = 0
128
128
 
129
- # Standard tier.
129
+ # Trial Edition, previously known as Standard Edition.
130
130
  TIER_STANDARD = 1
131
131
 
132
- # Enterprise tier (Essentials).
132
+ # Essentials Edition, previously known as Enterprise Essential Edition.
133
133
  TIER_ENTERPRISE = 2
134
134
 
135
- # Enterprise tier (Plus).
135
+ # Essentials Edition (same as TIER_ENTERPRISE), previously known as
136
+ # Enterprise Plus Edition.
136
137
  TIER_ENTERPRISE_PLUS = 3
137
138
  end
138
139
  end
@@ -241,10 +241,13 @@ module Google
241
241
  # Configures speech transcription for {::Google::Cloud::Dialogflow::V2::ConversationProfile ConversationProfile}.
242
242
  # @!attribute [rw] speech_model_variant
243
243
  # @return [::Google::Cloud::Dialogflow::V2::SpeechModelVariant]
244
- # Optional. The speech model used in speech to text.
244
+ # The speech model used in speech to text.
245
245
  # `SPEECH_MODEL_VARIANT_UNSPECIFIED`, `USE_BEST_AVAILABLE` will be treated as
246
246
  # `USE_ENHANCED`. It can be overridden in {::Google::Cloud::Dialogflow::V2::AnalyzeContentRequest AnalyzeContentRequest} and
247
247
  # [StreamingAnalyzeContentRequest][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest] request.
248
+ # If enhanced model variant is specified and an enhanced
249
+ # version of the specified model for the language does not exist, then it
250
+ # would emit an error.
248
251
  class SpeechToTextConfig
249
252
  include ::Google::Protobuf::MessageExts
250
253
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -63,9 +63,21 @@ module Google
63
63
  # Settings for speech transcription.
64
64
  # @!attribute [rw] language_code
65
65
  # @return [::String]
66
- # Language which represents the conversationProfile.
67
- # If unspecified, the default language code en-us applies. Users need to
68
- # create a ConversationProfile for each language they want to support.
66
+ # Language code for the conversation profile. If not specified, the language
67
+ # is en-US. Language at ConversationProfile should be set for all non en-US
68
+ # languages.
69
+ # This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
70
+ # language tag. Example: "en-US".
71
+ # @!attribute [rw] time_zone
72
+ # @return [::String]
73
+ # The time zone of this conversational profile from the
74
+ # [time zone database](https://www.iana.org/time-zones), e.g.,
75
+ # America/New_York, Europe/Paris. Defaults to America/New_York.
76
+ # @!attribute [rw] security_settings
77
+ # @return [::String]
78
+ # Name of the CX SecuritySettings reference for the agent.
79
+ # Format: `projects/<Project ID>/locations/<Location
80
+ # ID>/securitySettings/<Security Settings ID>`.
69
81
  class ConversationProfile
70
82
  include ::Google::Protobuf::MessageExts
71
83
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -162,11 +174,16 @@ module Google
162
174
  # Number>@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow API
163
175
  # Service Agent` role in this project.
164
176
  #
165
- # Format: `projects/<Project ID>/locations/<Location
177
+ # - For ES agents, use format: `projects/<Project ID>/locations/<Location
166
178
  # ID>/agent/environments/<Environment ID or '-'>`. If environment is not
167
179
  # specified, the default `draft` environment is used. Refer to
168
180
  # [DetectIntentRequest](/dialogflow/docs/reference/rpc/google.cloud.dialogflow.v2#google.cloud.dialogflow.v2.DetectIntentRequest)
169
181
  # for more details.
182
+ #
183
+ # - For CX agents, use format `projects/<Project ID>/locations/<Location
184
+ # ID>/agents/<Agent ID>/environments/<Environment ID
185
+ # or '-'>`. If environment is not specified, the default `draft` environment
186
+ # is used.
170
187
  class AutomatedAgentConfig
171
188
  include ::Google::Protobuf::MessageExts
172
189
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -289,7 +306,7 @@ module Google
289
306
  # If this field is not set, it defaults to 0.0, which means that all
290
307
  # suggestions are returned.
291
308
  #
292
- # Supported features: ARTICLE_SUGGESTION.
309
+ # Supported features: ARTICLE_SUGGESTION, FAQ, SMART_REPLY, SMART_COMPOSE.
293
310
  # @!attribute [rw] context_filter_settings
294
311
  # @return [::Google::Cloud::Dialogflow::V2::HumanAgentAssistantConfig::SuggestionQueryConfig::ContextFilterSettings]
295
312
  # Determines how recent conversation context is filtered when generating
@@ -471,13 +488,13 @@ module Google
471
488
 
472
489
  # Format of cloud pub/sub message.
473
490
  module MessageFormat
474
- # If it is unspeified, PROTO will be used.
491
+ # If it is unspecified, PROTO will be used.
475
492
  MESSAGE_FORMAT_UNSPECIFIED = 0
476
493
 
477
- # Pubsub message will be serialized proto.
494
+ # Pub/Sub message will be serialized proto.
478
495
  PROTO = 1
479
496
 
480
- # Pubsub message will be json.
497
+ # Pub/Sub message will be json.
481
498
  JSON = 2
482
499
  end
483
500
  end
@@ -514,6 +531,9 @@ module Google
514
531
 
515
532
  # Run FAQ model.
516
533
  FAQ = 2
534
+
535
+ # Run smart reply model.
536
+ SMART_REPLY = 3
517
537
  end
518
538
  end
519
539
  end
@@ -163,6 +163,29 @@ module Google
163
163
  # @!attribute [rw] page_token
164
164
  # @return [::String]
165
165
  # The next_page_token value returned from a previous list request.
166
+ # @!attribute [rw] filter
167
+ # @return [::String]
168
+ # The filter expression used to filter documents returned by the list method.
169
+ # The expression has the following syntax:
170
+ #
171
+ # <field> <operator> <value> [AND <field> <operator> <value>] ...
172
+ #
173
+ # The following fields and operators are supported:
174
+ #
175
+ # * knowledge_types with has(:) operator
176
+ # * display_name with has(:) operator
177
+ # * state with equals(=) operator
178
+ #
179
+ # Examples:
180
+ #
181
+ # * "knowledge_types:FAQ" matches documents with FAQ knowledge type.
182
+ # * "display_name:customer" matches documents whose display name contains
183
+ # "customer".
184
+ # * "state=ACTIVE" matches documents with ACTIVE state.
185
+ # * "knowledge_types:FAQ AND state=ACTIVE" matches all active FAQ documents.
186
+ #
187
+ # For more information about filtering, see
188
+ # [API Filtering](https://aip.dev/160).
166
189
  class ListDocumentsRequest
167
190
  include ::Google::Protobuf::MessageExts
168
191
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -233,11 +256,41 @@ module Google
233
256
  #
234
257
  # For documents stored in Google Cloud Storage, these URIs must have
235
258
  # the form `gs://<bucket-name>/<object-name>`.
259
+ # @!attribute [rw] import_gcs_custom_metadata
260
+ # @return [::Boolean]
261
+ # Optional. Whether to import custom metadata from Google Cloud Storage.
262
+ # Only valid when the document source is Google Cloud Storage URI.
263
+ # @!attribute [rw] smart_messaging_partial_update
264
+ # @return [::Boolean]
265
+ # Optional. When enabled, the reload request is to apply partial update to the smart
266
+ # messaging allowlist.
236
267
  class ReloadDocumentRequest
237
268
  include ::Google::Protobuf::MessageExts
238
269
  extend ::Google::Protobuf::MessageExts::ClassMethods
239
270
  end
240
271
 
272
+ # Request message for {::Google::Cloud::Dialogflow::V2::Documents::Client#export_document Documents.ExportDocument}.
273
+ # @!attribute [rw] name
274
+ # @return [::String]
275
+ # Required. The name of the document to export.
276
+ # Format: `projects/<Project ID>/locations/<Location
277
+ # ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
278
+ # @!attribute [rw] gcs_destination
279
+ # @return [::Google::Cloud::Dialogflow::V2::GcsDestination]
280
+ # Cloud Storage file path to export the document.
281
+ # @!attribute [rw] export_full_content
282
+ # @return [::Boolean]
283
+ # When enabled, export the full content of the document including empirical
284
+ # probability.
285
+ # @!attribute [rw] smart_messaging_partial_update
286
+ # @return [::Boolean]
287
+ # When enabled, export the smart messaging allowlist document for partial
288
+ # update.
289
+ class ExportDocumentRequest
290
+ include ::Google::Protobuf::MessageExts
291
+ extend ::Google::Protobuf::MessageExts::ClassMethods
292
+ end
293
+
241
294
  # Metadata in google::longrunning::Operation for Knowledge operations.
242
295
  # @!attribute [r] state
243
296
  # @return [::Google::Cloud::Dialogflow::V2::KnowledgeOperationMetadata::State]
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Dialogflow
23
+ module V2
24
+ # Google Cloud Storage location for the output.
25
+ # @!attribute [rw] uri
26
+ # @return [::String]
27
+ # The Google Cloud Storage URIs for the output. A URI is of the
28
+ # form:
29
+ # gs://bucket/object-prefix-or-name
30
+ # Whether a prefix or name is used depends on the use case. The requesting
31
+ # user must have "write-permission" to the bucket.
32
+ class GcsDestination
33
+ include ::Google::Protobuf::MessageExts
34
+ extend ::Google::Protobuf::MessageExts::ClassMethods
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
@@ -63,6 +63,34 @@ module Google
63
63
  # @!attribute [rw] page_token
64
64
  # @return [::String]
65
65
  # The next_page_token value returned from a previous list request.
66
+ # @!attribute [rw] filter
67
+ # @return [::String]
68
+ # The filter expression used to filter knowledge bases returned by the list
69
+ # method. The expression has the following syntax:
70
+ #
71
+ # <field> <operator> <value> [AND <field> <operator> <value>] ...
72
+ #
73
+ # The following fields and operators are supported:
74
+ #
75
+ # * display_name with has(:) operator
76
+ # * language_code with equals(=) operator
77
+ #
78
+ # Examples:
79
+ #
80
+ # * 'language_code=en-us' matches knowledge bases with en-us language code.
81
+ # * 'display_name:articles' matches knowledge bases whose display name
82
+ # contains "articles".
83
+ # * 'display_name:"Best Articles"' matches knowledge bases whose display
84
+ # name contains "Best Articles".
85
+ # * 'language_code=en-gb AND display_name=articles' matches all knowledge
86
+ # bases whose display name contains "articles" and whose language code is
87
+ # "en-gb".
88
+ #
89
+ # Note: An empty filter string (i.e. "") is a no-op and will result in no
90
+ # filtering.
91
+ #
92
+ # For more information about filtering, see
93
+ # [API Filtering](https://aip.dev/160).
66
94
  class ListKnowledgeBasesRequest
67
95
  include ::Google::Protobuf::MessageExts
68
96
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -36,10 +36,37 @@ module Google
36
36
  # Optional. Label applied to streams representing this participant in SIPREC
37
37
  # XML metadata and SDP. This is used to assign transcriptions from that
38
38
  # media stream to this participant. This field can be updated.
39
+ # @!attribute [rw] documents_metadata_filters
40
+ # @return [::Google::Protobuf::Map{::String => ::String}]
41
+ # Optional. Key-value filters on the metadata of documents returned by article
42
+ # suggestion. If specified, article suggestion only returns suggested
43
+ # documents that match all filters in their {::Google::Cloud::Dialogflow::V2::Document#metadata Document.metadata}. Multiple
44
+ # values for a metadata key should be concatenated by comma. For example,
45
+ # filters to match all documents that have 'US' or 'CA' in their market
46
+ # metadata values and 'agent' in their user metadata values will be
47
+ # ```
48
+ # documents_metadata_filters {
49
+ # key: "market"
50
+ # value: "US,CA"
51
+ # }
52
+ # documents_metadata_filters {
53
+ # key: "user"
54
+ # value: "agent"
55
+ # }
56
+ # ```
39
57
  class Participant
40
58
  include ::Google::Protobuf::MessageExts
41
59
  extend ::Google::Protobuf::MessageExts::ClassMethods
42
60
 
61
+ # @!attribute [rw] key
62
+ # @return [::String]
63
+ # @!attribute [rw] value
64
+ # @return [::String]
65
+ class DocumentsMetadataFiltersEntry
66
+ include ::Google::Protobuf::MessageExts
67
+ extend ::Google::Protobuf::MessageExts::ClassMethods
68
+ end
69
+
43
70
  # Enumeration of the roles a participant can play in a conversation.
44
71
  module Role
45
72
  # Participant role not set.
@@ -179,6 +206,9 @@ module Google
179
206
  # @!attribute [rw] query_params
180
207
  # @return [::Google::Cloud::Dialogflow::V2::QueryParameters]
181
208
  # Parameters for a Dialogflow virtual-agent query.
209
+ # @!attribute [rw] assist_query_params
210
+ # @return [::Google::Cloud::Dialogflow::V2::AssistQueryParameters]
211
+ # Parameters for a human assist query.
182
212
  # @!attribute [rw] request_id
183
213
  # @return [::String]
184
214
  # A unique identifier for this request. Restricted to 36 ASCII characters.
@@ -262,6 +292,9 @@ module Google
262
292
  # Max number of messages prior to and including
263
293
  # {::Google::Cloud::Dialogflow::V2::SuggestArticlesRequest#latest_message latest_message} to use as context
264
294
  # when compiling the suggestion. By default 20 and at most 50.
295
+ # @!attribute [rw] assist_query_params
296
+ # @return [::Google::Cloud::Dialogflow::V2::AssistQueryParameters]
297
+ # Parameters for a human assist query.
265
298
  class SuggestArticlesRequest
266
299
  include ::Google::Protobuf::MessageExts
267
300
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -308,6 +341,9 @@ module Google
308
341
  # Max number of messages prior to and including
309
342
  # [latest_message] to use as context when compiling the
310
343
  # suggestion. By default 20 and at most 50.
344
+ # @!attribute [rw] assist_query_params
345
+ # @return [::Google::Cloud::Dialogflow::V2::AssistQueryParameters]
346
+ # Parameters for a human assist query.
311
347
  class SuggestFaqAnswersRequest
312
348
  include ::Google::Protobuf::MessageExts
313
349
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -519,6 +555,39 @@ module Google
519
555
  include ::Google::Protobuf::MessageExts
520
556
  extend ::Google::Protobuf::MessageExts::ClassMethods
521
557
  end
558
+
559
+ # Represents the parameters of human assist query.
560
+ # @!attribute [rw] documents_metadata_filters
561
+ # @return [::Google::Protobuf::Map{::String => ::String}]
562
+ # Key-value filters on the metadata of documents returned by article
563
+ # suggestion. If specified, article suggestion only returns suggested
564
+ # documents that match all filters in their {::Google::Cloud::Dialogflow::V2::Document#metadata Document.metadata}. Multiple
565
+ # values for a metadata key should be concatenated by comma. For example,
566
+ # filters to match all documents that have 'US' or 'CA' in their market
567
+ # metadata values and 'agent' in their user metadata values will be
568
+ # ```
569
+ # documents_metadata_filters {
570
+ # key: "market"
571
+ # value: "US,CA"
572
+ # }
573
+ # documents_metadata_filters {
574
+ # key: "user"
575
+ # value: "agent"
576
+ # }
577
+ # ```
578
+ class AssistQueryParameters
579
+ include ::Google::Protobuf::MessageExts
580
+ extend ::Google::Protobuf::MessageExts::ClassMethods
581
+
582
+ # @!attribute [rw] key
583
+ # @return [::String]
584
+ # @!attribute [rw] value
585
+ # @return [::String]
586
+ class DocumentsMetadataFiltersEntry
587
+ include ::Google::Protobuf::MessageExts
588
+ extend ::Google::Protobuf::MessageExts::ClassMethods
589
+ end
590
+ end
522
591
  end
523
592
  end
524
593
  end