xref: /aosp_15_r20/external/googleapis/google/cloud/dialogflow/v2/document.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.cloud.dialogflow.v2;
18
19import "google/api/annotations.proto";
20import "google/api/client.proto";
21import "google/api/field_behavior.proto";
22import "google/api/resource.proto";
23import "google/cloud/dialogflow/v2/gcs.proto";
24import "google/longrunning/operations.proto";
25import "google/protobuf/empty.proto";
26import "google/protobuf/field_mask.proto";
27import "google/protobuf/timestamp.proto";
28import "google/rpc/status.proto";
29
30option cc_enable_arenas = true;
31option csharp_namespace = "Google.Cloud.Dialogflow.V2";
32option go_package = "cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpb";
33option java_multiple_files = true;
34option java_outer_classname = "DocumentProto";
35option java_package = "com.google.cloud.dialogflow.v2";
36option objc_class_prefix = "DF";
37
38// Service for managing knowledge
39// [Documents][google.cloud.dialogflow.v2.Document].
40service Documents {
41  option (google.api.default_host) = "dialogflow.googleapis.com";
42  option (google.api.oauth_scopes) =
43      "https://www.googleapis.com/auth/cloud-platform,"
44      "https://www.googleapis.com/auth/dialogflow";
45
46  // Returns the list of all documents of the knowledge base.
47  rpc ListDocuments(ListDocumentsRequest) returns (ListDocumentsResponse) {
48    option (google.api.http) = {
49      get: "/v2/{parent=projects/*/knowledgeBases/*}/documents"
50      additional_bindings {
51        get: "/v2/{parent=projects/*/locations/*/knowledgeBases/*}/documents"
52      }
53      additional_bindings {
54        get: "/v2/{parent=projects/*/agent/knowledgeBases/*}/documents"
55      }
56    };
57    option (google.api.method_signature) = "parent";
58  }
59
60  // Retrieves the specified document.
61  rpc GetDocument(GetDocumentRequest) returns (Document) {
62    option (google.api.http) = {
63      get: "/v2/{name=projects/*/knowledgeBases/*/documents/*}"
64      additional_bindings {
65        get: "/v2/{name=projects/*/locations/*/knowledgeBases/*/documents/*}"
66      }
67      additional_bindings {
68        get: "/v2/{name=projects/*/agent/knowledgeBases/*/documents/*}"
69      }
70    };
71    option (google.api.method_signature) = "name";
72  }
73
74  // Creates a new document.
75  //
76  // This method is a [long-running
77  // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
78  // The returned `Operation` type has the following method-specific fields:
79  //
80  // - `metadata`:
81  // [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
82  // - `response`: [Document][google.cloud.dialogflow.v2.Document]
83  rpc CreateDocument(CreateDocumentRequest)
84      returns (google.longrunning.Operation) {
85    option (google.api.http) = {
86      post: "/v2/{parent=projects/*/knowledgeBases/*}/documents"
87      body: "document"
88      additional_bindings {
89        post: "/v2/{parent=projects/*/locations/*/knowledgeBases/*}/documents"
90        body: "document"
91      }
92      additional_bindings {
93        post: "/v2/{parent=projects/*/agent/knowledgeBases/*}/documents"
94        body: "document"
95      }
96    };
97    option (google.api.method_signature) = "parent,document";
98    option (google.longrunning.operation_info) = {
99      response_type: "Document"
100      metadata_type: "KnowledgeOperationMetadata"
101    };
102  }
103
104  // Creates documents by importing data from external sources.
105  // Dialogflow supports up to 350 documents in each request. If you try to
106  // import more, Dialogflow will return an error.
107  //
108  // This method is a [long-running
109  // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
110  // The returned `Operation` type has the following method-specific fields:
111  //
112  // - `metadata`:
113  // [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
114  // - `response`:
115  // [ImportDocumentsResponse][google.cloud.dialogflow.v2.ImportDocumentsResponse]
116  rpc ImportDocuments(ImportDocumentsRequest)
117      returns (google.longrunning.Operation) {
118    option (google.api.http) = {
119      post: "/v2/{parent=projects/*/knowledgeBases/*}/documents:import"
120      body: "*"
121      additional_bindings {
122        post: "/v2/{parent=projects/*/locations/*/knowledgeBases/*}/documents:import"
123        body: "*"
124      }
125    };
126    option (google.longrunning.operation_info) = {
127      response_type: "ImportDocumentsResponse"
128      metadata_type: "KnowledgeOperationMetadata"
129    };
130  }
131
132  // Deletes the specified document.
133  //
134  // This method is a [long-running
135  // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
136  // The returned `Operation` type has the following method-specific fields:
137  //
138  // - `metadata`:
139  // [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
140  // - `response`: An [Empty
141  //   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
142  rpc DeleteDocument(DeleteDocumentRequest)
143      returns (google.longrunning.Operation) {
144    option (google.api.http) = {
145      delete: "/v2/{name=projects/*/knowledgeBases/*/documents/*}"
146      additional_bindings {
147        delete: "/v2/{name=projects/*/locations/*/knowledgeBases/*/documents/*}"
148      }
149      additional_bindings {
150        delete: "/v2/{name=projects/*/agent/knowledgeBases/*/documents/*}"
151      }
152    };
153    option (google.api.method_signature) = "name";
154    option (google.longrunning.operation_info) = {
155      response_type: "google.protobuf.Empty"
156      metadata_type: "KnowledgeOperationMetadata"
157    };
158  }
159
160  // Updates the specified document.
161  //
162  // This method is a [long-running
163  // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
164  // The returned `Operation` type has the following method-specific fields:
165  //
166  // - `metadata`:
167  // [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
168  // - `response`: [Document][google.cloud.dialogflow.v2.Document]
169  rpc UpdateDocument(UpdateDocumentRequest)
170      returns (google.longrunning.Operation) {
171    option (google.api.http) = {
172      patch: "/v2/{document.name=projects/*/knowledgeBases/*/documents/*}"
173      body: "document"
174      additional_bindings {
175        patch: "/v2/{document.name=projects/*/locations/*/knowledgeBases/*/documents/*}"
176        body: "document"
177      }
178      additional_bindings {
179        patch: "/v2/{document.name=projects/*/agent/knowledgeBases/*/documents/*}"
180        body: "document"
181      }
182    };
183    option (google.api.method_signature) = "document,update_mask";
184    option (google.longrunning.operation_info) = {
185      response_type: "Document"
186      metadata_type: "KnowledgeOperationMetadata"
187    };
188  }
189
190  // Reloads the specified document from its specified source, content_uri or
191  // content. The previously loaded content of the document will be deleted.
192  // Note: Even when the content of the document has not changed, there still
193  // may be side effects because of internal implementation changes.
194  //
195  // This method is a [long-running
196  // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
197  // The returned `Operation` type has the following method-specific fields:
198  //
199  // - `metadata`:
200  // [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
201  // - `response`: [Document][google.cloud.dialogflow.v2.Document]
202  //
203  // Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
204  // only use `projects.knowledgeBases.documents`.
205  rpc ReloadDocument(ReloadDocumentRequest)
206      returns (google.longrunning.Operation) {
207    option (google.api.http) = {
208      post: "/v2/{name=projects/*/knowledgeBases/*/documents/*}:reload"
209      body: "*"
210      additional_bindings {
211        post: "/v2/{name=projects/*/locations/*/knowledgeBases/*/documents/*}:reload"
212        body: "*"
213      }
214      additional_bindings {
215        post: "/v2/{name=projects/*/agent/knowledgeBases/*/documents/*}:reload"
216        body: "*"
217      }
218    };
219    option (google.api.method_signature) = "name,content_uri";
220    option (google.longrunning.operation_info) = {
221      response_type: "Document"
222      metadata_type: "KnowledgeOperationMetadata"
223    };
224  }
225
226  // Exports a smart messaging candidate document into the specified
227  // destination.
228  //
229  // This method is a [long-running
230  // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
231  // The returned `Operation` type has the following method-specific fields:
232  //
233  // - `metadata`:
234  // [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
235  // - `response`: [Document][google.cloud.dialogflow.v2.Document]
236  rpc ExportDocument(ExportDocumentRequest)
237      returns (google.longrunning.Operation) {
238    option (google.api.http) = {
239      post: "/v2/{name=projects/*/knowledgeBases/*/documents/*}:export"
240      body: "*"
241      additional_bindings {
242        post: "/v2/{name=projects/*/locations/*/knowledgeBases/*/documents/*}:export"
243        body: "*"
244      }
245    };
246    option (google.longrunning.operation_info) = {
247      response_type: "Document"
248      metadata_type: "KnowledgeOperationMetadata"
249    };
250  }
251}
252
253// A knowledge document to be used by a
254// [KnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBase].
255//
256// For more information, see the [knowledge base
257// guide](https://cloud.google.com/dialogflow/docs/how/knowledge-bases).
258//
259// Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
260// only use `projects.knowledgeBases.documents`.
261message Document {
262  option (google.api.resource) = {
263    type: "dialogflow.googleapis.com/Document"
264    pattern: "projects/{project}/knowledgeBases/{knowledge_base}/documents/{document}"
265    pattern: "projects/{project}/locations/{location}/knowledgeBases/{knowledge_base}/documents/{document}"
266  };
267
268  // The knowledge type of document content.
269  enum KnowledgeType {
270    // The type is unspecified or arbitrary.
271    KNOWLEDGE_TYPE_UNSPECIFIED = 0;
272
273    // The document content contains question and answer pairs as either HTML or
274    // CSV. Typical FAQ HTML formats are parsed accurately, but unusual formats
275    // may fail to be parsed.
276    //
277    // CSV must have questions in the first column and answers in the second,
278    // with no header. Because of this explicit format, they are always parsed
279    // accurately.
280    FAQ = 1;
281
282    // Documents for which unstructured text is extracted and used for
283    // question answering.
284    EXTRACTIVE_QA = 2;
285
286    // The entire document content as a whole can be used for query results.
287    // Only for Contact Center Solutions on Dialogflow.
288    ARTICLE_SUGGESTION = 3;
289
290    // The document contains agent-facing Smart Reply entries.
291    AGENT_FACING_SMART_REPLY = 4;
292  }
293
294  // The status of a reload attempt.
295  message ReloadStatus {
296    // The time of a reload attempt.
297    // This reload may have been triggered automatically or manually and may
298    // not have succeeded.
299    google.protobuf.Timestamp time = 1;
300
301    // The status of a reload attempt or the initial load.
302    google.rpc.Status status = 2;
303  }
304
305  // Possible states of the document
306  enum State {
307    // The document state is unspecified.
308    STATE_UNSPECIFIED = 0;
309
310    // The document creation is in progress.
311    CREATING = 1;
312
313    // The document is active and ready to use.
314    ACTIVE = 2;
315
316    // The document updation is in progress.
317    UPDATING = 3;
318
319    // The document is reloading.
320    RELOADING = 4;
321
322    // The document deletion is in progress.
323    DELETING = 5;
324  }
325
326  // Optional. The document resource name.
327  // The name must be empty when creating a document.
328  // Format: `projects/<Project ID>/locations/<Location
329  // ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
330  string name = 1 [(google.api.field_behavior) = OPTIONAL];
331
332  // Required. The display name of the document. The name must be 1024 bytes or
333  // less; otherwise, the creation request fails.
334  string display_name = 2 [(google.api.field_behavior) = REQUIRED];
335
336  // Required. The MIME type of this document.
337  string mime_type = 3 [(google.api.field_behavior) = REQUIRED];
338
339  // Required. The knowledge type of document content.
340  repeated KnowledgeType knowledge_types = 4
341      [(google.api.field_behavior) = REQUIRED];
342
343  // Required. The source of this document.
344  oneof source {
345    // The URI where the file content is located.
346    //
347    // For documents stored in Google Cloud Storage, these URIs must have
348    // the form `gs://<bucket-name>/<object-name>`.
349    //
350    // NOTE: External URLs must correspond to public webpages, i.e., they must
351    // be indexed by Google Search. In particular, URLs for showing documents in
352    // Google Cloud Storage (i.e. the URL in your browser) are not supported.
353    // Instead use the `gs://` format URI described above.
354    string content_uri = 5;
355
356    // The raw content of the document. This field is only permitted for
357    // EXTRACTIVE_QA and FAQ knowledge types.
358    bytes raw_content = 9;
359  }
360
361  // Optional. If true, we try to automatically reload the document every day
362  // (at a time picked by the system). If false or unspecified, we don't try
363  // to automatically reload the document.
364  //
365  // Currently you can only enable automatic reload for documents sourced from
366  // a public url, see `source` field for the source types.
367  //
368  // Reload status can be tracked in `latest_reload_status`. If a reload
369  // fails, we will keep the document unchanged.
370  //
371  // If a reload fails with internal errors, the system will try to reload the
372  // document on the next day.
373  // If a reload fails with non-retriable errors (e.g. PERMISSION_DENIED), the
374  // system will not try to reload the document anymore. You need to manually
375  // reload the document successfully by calling `ReloadDocument` and clear the
376  // errors.
377  bool enable_auto_reload = 11 [(google.api.field_behavior) = OPTIONAL];
378
379  // Output only. The time and status of the latest reload.
380  // This reload may have been triggered automatically or manually
381  // and may not have succeeded.
382  ReloadStatus latest_reload_status = 12
383      [(google.api.field_behavior) = OUTPUT_ONLY];
384
385  // Optional. Metadata for the document. The metadata supports arbitrary
386  // key-value pairs. Suggested use cases include storing a document's title,
387  // an external URL distinct from the document's content_uri, etc.
388  // The max size of a `key` or a `value` of the metadata is 1024 bytes.
389  map<string, string> metadata = 7 [(google.api.field_behavior) = OPTIONAL];
390
391  // Output only. The current state of the document.
392  State state = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
393}
394
395// Request message for
396// [Documents.GetDocument][google.cloud.dialogflow.v2.Documents.GetDocument].
397message GetDocumentRequest {
398  // Required. The name of the document to retrieve.
399  // Format `projects/<Project ID>/locations/<Location
400  // ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
401  string name = 1 [
402    (google.api.field_behavior) = REQUIRED,
403    (google.api.resource_reference) = {
404      type: "dialogflow.googleapis.com/Document"
405    }
406  ];
407}
408
409// Request message for
410// [Documents.ListDocuments][google.cloud.dialogflow.v2.Documents.ListDocuments].
411message ListDocumentsRequest {
412  // Required. The knowledge base to list all documents for.
413  // Format: `projects/<Project ID>/locations/<Location
414  // ID>/knowledgeBases/<Knowledge Base ID>`.
415  string parent = 1 [
416    (google.api.field_behavior) = REQUIRED,
417    (google.api.resource_reference) = {
418      child_type: "dialogflow.googleapis.com/Document"
419    }
420  ];
421
422  // The maximum number of items to return in a single page. By
423  // default 10 and at most 100.
424  int32 page_size = 2;
425
426  // The next_page_token value returned from a previous list request.
427  string page_token = 3;
428
429  // The filter expression used to filter documents returned by the list method.
430  // The expression has the following syntax:
431  //
432  //   <field> <operator> <value> [AND <field> <operator> <value>] ...
433  //
434  // The following fields and operators are supported:
435  //
436  // * knowledge_types with has(:) operator
437  // * display_name with has(:) operator
438  // * state with equals(=) operator
439  //
440  // Examples:
441  //
442  // * "knowledge_types:FAQ" matches documents with FAQ knowledge type.
443  // * "display_name:customer" matches documents whose display name contains
444  //   "customer".
445  // * "state=ACTIVE" matches documents with ACTIVE state.
446  // * "knowledge_types:FAQ AND state=ACTIVE" matches all active FAQ documents.
447  //
448  // For more information about filtering, see
449  // [API Filtering](https://aip.dev/160).
450  string filter = 4;
451}
452
453// Response message for
454// [Documents.ListDocuments][google.cloud.dialogflow.v2.Documents.ListDocuments].
455message ListDocumentsResponse {
456  // The list of documents.
457  repeated Document documents = 1;
458
459  // Token to retrieve the next page of results, or empty if there are no
460  // more results in the list.
461  string next_page_token = 2;
462}
463
464// Request message for
465// [Documents.CreateDocument][google.cloud.dialogflow.v2.Documents.CreateDocument].
466message CreateDocumentRequest {
467  // Required. The knowledge base to create a document for.
468  // Format: `projects/<Project ID>/locations/<Location
469  // ID>/knowledgeBases/<Knowledge Base ID>`.
470  string parent = 1 [
471    (google.api.field_behavior) = REQUIRED,
472    (google.api.resource_reference) = {
473      child_type: "dialogflow.googleapis.com/Document"
474    }
475  ];
476
477  // Required. The document to create.
478  Document document = 2 [(google.api.field_behavior) = REQUIRED];
479}
480
481// Request message for
482// [Documents.ImportDocuments][google.cloud.dialogflow.v2.Documents.ImportDocuments].
483message ImportDocumentsRequest {
484  // Required. The knowledge base to import documents into.
485  // Format: `projects/<Project ID>/locations/<Location
486  // ID>/knowledgeBases/<Knowledge Base ID>`.
487  string parent = 1 [
488    (google.api.field_behavior) = REQUIRED,
489    (google.api.resource_reference) = {
490      child_type: "dialogflow.googleapis.com/Document"
491    }
492  ];
493
494  // Required. The source to use for importing documents.
495  //
496  // If the source captures multiple objects, then multiple documents will be
497  // created, one corresponding to each object, and all of these documents will
498  // be created using the same document template.
499  //
500  // Dialogflow supports up to 350 documents in each request. If you try to
501  // import more, Dialogflow will return an error.
502  oneof source {
503    // Optional. The Google Cloud Storage location for the documents.
504    // The path can include a wildcard.
505    //
506    // These URIs may have the forms
507    // `gs://<bucket-name>/<object-name>`.
508    // `gs://<bucket-name>/<object-path>/*.<extension>`.
509    GcsSources gcs_source = 2 [(google.api.field_behavior) = OPTIONAL];
510  }
511
512  // Required. Document template used for importing all the documents.
513  ImportDocumentTemplate document_template = 3
514      [(google.api.field_behavior) = REQUIRED];
515
516  // Whether to import custom metadata from Google Cloud Storage.
517  // Only valid when the document source is Google Cloud Storage URI.
518  bool import_gcs_custom_metadata = 4;
519}
520
521// The template used for importing documents.
522message ImportDocumentTemplate {
523  // Required. The MIME type of the document.
524  string mime_type = 1 [(google.api.field_behavior) = REQUIRED];
525
526  // Required. The knowledge type of document content.
527  repeated Document.KnowledgeType knowledge_types = 2
528      [(google.api.field_behavior) = REQUIRED];
529
530  // Metadata for the document. The metadata supports arbitrary
531  // key-value pairs. Suggested use cases include storing a document's title,
532  // an external URL distinct from the document's content_uri, etc.
533  // The max size of a `key` or a `value` of the metadata is 1024 bytes.
534  map<string, string> metadata = 3;
535}
536
537// Response message for
538// [Documents.ImportDocuments][google.cloud.dialogflow.v2.Documents.ImportDocuments].
539message ImportDocumentsResponse {
540  // Includes details about skipped documents or any other warnings.
541  repeated google.rpc.Status warnings = 1;
542}
543
544// Request message for
545// [Documents.DeleteDocument][google.cloud.dialogflow.v2.Documents.DeleteDocument].
546message DeleteDocumentRequest {
547  // Required. The name of the document to delete.
548  // Format: `projects/<Project ID>/locations/<Location
549  // ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
550  string name = 1 [
551    (google.api.field_behavior) = REQUIRED,
552    (google.api.resource_reference) = {
553      type: "dialogflow.googleapis.com/Document"
554    }
555  ];
556}
557
558// Request message for
559// [Documents.UpdateDocument][google.cloud.dialogflow.v2.Documents.UpdateDocument].
560message UpdateDocumentRequest {
561  // Required. The document to update.
562  Document document = 1 [(google.api.field_behavior) = REQUIRED];
563
564  // Optional. Not specified means `update all`.
565  // Currently, only `display_name` can be updated, an InvalidArgument will be
566  // returned for attempting to update other fields.
567  google.protobuf.FieldMask update_mask = 2
568      [(google.api.field_behavior) = OPTIONAL];
569}
570
571// Request message for
572// [Documents.ReloadDocument][google.cloud.dialogflow.v2.Documents.ReloadDocument].
573message ReloadDocumentRequest {
574  // Required. The name of the document to reload.
575  // Format: `projects/<Project ID>/locations/<Location
576  // ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`
577  string name = 1 [
578    (google.api.field_behavior) = REQUIRED,
579    (google.api.resource_reference) = {
580      type: "dialogflow.googleapis.com/Document"
581    }
582  ];
583
584  // The source for document reloading.
585  //
586  // If provided, the service will load the contents from the source
587  // and update document in the knowledge base.
588  //
589  // Reloading from a new document source is allowed for smart messaging
590  // documents only. If you want to update the source for other document types,
591  // please delete the existing document and create a new one instead.
592  oneof source {
593    // Optional. The path of gcs source file for reloading document content. For
594    // now, only gcs uri is supported.
595    //
596    // For documents stored in Google Cloud Storage, these URIs must have
597    // the form `gs://<bucket-name>/<object-name>`.
598    string content_uri = 3 [(google.api.field_behavior) = OPTIONAL];
599  }
600
601  // Optional. Whether to import custom metadata from Google Cloud Storage.
602  // Only valid when the document source is Google Cloud Storage URI.
603  bool import_gcs_custom_metadata = 4 [(google.api.field_behavior) = OPTIONAL];
604
605  // Optional. When enabled, the reload request is to apply partial update to
606  // the smart messaging allowlist.
607  bool smart_messaging_partial_update = 5
608      [(google.api.field_behavior) = OPTIONAL];
609}
610
611// Request message for
612// [Documents.ExportDocument][google.cloud.dialogflow.v2.Documents.ExportDocument].
613message ExportDocumentRequest {
614  // Required. The name of the document to export.
615  // Format: `projects/<Project ID>/locations/<Location
616  // ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
617  string name = 1 [
618    (google.api.field_behavior) = REQUIRED,
619    (google.api.resource_reference) = {
620      type: "dialogflow.googleapis.com/Document"
621    }
622  ];
623
624  // Required. The destination for the export.
625  oneof destination {
626    // Cloud Storage file path to export the document.
627    GcsDestination gcs_destination = 2;
628  }
629
630  // When enabled, export the full content of the document including empirical
631  // probability.
632  bool export_full_content = 3;
633
634  // When enabled, export the smart messaging allowlist document for partial
635  // update.
636  bool smart_messaging_partial_update = 5;
637}
638
639// Metadata related to the Export Data Operations (e.g. ExportDocument).
640message ExportOperationMetadata {
641  // Cloud Storage file path of the exported data.
642  GcsDestination exported_gcs_destination = 1;
643}
644
645// Metadata in google::longrunning::Operation for Knowledge operations.
646message KnowledgeOperationMetadata {
647  // States of the operation.
648  enum State {
649    // State unspecified.
650    STATE_UNSPECIFIED = 0;
651
652    // The operation has been created.
653    PENDING = 1;
654
655    // The operation is currently running.
656    RUNNING = 2;
657
658    // The operation is done, either cancelled or completed.
659    DONE = 3;
660  }
661
662  // Output only. The current state of this operation.
663  State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
664
665  // The name of the knowledge base interacted with during the operation.
666  string knowledge_base = 3;
667
668  // Additional metadata for the Knowledge operation.
669  oneof operation_metadata {
670    // Metadata for the Export Data Operation such as the destination of export.
671    ExportOperationMetadata export_operation_metadata = 4;
672  }
673}
674