aws_sdk_applicationinsights/operation/describe_component/
_describe_component_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeComponentOutput {
6 pub application_component: ::std::option::Option<crate::types::ApplicationComponent>,
8 pub resource_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
10 _request_id: Option<String>,
11}
12impl DescribeComponentOutput {
13 pub fn application_component(&self) -> ::std::option::Option<&crate::types::ApplicationComponent> {
15 self.application_component.as_ref()
16 }
17 pub fn resource_list(&self) -> &[::std::string::String] {
21 self.resource_list.as_deref().unwrap_or_default()
22 }
23}
24impl ::aws_types::request_id::RequestId for DescribeComponentOutput {
25 fn request_id(&self) -> Option<&str> {
26 self._request_id.as_deref()
27 }
28}
29impl DescribeComponentOutput {
30 pub fn builder() -> crate::operation::describe_component::builders::DescribeComponentOutputBuilder {
32 crate::operation::describe_component::builders::DescribeComponentOutputBuilder::default()
33 }
34}
35
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct DescribeComponentOutputBuilder {
40 pub(crate) application_component: ::std::option::Option<crate::types::ApplicationComponent>,
41 pub(crate) resource_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
42 _request_id: Option<String>,
43}
44impl DescribeComponentOutputBuilder {
45 pub fn application_component(mut self, input: crate::types::ApplicationComponent) -> Self {
47 self.application_component = ::std::option::Option::Some(input);
48 self
49 }
50 pub fn set_application_component(mut self, input: ::std::option::Option<crate::types::ApplicationComponent>) -> Self {
52 self.application_component = input;
53 self
54 }
55 pub fn get_application_component(&self) -> &::std::option::Option<crate::types::ApplicationComponent> {
57 &self.application_component
58 }
59 pub fn resource_list(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
65 let mut v = self.resource_list.unwrap_or_default();
66 v.push(input.into());
67 self.resource_list = ::std::option::Option::Some(v);
68 self
69 }
70 pub fn set_resource_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
72 self.resource_list = input;
73 self
74 }
75 pub fn get_resource_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
77 &self.resource_list
78 }
79 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
80 self._request_id = Some(request_id.into());
81 self
82 }
83
84 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
85 self._request_id = request_id;
86 self
87 }
88 pub fn build(self) -> crate::operation::describe_component::DescribeComponentOutput {
90 crate::operation::describe_component::DescribeComponentOutput {
91 application_component: self.application_component,
92 resource_list: self.resource_list,
93 _request_id: self._request_id,
94 }
95 }
96}