aws_sdk_applicationinsights/types/
_application_component.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ApplicationComponent {
7 pub component_name: ::std::option::Option<::std::string::String>,
9 pub component_remarks: ::std::option::Option<::std::string::String>,
11 pub resource_type: ::std::option::Option<::std::string::String>,
13 pub os_type: ::std::option::Option<crate::types::OsType>,
15 pub tier: ::std::option::Option<crate::types::Tier>,
17 pub monitor: ::std::option::Option<bool>,
19 pub detected_workload: ::std::option::Option<
21 ::std::collections::HashMap<crate::types::Tier, ::std::collections::HashMap<::std::string::String, ::std::string::String>>,
22 >,
23}
24impl ApplicationComponent {
25 pub fn component_name(&self) -> ::std::option::Option<&str> {
27 self.component_name.as_deref()
28 }
29 pub fn component_remarks(&self) -> ::std::option::Option<&str> {
31 self.component_remarks.as_deref()
32 }
33 pub fn resource_type(&self) -> ::std::option::Option<&str> {
35 self.resource_type.as_deref()
36 }
37 pub fn os_type(&self) -> ::std::option::Option<&crate::types::OsType> {
39 self.os_type.as_ref()
40 }
41 pub fn tier(&self) -> ::std::option::Option<&crate::types::Tier> {
43 self.tier.as_ref()
44 }
45 pub fn monitor(&self) -> ::std::option::Option<bool> {
47 self.monitor
48 }
49 pub fn detected_workload(
51 &self,
52 ) -> ::std::option::Option<
53 &::std::collections::HashMap<crate::types::Tier, ::std::collections::HashMap<::std::string::String, ::std::string::String>>,
54 > {
55 self.detected_workload.as_ref()
56 }
57}
58impl ApplicationComponent {
59 pub fn builder() -> crate::types::builders::ApplicationComponentBuilder {
61 crate::types::builders::ApplicationComponentBuilder::default()
62 }
63}
64
65#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
67#[non_exhaustive]
68pub struct ApplicationComponentBuilder {
69 pub(crate) component_name: ::std::option::Option<::std::string::String>,
70 pub(crate) component_remarks: ::std::option::Option<::std::string::String>,
71 pub(crate) resource_type: ::std::option::Option<::std::string::String>,
72 pub(crate) os_type: ::std::option::Option<crate::types::OsType>,
73 pub(crate) tier: ::std::option::Option<crate::types::Tier>,
74 pub(crate) monitor: ::std::option::Option<bool>,
75 pub(crate) detected_workload: ::std::option::Option<
76 ::std::collections::HashMap<crate::types::Tier, ::std::collections::HashMap<::std::string::String, ::std::string::String>>,
77 >,
78}
79impl ApplicationComponentBuilder {
80 pub fn component_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82 self.component_name = ::std::option::Option::Some(input.into());
83 self
84 }
85 pub fn set_component_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87 self.component_name = input;
88 self
89 }
90 pub fn get_component_name(&self) -> &::std::option::Option<::std::string::String> {
92 &self.component_name
93 }
94 pub fn component_remarks(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96 self.component_remarks = ::std::option::Option::Some(input.into());
97 self
98 }
99 pub fn set_component_remarks(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101 self.component_remarks = input;
102 self
103 }
104 pub fn get_component_remarks(&self) -> &::std::option::Option<::std::string::String> {
106 &self.component_remarks
107 }
108 pub fn resource_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
110 self.resource_type = ::std::option::Option::Some(input.into());
111 self
112 }
113 pub fn set_resource_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
115 self.resource_type = input;
116 self
117 }
118 pub fn get_resource_type(&self) -> &::std::option::Option<::std::string::String> {
120 &self.resource_type
121 }
122 pub fn os_type(mut self, input: crate::types::OsType) -> Self {
124 self.os_type = ::std::option::Option::Some(input);
125 self
126 }
127 pub fn set_os_type(mut self, input: ::std::option::Option<crate::types::OsType>) -> Self {
129 self.os_type = input;
130 self
131 }
132 pub fn get_os_type(&self) -> &::std::option::Option<crate::types::OsType> {
134 &self.os_type
135 }
136 pub fn tier(mut self, input: crate::types::Tier) -> Self {
138 self.tier = ::std::option::Option::Some(input);
139 self
140 }
141 pub fn set_tier(mut self, input: ::std::option::Option<crate::types::Tier>) -> Self {
143 self.tier = input;
144 self
145 }
146 pub fn get_tier(&self) -> &::std::option::Option<crate::types::Tier> {
148 &self.tier
149 }
150 pub fn monitor(mut self, input: bool) -> Self {
152 self.monitor = ::std::option::Option::Some(input);
153 self
154 }
155 pub fn set_monitor(mut self, input: ::std::option::Option<bool>) -> Self {
157 self.monitor = input;
158 self
159 }
160 pub fn get_monitor(&self) -> &::std::option::Option<bool> {
162 &self.monitor
163 }
164 pub fn detected_workload(mut self, k: crate::types::Tier, v: ::std::collections::HashMap<::std::string::String, ::std::string::String>) -> Self {
170 let mut hash_map = self.detected_workload.unwrap_or_default();
171 hash_map.insert(k, v);
172 self.detected_workload = ::std::option::Option::Some(hash_map);
173 self
174 }
175 pub fn set_detected_workload(
177 mut self,
178 input: ::std::option::Option<
179 ::std::collections::HashMap<crate::types::Tier, ::std::collections::HashMap<::std::string::String, ::std::string::String>>,
180 >,
181 ) -> Self {
182 self.detected_workload = input;
183 self
184 }
185 pub fn get_detected_workload(
187 &self,
188 ) -> &::std::option::Option<
189 ::std::collections::HashMap<crate::types::Tier, ::std::collections::HashMap<::std::string::String, ::std::string::String>>,
190 > {
191 &self.detected_workload
192 }
193 pub fn build(self) -> crate::types::ApplicationComponent {
195 crate::types::ApplicationComponent {
196 component_name: self.component_name,
197 component_remarks: self.component_remarks,
198 resource_type: self.resource_type,
199 os_type: self.os_type,
200 tier: self.tier,
201 monitor: self.monitor,
202 detected_workload: self.detected_workload,
203 }
204 }
205}