aws_sdk_resiliencehub/operation/delete_app/_delete_app_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 DeleteAppOutput {
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 _request_id: Option<String>,
9}
10impl DeleteAppOutput {
11 /// <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>
12 pub fn app_arn(&self) -> &str {
13 use std::ops::Deref;
14 self.app_arn.deref()
15 }
16}
17impl ::aws_types::request_id::RequestId for DeleteAppOutput {
18 fn request_id(&self) -> Option<&str> {
19 self._request_id.as_deref()
20 }
21}
22impl DeleteAppOutput {
23 /// Creates a new builder-style object to manufacture [`DeleteAppOutput`](crate::operation::delete_app::DeleteAppOutput).
24 pub fn builder() -> crate::operation::delete_app::builders::DeleteAppOutputBuilder {
25 crate::operation::delete_app::builders::DeleteAppOutputBuilder::default()
26 }
27}
28
29/// A builder for [`DeleteAppOutput`](crate::operation::delete_app::DeleteAppOutput).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct DeleteAppOutputBuilder {
33 pub(crate) app_arn: ::std::option::Option<::std::string::String>,
34 _request_id: Option<String>,
35}
36impl DeleteAppOutputBuilder {
37 /// <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>
38 /// This field is required.
39 pub fn app_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
40 self.app_arn = ::std::option::Option::Some(input.into());
41 self
42 }
43 /// <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>
44 pub fn set_app_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
45 self.app_arn = input;
46 self
47 }
48 /// <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>
49 pub fn get_app_arn(&self) -> &::std::option::Option<::std::string::String> {
50 &self.app_arn
51 }
52 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
53 self._request_id = Some(request_id.into());
54 self
55 }
56
57 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
58 self._request_id = request_id;
59 self
60 }
61 /// Consumes the builder and constructs a [`DeleteAppOutput`](crate::operation::delete_app::DeleteAppOutput).
62 /// This method will fail if any of the following fields are not set:
63 /// - [`app_arn`](crate::operation::delete_app::builders::DeleteAppOutputBuilder::app_arn)
64 pub fn build(self) -> ::std::result::Result<crate::operation::delete_app::DeleteAppOutput, ::aws_smithy_types::error::operation::BuildError> {
65 ::std::result::Result::Ok(crate::operation::delete_app::DeleteAppOutput {
66 app_arn: self.app_arn.ok_or_else(|| {
67 ::aws_smithy_types::error::operation::BuildError::missing_field(
68 "app_arn",
69 "app_arn was not specified but it is required when building DeleteAppOutput",
70 )
71 })?,
72 _request_id: self._request_id,
73 })
74 }
75}