#[non_exhaustive]pub struct GroundingSource {
pub source: Option<Source>,
/* private fields */
}grounded-generation-service only.Expand description
Grounding source.
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.source: Option<Source>Sources.
Implementations§
Source§impl GroundingSource
impl GroundingSource
pub fn new() -> Self
Sourcepub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
pub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
Sets the value of source.
Note that all the setters affecting source are mutually
exclusive.
§Example
use google_cloud_discoveryengine_v1::model::generate_grounded_content_request::grounding_source::InlineSource;
let x = GroundingSource::new().set_source(Some(
google_cloud_discoveryengine_v1::model::generate_grounded_content_request::grounding_source::Source::InlineSource(InlineSource::default().into())));Sourcepub fn inline_source(&self) -> Option<&Box<InlineSource>>
pub fn inline_source(&self) -> Option<&Box<InlineSource>>
The value of source
if it holds a InlineSource, None if the field is not set or
holds a different branch.
Sourcepub fn set_inline_source<T: Into<Box<InlineSource>>>(self, v: T) -> Self
pub fn set_inline_source<T: Into<Box<InlineSource>>>(self, v: T) -> Self
Sets the value of source
to hold a InlineSource.
Note that all the setters affecting source are
mutually exclusive.
§Example
use google_cloud_discoveryengine_v1::model::generate_grounded_content_request::grounding_source::InlineSource;
let x = GroundingSource::new().set_inline_source(InlineSource::default()/* use setters */);
assert!(x.inline_source().is_some());
assert!(x.search_source().is_none());
assert!(x.google_search_source().is_none());
assert!(x.enterprise_web_retrieval_source().is_none());Sourcepub fn search_source(&self) -> Option<&Box<SearchSource>>
pub fn search_source(&self) -> Option<&Box<SearchSource>>
The value of source
if it holds a SearchSource, None if the field is not set or
holds a different branch.
Sourcepub fn set_search_source<T: Into<Box<SearchSource>>>(self, v: T) -> Self
pub fn set_search_source<T: Into<Box<SearchSource>>>(self, v: T) -> Self
Sets the value of source
to hold a SearchSource.
Note that all the setters affecting source are
mutually exclusive.
§Example
use google_cloud_discoveryengine_v1::model::generate_grounded_content_request::grounding_source::SearchSource;
let x = GroundingSource::new().set_search_source(SearchSource::default()/* use setters */);
assert!(x.search_source().is_some());
assert!(x.inline_source().is_none());
assert!(x.google_search_source().is_none());
assert!(x.enterprise_web_retrieval_source().is_none());Sourcepub fn google_search_source(&self) -> Option<&Box<GoogleSearchSource>>
pub fn google_search_source(&self) -> Option<&Box<GoogleSearchSource>>
The value of source
if it holds a GoogleSearchSource, None if the field is not set or
holds a different branch.
Sourcepub fn set_google_search_source<T: Into<Box<GoogleSearchSource>>>(
self,
v: T,
) -> Self
pub fn set_google_search_source<T: Into<Box<GoogleSearchSource>>>( self, v: T, ) -> Self
Sets the value of source
to hold a GoogleSearchSource.
Note that all the setters affecting source are
mutually exclusive.
§Example
use google_cloud_discoveryengine_v1::model::generate_grounded_content_request::grounding_source::GoogleSearchSource;
let x = GroundingSource::new().set_google_search_source(GoogleSearchSource::default()/* use setters */);
assert!(x.google_search_source().is_some());
assert!(x.inline_source().is_none());
assert!(x.search_source().is_none());
assert!(x.enterprise_web_retrieval_source().is_none());Sourcepub fn enterprise_web_retrieval_source(
&self,
) -> Option<&Box<EnterpriseWebRetrievalSource>>
pub fn enterprise_web_retrieval_source( &self, ) -> Option<&Box<EnterpriseWebRetrievalSource>>
The value of source
if it holds a EnterpriseWebRetrievalSource, None if the field is not set or
holds a different branch.
Sourcepub fn set_enterprise_web_retrieval_source<T: Into<Box<EnterpriseWebRetrievalSource>>>(
self,
v: T,
) -> Self
pub fn set_enterprise_web_retrieval_source<T: Into<Box<EnterpriseWebRetrievalSource>>>( self, v: T, ) -> Self
Sets the value of source
to hold a EnterpriseWebRetrievalSource.
Note that all the setters affecting source are
mutually exclusive.
§Example
use google_cloud_discoveryengine_v1::model::generate_grounded_content_request::grounding_source::EnterpriseWebRetrievalSource;
let x = GroundingSource::new().set_enterprise_web_retrieval_source(EnterpriseWebRetrievalSource::default()/* use setters */);
assert!(x.enterprise_web_retrieval_source().is_some());
assert!(x.inline_source().is_none());
assert!(x.search_source().is_none());
assert!(x.google_search_source().is_none());Trait Implementations§
Source§impl Clone for GroundingSource
impl Clone for GroundingSource
Source§fn clone(&self) -> GroundingSource
fn clone(&self) -> GroundingSource
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more