#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ApplicationComponent {
pub component_name: ::std::option::Option<::std::string::String>,
pub component_remarks: ::std::option::Option<::std::string::String>,
pub resource_type: ::std::option::Option<::std::string::String>,
pub os_type: ::std::option::Option<crate::types::OsType>,
pub tier: ::std::option::Option<crate::types::Tier>,
pub monitor: ::std::option::Option<bool>,
pub detected_workload: ::std::option::Option<
::std::collections::HashMap<crate::types::Tier, ::std::collections::HashMap<::std::string::String, ::std::string::String>>,
>,
}
impl ApplicationComponent {
pub fn component_name(&self) -> ::std::option::Option<&str> {
self.component_name.as_deref()
}
pub fn component_remarks(&self) -> ::std::option::Option<&str> {
self.component_remarks.as_deref()
}
pub fn resource_type(&self) -> ::std::option::Option<&str> {
self.resource_type.as_deref()
}
pub fn os_type(&self) -> ::std::option::Option<&crate::types::OsType> {
self.os_type.as_ref()
}
pub fn tier(&self) -> ::std::option::Option<&crate::types::Tier> {
self.tier.as_ref()
}
pub fn monitor(&self) -> ::std::option::Option<bool> {
self.monitor
}
pub fn detected_workload(
&self,
) -> ::std::option::Option<
&::std::collections::HashMap<crate::types::Tier, ::std::collections::HashMap<::std::string::String, ::std::string::String>>,
> {
self.detected_workload.as_ref()
}
}
impl ApplicationComponent {
pub fn builder() -> crate::types::builders::ApplicationComponentBuilder {
crate::types::builders::ApplicationComponentBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ApplicationComponentBuilder {
pub(crate) component_name: ::std::option::Option<::std::string::String>,
pub(crate) component_remarks: ::std::option::Option<::std::string::String>,
pub(crate) resource_type: ::std::option::Option<::std::string::String>,
pub(crate) os_type: ::std::option::Option<crate::types::OsType>,
pub(crate) tier: ::std::option::Option<crate::types::Tier>,
pub(crate) monitor: ::std::option::Option<bool>,
pub(crate) detected_workload: ::std::option::Option<
::std::collections::HashMap<crate::types::Tier, ::std::collections::HashMap<::std::string::String, ::std::string::String>>,
>,
}
impl ApplicationComponentBuilder {
pub fn component_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.component_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_component_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.component_name = input;
self
}
pub fn get_component_name(&self) -> &::std::option::Option<::std::string::String> {
&self.component_name
}
pub fn component_remarks(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.component_remarks = ::std::option::Option::Some(input.into());
self
}
pub fn set_component_remarks(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.component_remarks = input;
self
}
pub fn get_component_remarks(&self) -> &::std::option::Option<::std::string::String> {
&self.component_remarks
}
pub fn resource_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.resource_type = ::std::option::Option::Some(input.into());
self
}
pub fn set_resource_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.resource_type = input;
self
}
pub fn get_resource_type(&self) -> &::std::option::Option<::std::string::String> {
&self.resource_type
}
pub fn os_type(mut self, input: crate::types::OsType) -> Self {
self.os_type = ::std::option::Option::Some(input);
self
}
pub fn set_os_type(mut self, input: ::std::option::Option<crate::types::OsType>) -> Self {
self.os_type = input;
self
}
pub fn get_os_type(&self) -> &::std::option::Option<crate::types::OsType> {
&self.os_type
}
pub fn tier(mut self, input: crate::types::Tier) -> Self {
self.tier = ::std::option::Option::Some(input);
self
}
pub fn set_tier(mut self, input: ::std::option::Option<crate::types::Tier>) -> Self {
self.tier = input;
self
}
pub fn get_tier(&self) -> &::std::option::Option<crate::types::Tier> {
&self.tier
}
pub fn monitor(mut self, input: bool) -> Self {
self.monitor = ::std::option::Option::Some(input);
self
}
pub fn set_monitor(mut self, input: ::std::option::Option<bool>) -> Self {
self.monitor = input;
self
}
pub fn get_monitor(&self) -> &::std::option::Option<bool> {
&self.monitor
}
pub fn detected_workload(mut self, k: crate::types::Tier, v: ::std::collections::HashMap<::std::string::String, ::std::string::String>) -> Self {
let mut hash_map = self.detected_workload.unwrap_or_default();
hash_map.insert(k, v);
self.detected_workload = ::std::option::Option::Some(hash_map);
self
}
pub fn set_detected_workload(
mut self,
input: ::std::option::Option<
::std::collections::HashMap<crate::types::Tier, ::std::collections::HashMap<::std::string::String, ::std::string::String>>,
>,
) -> Self {
self.detected_workload = input;
self
}
pub fn get_detected_workload(
&self,
) -> &::std::option::Option<
::std::collections::HashMap<crate::types::Tier, ::std::collections::HashMap<::std::string::String, ::std::string::String>>,
> {
&self.detected_workload
}
pub fn build(self) -> crate::types::ApplicationComponent {
crate::types::ApplicationComponent {
component_name: self.component_name,
component_remarks: self.component_remarks,
resource_type: self.resource_type,
os_type: self.os_type,
tier: self.tier,
monitor: self.monitor,
detected_workload: self.detected_workload,
}
}
}