aws_sdk_resiliencehub/operation/describe_app_version_app_component/_describe_app_version_app_component_output.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeAppVersionAppComponentOutput {
6 /// <p>Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:<code>partition</code>:resiliencehub:<code>region</code>:<code>account</code>:app/<code>app-id</code>. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html"> Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i> guide.</p>
7 pub app_arn: ::std::string::String,
8 /// <p>Resilience Hub application version.</p>
9 pub app_version: ::std::string::String,
10 /// <p>List of Application Components that belong to this resource.</p>
11 pub app_component: ::std::option::Option<crate::types::AppComponent>,
12 _request_id: Option<String>,
13}
14impl DescribeAppVersionAppComponentOutput {
15 /// <p>Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:<code>partition</code>:resiliencehub:<code>region</code>:<code>account</code>:app/<code>app-id</code>. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html"> Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i> guide.</p>
16 pub fn app_arn(&self) -> &str {
17 use std::ops::Deref;
18 self.app_arn.deref()
19 }
20 /// <p>Resilience Hub application version.</p>
21 pub fn app_version(&self) -> &str {
22 use std::ops::Deref;
23 self.app_version.deref()
24 }
25 /// <p>List of Application Components that belong to this resource.</p>
26 pub fn app_component(&self) -> ::std::option::Option<&crate::types::AppComponent> {
27 self.app_component.as_ref()
28 }
29}
30impl ::aws_types::request_id::RequestId for DescribeAppVersionAppComponentOutput {
31 fn request_id(&self) -> Option<&str> {
32 self._request_id.as_deref()
33 }
34}
35impl DescribeAppVersionAppComponentOutput {
36 /// Creates a new builder-style object to manufacture [`DescribeAppVersionAppComponentOutput`](crate::operation::describe_app_version_app_component::DescribeAppVersionAppComponentOutput).
37 pub fn builder() -> crate::operation::describe_app_version_app_component::builders::DescribeAppVersionAppComponentOutputBuilder {
38 crate::operation::describe_app_version_app_component::builders::DescribeAppVersionAppComponentOutputBuilder::default()
39 }
40}
41
42/// A builder for [`DescribeAppVersionAppComponentOutput`](crate::operation::describe_app_version_app_component::DescribeAppVersionAppComponentOutput).
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct DescribeAppVersionAppComponentOutputBuilder {
46 pub(crate) app_arn: ::std::option::Option<::std::string::String>,
47 pub(crate) app_version: ::std::option::Option<::std::string::String>,
48 pub(crate) app_component: ::std::option::Option<crate::types::AppComponent>,
49 _request_id: Option<String>,
50}
51impl DescribeAppVersionAppComponentOutputBuilder {
52 /// <p>Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:<code>partition</code>:resiliencehub:<code>region</code>:<code>account</code>:app/<code>app-id</code>. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html"> Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i> guide.</p>
53 /// This field is required.
54 pub fn app_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55 self.app_arn = ::std::option::Option::Some(input.into());
56 self
57 }
58 /// <p>Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:<code>partition</code>:resiliencehub:<code>region</code>:<code>account</code>:app/<code>app-id</code>. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html"> Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i> guide.</p>
59 pub fn set_app_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60 self.app_arn = input;
61 self
62 }
63 /// <p>Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:<code>partition</code>:resiliencehub:<code>region</code>:<code>account</code>:app/<code>app-id</code>. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html"> Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i> guide.</p>
64 pub fn get_app_arn(&self) -> &::std::option::Option<::std::string::String> {
65 &self.app_arn
66 }
67 /// <p>Resilience Hub application version.</p>
68 /// This field is required.
69 pub fn app_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
70 self.app_version = ::std::option::Option::Some(input.into());
71 self
72 }
73 /// <p>Resilience Hub application version.</p>
74 pub fn set_app_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
75 self.app_version = input;
76 self
77 }
78 /// <p>Resilience Hub application version.</p>
79 pub fn get_app_version(&self) -> &::std::option::Option<::std::string::String> {
80 &self.app_version
81 }
82 /// <p>List of Application Components that belong to this resource.</p>
83 pub fn app_component(mut self, input: crate::types::AppComponent) -> Self {
84 self.app_component = ::std::option::Option::Some(input);
85 self
86 }
87 /// <p>List of Application Components that belong to this resource.</p>
88 pub fn set_app_component(mut self, input: ::std::option::Option<crate::types::AppComponent>) -> Self {
89 self.app_component = input;
90 self
91 }
92 /// <p>List of Application Components that belong to this resource.</p>
93 pub fn get_app_component(&self) -> &::std::option::Option<crate::types::AppComponent> {
94 &self.app_component
95 }
96 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
97 self._request_id = Some(request_id.into());
98 self
99 }
100
101 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
102 self._request_id = request_id;
103 self
104 }
105 /// Consumes the builder and constructs a [`DescribeAppVersionAppComponentOutput`](crate::operation::describe_app_version_app_component::DescribeAppVersionAppComponentOutput).
106 /// This method will fail if any of the following fields are not set:
107 /// - [`app_arn`](crate::operation::describe_app_version_app_component::builders::DescribeAppVersionAppComponentOutputBuilder::app_arn)
108 /// - [`app_version`](crate::operation::describe_app_version_app_component::builders::DescribeAppVersionAppComponentOutputBuilder::app_version)
109 pub fn build(
110 self,
111 ) -> ::std::result::Result<
112 crate::operation::describe_app_version_app_component::DescribeAppVersionAppComponentOutput,
113 ::aws_smithy_types::error::operation::BuildError,
114 > {
115 ::std::result::Result::Ok(
116 crate::operation::describe_app_version_app_component::DescribeAppVersionAppComponentOutput {
117 app_arn: self.app_arn.ok_or_else(|| {
118 ::aws_smithy_types::error::operation::BuildError::missing_field(
119 "app_arn",
120 "app_arn was not specified but it is required when building DescribeAppVersionAppComponentOutput",
121 )
122 })?,
123 app_version: self.app_version.ok_or_else(|| {
124 ::aws_smithy_types::error::operation::BuildError::missing_field(
125 "app_version",
126 "app_version was not specified but it is required when building DescribeAppVersionAppComponentOutput",
127 )
128 })?,
129 app_component: self.app_component,
130 _request_id: self._request_id,
131 },
132 )
133 }
134}