#[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
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GroundingSource
impl Debug for GroundingSource
Source§impl Default for GroundingSource
impl Default for GroundingSource
Source§fn default() -> GroundingSource
fn default() -> GroundingSource
Source§impl Message for GroundingSource
impl Message for GroundingSource
Source§impl PartialEq for GroundingSource
impl PartialEq for GroundingSource
impl StructuralPartialEq for GroundingSource
Auto Trait Implementations§
impl Freeze for GroundingSource
impl RefUnwindSafe for GroundingSource
impl Send for GroundingSource
impl Sync for GroundingSource
impl Unpin for GroundingSource
impl UnsafeUnpin for GroundingSource
impl UnwindSafe for GroundingSource
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request