#[non_exhaustive]pub struct Reference {
pub content: Option<Content>,
/* private fields */
}conversational-search-service or session-service only.Expand description
Reference.
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.content: Option<Content>Search result content.
Implementations§
Source§impl Reference
impl Reference
pub fn new() -> Self
Sourcepub fn set_content<T: Into<Option<Content>>>(self, v: T) -> Self
pub fn set_content<T: Into<Option<Content>>>(self, v: T) -> Self
Sets the value of content.
Note that all the setters affecting content are mutually
exclusive.
§Example
use google_cloud_discoveryengine_v1::model::answer::reference::UnstructuredDocumentInfo;
let x = Reference::new().set_content(Some(
google_cloud_discoveryengine_v1::model::answer::reference::Content::UnstructuredDocumentInfo(UnstructuredDocumentInfo::default().into())));Sourcepub fn unstructured_document_info(
&self,
) -> Option<&Box<UnstructuredDocumentInfo>>
pub fn unstructured_document_info( &self, ) -> Option<&Box<UnstructuredDocumentInfo>>
The value of content
if it holds a UnstructuredDocumentInfo, None if the field is not set or
holds a different branch.
Sourcepub fn set_unstructured_document_info<T: Into<Box<UnstructuredDocumentInfo>>>(
self,
v: T,
) -> Self
pub fn set_unstructured_document_info<T: Into<Box<UnstructuredDocumentInfo>>>( self, v: T, ) -> Self
Sets the value of content
to hold a UnstructuredDocumentInfo.
Note that all the setters affecting content are
mutually exclusive.
§Example
use google_cloud_discoveryengine_v1::model::answer::reference::UnstructuredDocumentInfo;
let x = Reference::new().set_unstructured_document_info(UnstructuredDocumentInfo::default()/* use setters */);
assert!(x.unstructured_document_info().is_some());
assert!(x.chunk_info().is_none());
assert!(x.structured_document_info().is_none());Sourcepub fn chunk_info(&self) -> Option<&Box<ChunkInfo>>
pub fn chunk_info(&self) -> Option<&Box<ChunkInfo>>
The value of content
if it holds a ChunkInfo, None if the field is not set or
holds a different branch.
Sourcepub fn set_chunk_info<T: Into<Box<ChunkInfo>>>(self, v: T) -> Self
pub fn set_chunk_info<T: Into<Box<ChunkInfo>>>(self, v: T) -> Self
Sets the value of content
to hold a ChunkInfo.
Note that all the setters affecting content are
mutually exclusive.
§Example
use google_cloud_discoveryengine_v1::model::answer::reference::ChunkInfo;
let x = Reference::new().set_chunk_info(ChunkInfo::default()/* use setters */);
assert!(x.chunk_info().is_some());
assert!(x.unstructured_document_info().is_none());
assert!(x.structured_document_info().is_none());Sourcepub fn structured_document_info(&self) -> Option<&Box<StructuredDocumentInfo>>
pub fn structured_document_info(&self) -> Option<&Box<StructuredDocumentInfo>>
The value of content
if it holds a StructuredDocumentInfo, None if the field is not set or
holds a different branch.
Sourcepub fn set_structured_document_info<T: Into<Box<StructuredDocumentInfo>>>(
self,
v: T,
) -> Self
pub fn set_structured_document_info<T: Into<Box<StructuredDocumentInfo>>>( self, v: T, ) -> Self
Sets the value of content
to hold a StructuredDocumentInfo.
Note that all the setters affecting content are
mutually exclusive.
§Example
use google_cloud_discoveryengine_v1::model::answer::reference::StructuredDocumentInfo;
let x = Reference::new().set_structured_document_info(StructuredDocumentInfo::default()/* use setters */);
assert!(x.structured_document_info().is_some());
assert!(x.unstructured_document_info().is_none());
assert!(x.chunk_info().is_none());