#[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
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());
assert!(x.image_spec().is_none());Sourcepub fn image_spec(&self) -> Option<&Box<ImageSpec>>
pub fn image_spec(&self) -> Option<&Box<ImageSpec>>
The value of language_spec
if it holds a ImageSpec, None if the field is not set or
holds a different branch.
Sourcepub fn set_image_spec<T: Into<Box<ImageSpec>>>(self, v: T) -> Self
pub fn set_image_spec<T: Into<Box<ImageSpec>>>(self, v: T) -> Self
Sets the value of language_spec
to hold a ImageSpec.
Note that all the setters affecting language_spec are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::reasoning_engine_spec::source_code_spec::ImageSpec;
let x = SourceCodeSpec::new().set_image_spec(ImageSpec::default()/* use setters */);
assert!(x.image_spec().is_some());
assert!(x.python_spec().is_none());Trait Implementations§
Source§impl Clone for SourceCodeSpec
impl Clone for SourceCodeSpec
Source§fn clone(&self) -> SourceCodeSpec
fn clone(&self) -> SourceCodeSpec
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 SourceCodeSpec
impl Debug for SourceCodeSpec
Source§impl Default for SourceCodeSpec
impl Default for SourceCodeSpec
Source§fn default() -> SourceCodeSpec
fn default() -> SourceCodeSpec
Source§impl Message for SourceCodeSpec
impl Message for SourceCodeSpec
Source§impl PartialEq for SourceCodeSpec
impl PartialEq for SourceCodeSpec
impl StructuralPartialEq for SourceCodeSpec
Auto Trait Implementations§
impl Freeze for SourceCodeSpec
impl RefUnwindSafe for SourceCodeSpec
impl Send for SourceCodeSpec
impl Sync for SourceCodeSpec
impl Unpin for SourceCodeSpec
impl UnsafeUnpin for SourceCodeSpec
impl UnwindSafe for SourceCodeSpec
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