#[non_exhaustive]pub struct GenAiModelInfo {
pub model_info: Option<ModelInfo>,
/* private fields */
}Expand description
Information about Generative AI model-based processor versions.
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.model_info: Option<ModelInfo>The processor version is either a pretrained Google-managed foundation model or a custom Generative AI model created by the user.
Implementations§
Source§impl GenAiModelInfo
impl GenAiModelInfo
Sourcepub fn set_model_info<T: Into<Option<ModelInfo>>>(self, v: T) -> Self
pub fn set_model_info<T: Into<Option<ModelInfo>>>(self, v: T) -> Self
Sets the value of model_info.
Note that all the setters affecting model_info are mutually
exclusive.
§Example
use google_cloud_documentai_v1::model::processor_version::gen_ai_model_info::FoundationGenAiModelInfo;
let x = GenAiModelInfo::new().set_model_info(Some(
google_cloud_documentai_v1::model::processor_version::gen_ai_model_info::ModelInfo::FoundationGenAiModelInfo(FoundationGenAiModelInfo::default().into())));Sourcepub fn foundation_gen_ai_model_info(
&self,
) -> Option<&Box<FoundationGenAiModelInfo>>
pub fn foundation_gen_ai_model_info( &self, ) -> Option<&Box<FoundationGenAiModelInfo>>
The value of model_info
if it holds a FoundationGenAiModelInfo, None if the field is not set or
holds a different branch.
Sourcepub fn set_foundation_gen_ai_model_info<T: Into<Box<FoundationGenAiModelInfo>>>(
self,
v: T,
) -> Self
pub fn set_foundation_gen_ai_model_info<T: Into<Box<FoundationGenAiModelInfo>>>( self, v: T, ) -> Self
Sets the value of model_info
to hold a FoundationGenAiModelInfo.
Note that all the setters affecting model_info are
mutually exclusive.
§Example
use google_cloud_documentai_v1::model::processor_version::gen_ai_model_info::FoundationGenAiModelInfo;
let x = GenAiModelInfo::new().set_foundation_gen_ai_model_info(FoundationGenAiModelInfo::default()/* use setters */);
assert!(x.foundation_gen_ai_model_info().is_some());
assert!(x.custom_gen_ai_model_info().is_none());Sourcepub fn custom_gen_ai_model_info(&self) -> Option<&Box<CustomGenAiModelInfo>>
pub fn custom_gen_ai_model_info(&self) -> Option<&Box<CustomGenAiModelInfo>>
The value of model_info
if it holds a CustomGenAiModelInfo, None if the field is not set or
holds a different branch.
Sourcepub fn set_custom_gen_ai_model_info<T: Into<Box<CustomGenAiModelInfo>>>(
self,
v: T,
) -> Self
pub fn set_custom_gen_ai_model_info<T: Into<Box<CustomGenAiModelInfo>>>( self, v: T, ) -> Self
Sets the value of model_info
to hold a CustomGenAiModelInfo.
Note that all the setters affecting model_info are
mutually exclusive.
§Example
use google_cloud_documentai_v1::model::processor_version::gen_ai_model_info::CustomGenAiModelInfo;
let x = GenAiModelInfo::new().set_custom_gen_ai_model_info(CustomGenAiModelInfo::default()/* use setters */);
assert!(x.custom_gen_ai_model_info().is_some());
assert!(x.foundation_gen_ai_model_info().is_none());Trait Implementations§
Source§impl Clone for GenAiModelInfo
impl Clone for GenAiModelInfo
Source§fn clone(&self) -> GenAiModelInfo
fn clone(&self) -> GenAiModelInfo
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 GenAiModelInfo
impl Debug for GenAiModelInfo
Source§impl Default for GenAiModelInfo
impl Default for GenAiModelInfo
Source§fn default() -> GenAiModelInfo
fn default() -> GenAiModelInfo
Source§impl Message for GenAiModelInfo
impl Message for GenAiModelInfo
Source§impl PartialEq for GenAiModelInfo
impl PartialEq for GenAiModelInfo
impl StructuralPartialEq for GenAiModelInfo
Auto Trait Implementations§
impl Freeze for GenAiModelInfo
impl RefUnwindSafe for GenAiModelInfo
impl Send for GenAiModelInfo
impl Sync for GenAiModelInfo
impl Unpin for GenAiModelInfo
impl UnsafeUnpin for GenAiModelInfo
impl UnwindSafe for GenAiModelInfo
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