#[non_exhaustive]pub struct SourceCodeSpec {
pub source: Option<Source>,
pub language_spec: Option<LanguageSpec>,
/* private fields */
}reasoning-engine-service only.Expand description
Specification for deploying from source code.
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>Specifies where the source code is located.
language_spec: Option<LanguageSpec>Specifies the language-specific configuration for building and running the code.
Implementations§
Source§impl SourceCodeSpec
impl SourceCodeSpec
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_aiplatform_v1::model::reasoning_engine_spec::source_code_spec::InlineSource;
let x = SourceCodeSpec::new().set_source(Some(
google_cloud_aiplatform_v1::model::reasoning_engine_spec::source_code_spec::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_aiplatform_v1::model::reasoning_engine_spec::source_code_spec::InlineSource;
let x = SourceCodeSpec::new().set_inline_source(InlineSource::default()/* use setters */);
assert!(x.inline_source().is_some());
assert!(x.developer_connect_source().is_none());Sourcepub fn developer_connect_source(&self) -> Option<&Box<DeveloperConnectSource>>
pub fn developer_connect_source(&self) -> Option<&Box<DeveloperConnectSource>>
The value of source
if it holds a DeveloperConnectSource, None if the field is not set or
holds a different branch.
Sourcepub fn set_developer_connect_source<T: Into<Box<DeveloperConnectSource>>>(
self,
v: T,
) -> Self
pub fn set_developer_connect_source<T: Into<Box<DeveloperConnectSource>>>( self, v: T, ) -> Self
Sets the value of source
to hold a DeveloperConnectSource.
Note that all the setters affecting source are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::reasoning_engine_spec::source_code_spec::DeveloperConnectSource;
let x = SourceCodeSpec::new().set_developer_connect_source(DeveloperConnectSource::default()/* use setters */);
assert!(x.developer_connect_source().is_some());
assert!(x.inline_source().is_none());Sourcepub fn set_language_spec<T: Into<Option<LanguageSpec>>>(self, v: T) -> Self
pub fn set_language_spec<T: Into<Option<LanguageSpec>>>(self, v: T) -> Self
Sets the value of language_spec.
Note that all the setters affecting language_spec are mutually
exclusive.
§Example
use google_cloud_aiplatform_v1::model::reasoning_engine_spec::source_code_spec::PythonSpec;
let x = SourceCodeSpec::new().set_language_spec(Some(
google_cloud_aiplatform_v1::model::reasoning_engine_spec::source_code_spec::LanguageSpec::PythonSpec(PythonSpec::default().into())));Sourcepub fn python_spec(&self) -> Option<&Box<PythonSpec>>
pub fn python_spec(&self) -> Option<&Box<PythonSpec>>
The value of language_spec
if it holds a PythonSpec, None if the field is not set or
holds a different branch.
Sourcepub fn set_python_spec<T: Into<Box<PythonSpec>>>(self, v: T) -> Self
pub fn set_python_spec<T: Into<Box<PythonSpec>>>(self, v: T) -> Self
Sets the value of language_spec
to hold a PythonSpec.
Note that all the setters affecting language_spec are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::reasoning_engine_spec::source_code_spec::PythonSpec;
let x = SourceCodeSpec::new().set_python_spec(PythonSpec::default()/* use setters */);
assert!(x.python_spec().is_some());Trait Implementations§
Source§impl Clone for SourceCodeSpec
impl Clone for SourceCodeSpec
Source§fn clone(&self) -> SourceCodeSpec
fn clone(&self) -> SourceCodeSpec
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more