#[non_exhaustive]pub struct RuntimeConfig {
pub uri: String,
pub state: State,
pub runtime: Option<Runtime>,
pub derived_from: Option<DerivedFrom>,
/* private fields */
}Expand description
RuntimeConfig represents the runtimes where the application is deployed.
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.uri: StringRequired. Immutable. The URI of the runtime configuration. For GKE, this is the cluster name. For Cloud Run, this is the service name.
state: StateOutput only. The state of the Runtime.
runtime: Option<Runtime>The type of the runtime.
derived_from: Option<DerivedFrom>Where the runtime is derived from.
Implementations§
Source§impl RuntimeConfig
impl RuntimeConfig
Sourcepub fn set_runtime<T: Into<Option<Runtime>>>(self, v: T) -> Self
pub fn set_runtime<T: Into<Option<Runtime>>>(self, v: T) -> Self
Sets the value of runtime.
Note that all the setters affecting runtime are mutually
exclusive.
§Example
use google_cloud_developerconnect_v1::model::GKEWorkload;
let x = RuntimeConfig::new().set_runtime(Some(
google_cloud_developerconnect_v1::model::runtime_config::Runtime::GkeWorkload(GKEWorkload::default().into())));Sourcepub fn gke_workload(&self) -> Option<&Box<GKEWorkload>>
pub fn gke_workload(&self) -> Option<&Box<GKEWorkload>>
The value of runtime
if it holds a GkeWorkload, None if the field is not set or
holds a different branch.
Sourcepub fn set_gke_workload<T: Into<Box<GKEWorkload>>>(self, v: T) -> Self
pub fn set_gke_workload<T: Into<Box<GKEWorkload>>>(self, v: T) -> Self
Sets the value of runtime
to hold a GkeWorkload.
Note that all the setters affecting runtime are
mutually exclusive.
§Example
use google_cloud_developerconnect_v1::model::GKEWorkload;
let x = RuntimeConfig::new().set_gke_workload(GKEWorkload::default()/* use setters */);
assert!(x.gke_workload().is_some());
assert!(x.google_cloud_run().is_none());Sourcepub fn google_cloud_run(&self) -> Option<&Box<GoogleCloudRun>>
pub fn google_cloud_run(&self) -> Option<&Box<GoogleCloudRun>>
The value of runtime
if it holds a GoogleCloudRun, None if the field is not set or
holds a different branch.
Sourcepub fn set_google_cloud_run<T: Into<Box<GoogleCloudRun>>>(self, v: T) -> Self
pub fn set_google_cloud_run<T: Into<Box<GoogleCloudRun>>>(self, v: T) -> Self
Sets the value of runtime
to hold a GoogleCloudRun.
Note that all the setters affecting runtime are
mutually exclusive.
§Example
use google_cloud_developerconnect_v1::model::GoogleCloudRun;
let x = RuntimeConfig::new().set_google_cloud_run(GoogleCloudRun::default()/* use setters */);
assert!(x.google_cloud_run().is_some());
assert!(x.gke_workload().is_none());Sourcepub fn set_derived_from<T: Into<Option<DerivedFrom>>>(self, v: T) -> Self
pub fn set_derived_from<T: Into<Option<DerivedFrom>>>(self, v: T) -> Self
Sets the value of derived_from.
Note that all the setters affecting derived_from are mutually
exclusive.
§Example
use google_cloud_developerconnect_v1::model::AppHubWorkload;
let x = RuntimeConfig::new().set_derived_from(Some(
google_cloud_developerconnect_v1::model::runtime_config::DerivedFrom::AppHubWorkload(AppHubWorkload::default().into())));Sourcepub fn app_hub_workload(&self) -> Option<&Box<AppHubWorkload>>
pub fn app_hub_workload(&self) -> Option<&Box<AppHubWorkload>>
The value of derived_from
if it holds a AppHubWorkload, None if the field is not set or
holds a different branch.
Sourcepub fn set_app_hub_workload<T: Into<Box<AppHubWorkload>>>(self, v: T) -> Self
pub fn set_app_hub_workload<T: Into<Box<AppHubWorkload>>>(self, v: T) -> Self
Sets the value of derived_from
to hold a AppHubWorkload.
Note that all the setters affecting derived_from are
mutually exclusive.
§Example
use google_cloud_developerconnect_v1::model::AppHubWorkload;
let x = RuntimeConfig::new().set_app_hub_workload(AppHubWorkload::default()/* use setters */);
assert!(x.app_hub_workload().is_some());
assert!(x.app_hub_service().is_none());Sourcepub fn app_hub_service(&self) -> Option<&Box<AppHubService>>
pub fn app_hub_service(&self) -> Option<&Box<AppHubService>>
The value of derived_from
if it holds a AppHubService, None if the field is not set or
holds a different branch.
Sourcepub fn set_app_hub_service<T: Into<Box<AppHubService>>>(self, v: T) -> Self
pub fn set_app_hub_service<T: Into<Box<AppHubService>>>(self, v: T) -> Self
Sets the value of derived_from
to hold a AppHubService.
Note that all the setters affecting derived_from are
mutually exclusive.
§Example
use google_cloud_developerconnect_v1::model::AppHubService;
let x = RuntimeConfig::new().set_app_hub_service(AppHubService::default()/* use setters */);
assert!(x.app_hub_service().is_some());
assert!(x.app_hub_workload().is_none());Trait Implementations§
Source§impl Clone for RuntimeConfig
impl Clone for RuntimeConfig
Source§fn clone(&self) -> RuntimeConfig
fn clone(&self) -> RuntimeConfig
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 RuntimeConfig
impl Debug for RuntimeConfig
Source§impl Default for RuntimeConfig
impl Default for RuntimeConfig
Source§fn default() -> RuntimeConfig
fn default() -> RuntimeConfig
Source§impl Message for RuntimeConfig
impl Message for RuntimeConfig
Source§impl PartialEq for RuntimeConfig
impl PartialEq for RuntimeConfig
impl StructuralPartialEq for RuntimeConfig
Auto Trait Implementations§
impl Freeze for RuntimeConfig
impl RefUnwindSafe for RuntimeConfig
impl Send for RuntimeConfig
impl Sync for RuntimeConfig
impl Unpin for RuntimeConfig
impl UnsafeUnpin for RuntimeConfig
impl UnwindSafe for RuntimeConfig
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