#[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
pub fn new() -> Self
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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more