#[non_exhaustive]pub struct DocumentChunk {
pub parent: String,
pub id: String,
pub content: String,
pub document: Option<Document>,
/* private fields */
}Expand description
A DocumentChunk represents a piece of content from a
Document in the DeveloperKnowledge
corpus. To fetch the entire document content, pass the parent to
DeveloperKnowledge.GetDocument
or
DeveloperKnowledge.BatchGetDocuments.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.parent: StringOutput only. Contains the resource name of the document this chunk is from.
Format: documents/{uri_without_scheme}
Example: documents/docs.cloud.google.com/storage/docs/creating-buckets
id: StringOutput only. Specifies the ID of this chunk within the document. The chunk ID is unique within a document, but not globally unique across documents. The chunk ID is not stable and may change over time.
content: StringOutput only. Contains the content of the document chunk.
document: Option<Document>Output only. Represents metadata about the
Document this chunk is from. The
DocumentView of this
Document message will be set to
DOCUMENT_VIEW_BASIC. It is included here for convenience so that clients
do not need to call
DeveloperKnowledge.GetDocument
or
DeveloperKnowledge.BatchGetDocuments
if they only need the metadata fields. Otherwise, clients should use
DeveloperKnowledge.GetDocument
or
DeveloperKnowledge.BatchGetDocuments
to fetch the full document content.
Implementations§
Source§impl DocumentChunk
impl DocumentChunk
Sourcepub fn set_parent<T: Into<String>>(self, v: T) -> Self
pub fn set_parent<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_content<T: Into<String>>(self, v: T) -> Self
pub fn set_content<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_document<T>(self, v: T) -> Self
pub fn set_document<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_document<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_document<T>(self, v: Option<T>) -> Self
Trait Implementations§
Source§impl Clone for DocumentChunk
impl Clone for DocumentChunk
Source§fn clone(&self) -> DocumentChunk
fn clone(&self) -> DocumentChunk
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more