#[non_exhaustive]pub struct Document {
pub name: String,
pub uri: String,
pub content: String,
pub description: String,
pub data_source: String,
pub title: String,
pub update_time: Option<Timestamp>,
pub view: DocumentView,
pub content_length_bytes: i32,
/* private fields */
}Expand description
A Document represents a page of documentation in the Developer Knowledge corpus, like the page at https://docs.cloud.google.com/storage/docs/creating-buckets.
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.name: StringIdentifier. Contains the resource name of the document.
Format: documents/{uri_without_scheme}
Example: documents/docs.cloud.google.com/storage/docs/creating-buckets
uri: StringOutput only. Provides the URI of the content, such as
docs.cloud.google.com/storage/docs/creating-buckets.
content: StringOutput only. Contains the full content of the document in Markdown format.
description: StringOutput only. Provides a description of the document.
data_source: StringOutput only. Specifies the data source of the document.
Example data source: firebase.google.com
title: StringOutput only. Provides the title of the document.
update_time: Option<Timestamp>Output only. Represents the timestamp when the content or metadata of the document was last updated.
view: DocumentViewOutput only. Specifies the DocumentView of the document.
content_length_bytes: i32Output only. The length of the content field in bytes.
Implementations§
Source§impl Document
impl Document
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_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_data_source<T: Into<String>>(self, v: T) -> Self
pub fn set_data_source<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
§Example
use wkt::Timestamp;
let x = Document::new().set_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
§Example
use wkt::Timestamp;
let x = Document::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = Document::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_view<T: Into<DocumentView>>(self, v: T) -> Self
pub fn set_view<T: Into<DocumentView>>(self, v: T) -> Self
Sourcepub fn set_content_length_bytes<T: Into<i32>>(self, v: T) -> Self
pub fn set_content_length_bytes<T: Into<i32>>(self, v: T) -> Self
Sets the value of content_length_bytes.
§Example
let x = Document::new().set_content_length_bytes(42);