#[non_exhaustive]pub struct GroundingChunk {
pub chunk_type: Option<ChunkType>,
/* private fields */
}prediction-service only.Expand description
Grounding chunk.
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.chunk_type: Option<ChunkType>Chunk type.
Implementations§
Source§impl GroundingChunk
impl GroundingChunk
pub fn new() -> Self
Sourcepub fn set_chunk_type<T: Into<Option<ChunkType>>>(self, v: T) -> Self
pub fn set_chunk_type<T: Into<Option<ChunkType>>>(self, v: T) -> Self
Sets the value of chunk_type.
Note that all the setters affecting chunk_type are mutually
exclusive.
§Example
use google_cloud_aiplatform_v1::model::grounding_chunk::Web;
let x = GroundingChunk::new().set_chunk_type(Some(
google_cloud_aiplatform_v1::model::grounding_chunk::ChunkType::Web(Web::default().into())));Sourcepub fn web(&self) -> Option<&Box<Web>>
pub fn web(&self) -> Option<&Box<Web>>
The value of chunk_type
if it holds a Web, None if the field is not set or
holds a different branch.
Sourcepub fn set_web<T: Into<Box<Web>>>(self, v: T) -> Self
pub fn set_web<T: Into<Box<Web>>>(self, v: T) -> Self
Sets the value of chunk_type
to hold a Web.
Note that all the setters affecting chunk_type are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::grounding_chunk::Web;
let x = GroundingChunk::new().set_web(Web::default()/* use setters */);
assert!(x.web().is_some());
assert!(x.retrieved_context().is_none());
assert!(x.maps().is_none());Sourcepub fn retrieved_context(&self) -> Option<&Box<RetrievedContext>>
pub fn retrieved_context(&self) -> Option<&Box<RetrievedContext>>
The value of chunk_type
if it holds a RetrievedContext, None if the field is not set or
holds a different branch.
Sourcepub fn set_retrieved_context<T: Into<Box<RetrievedContext>>>(self, v: T) -> Self
pub fn set_retrieved_context<T: Into<Box<RetrievedContext>>>(self, v: T) -> Self
Sets the value of chunk_type
to hold a RetrievedContext.
Note that all the setters affecting chunk_type are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::grounding_chunk::RetrievedContext;
let x = GroundingChunk::new().set_retrieved_context(RetrievedContext::default()/* use setters */);
assert!(x.retrieved_context().is_some());
assert!(x.web().is_none());
assert!(x.maps().is_none());Sourcepub fn maps(&self) -> Option<&Box<Maps>>
pub fn maps(&self) -> Option<&Box<Maps>>
The value of chunk_type
if it holds a Maps, None if the field is not set or
holds a different branch.
Sourcepub fn set_maps<T: Into<Box<Maps>>>(self, v: T) -> Self
pub fn set_maps<T: Into<Box<Maps>>>(self, v: T) -> Self
Sets the value of chunk_type
to hold a Maps.
Note that all the setters affecting chunk_type are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::grounding_chunk::Maps;
let x = GroundingChunk::new().set_maps(Maps::default()/* use setters */);
assert!(x.maps().is_some());
assert!(x.web().is_none());
assert!(x.retrieved_context().is_none());Trait Implementations§
Source§impl Clone for GroundingChunk
impl Clone for GroundingChunk
Source§fn clone(&self) -> GroundingChunk
fn clone(&self) -> GroundingChunk
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more