@@ -20,6 +20,7 @@ import "google/api/annotations.proto";
20
20
import "google/api/client.proto" ;
21
21
import "google/api/field_behavior.proto" ;
22
22
import "google/api/resource.proto" ;
23
+ import "google/cloud/dialogflow/v2/gcs.proto" ;
23
24
import "google/longrunning/operations.proto" ;
24
25
import "google/protobuf/field_mask.proto" ;
25
26
import "google/protobuf/timestamp.proto" ;
@@ -183,6 +184,30 @@ service Documents {
183
184
metadata_type : "KnowledgeOperationMetadata"
184
185
};
185
186
}
187
+
188
+ // Exports a smart messaging candidate document into the specified
189
+ // destination.
190
+ //
191
+ // This method is a [long-running
192
+ // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
193
+ // The returned `Operation` type has the following method-specific fields:
194
+ //
195
+ // - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
196
+ // - `response`: [Document][google.cloud.dialogflow.v2.Document]
197
+ rpc ExportDocument (ExportDocumentRequest ) returns (google .longrunning .Operation ) {
198
+ option (google.api.http ) = {
199
+ post : "/v2/{name=projects/*/knowledgeBases/*/documents/*}:export"
200
+ body : "*"
201
+ additional_bindings {
202
+ post : "/v2/{name=projects/*/locations/*/knowledgeBases/*/documents/*}:export"
203
+ body : "*"
204
+ }
205
+ };
206
+ option (google.longrunning.operation_info ) = {
207
+ response_type : "Document"
208
+ metadata_type : "KnowledgeOperationMetadata"
209
+ };
210
+ }
186
211
}
187
212
188
213
// A knowledge document to be used by a [KnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBase].
@@ -328,6 +353,29 @@ message ListDocumentsRequest {
328
353
329
354
// The next_page_token value returned from a previous list request.
330
355
string page_token = 3 ;
356
+
357
+ // The filter expression used to filter documents returned by the list method.
358
+ // The expression has the following syntax:
359
+ //
360
+ // <field> <operator> <value> [AND <field> <operator> <value>] ...
361
+ //
362
+ // The following fields and operators are supported:
363
+ //
364
+ // * knowledge_types with has(:) operator
365
+ // * display_name with has(:) operator
366
+ // * state with equals(=) operator
367
+ //
368
+ // Examples:
369
+ //
370
+ // * "knowledge_types:FAQ" matches documents with FAQ knowledge type.
371
+ // * "display_name:customer" matches documents whose display name contains
372
+ // "customer".
373
+ // * "state=ACTIVE" matches documents with ACTIVE state.
374
+ // * "knowledge_types:FAQ AND state=ACTIVE" matches all active FAQ documents.
375
+ //
376
+ // For more information about filtering, see
377
+ // [API Filtering](https://aip.dev/160).
378
+ string filter = 4 ;
331
379
}
332
380
333
381
// Response message for [Documents.ListDocuments][google.cloud.dialogflow.v2.Documents.ListDocuments].
@@ -403,6 +451,41 @@ message ReloadDocumentRequest {
403
451
// the form `gs://<bucket-name>/<object-name>`.
404
452
string content_uri = 3 [(google.api.field_behavior ) = OPTIONAL ];
405
453
}
454
+
455
+ // Optional. Whether to import custom metadata from Google Cloud Storage.
456
+ // Only valid when the document source is Google Cloud Storage URI.
457
+ bool import_gcs_custom_metadata = 4 [(google.api.field_behavior ) = OPTIONAL ];
458
+
459
+ // Optional. When enabled, the reload request is to apply partial update to the smart
460
+ // messaging allowlist.
461
+ bool smart_messaging_partial_update = 5 [(google.api.field_behavior ) = OPTIONAL ];
462
+ }
463
+
464
+ // Request message for [Documents.ExportDocument][google.cloud.dialogflow.v2.Documents.ExportDocument].
465
+ message ExportDocumentRequest {
466
+ // Required. The name of the document to export.
467
+ // Format: `projects/<Project ID>/locations/<Location
468
+ // ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
469
+ string name = 1 [
470
+ (google.api.field_behavior ) = REQUIRED ,
471
+ (google.api.resource_reference ) = {
472
+ type : "dialogflow.googleapis.com/Document"
473
+ }
474
+ ];
475
+
476
+ // Required. The destination for the export.
477
+ oneof destination {
478
+ // Cloud Storage file path to export the document.
479
+ GcsDestination gcs_destination = 2 ;
480
+ }
481
+
482
+ // When enabled, export the full content of the document including empirical
483
+ // probability.
484
+ bool export_full_content = 3 ;
485
+
486
+ // When enabled, export the smart messaging allowlist document for partial
487
+ // update.
488
+ bool smart_messaging_partial_update = 5 ;
406
489
}
407
490
408
491
// Metadata in google::longrunning::Operation for Knowledge operations.
0 commit comments