aws_sdk_resiliencehub/operation/create_app/
_create_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 CreateAppOutput {
6    /// <p>The created application returned as an object with details including compliance status, creation time, description, resiliency score, and more.</p>
7    pub app: ::std::option::Option<crate::types::App>,
8    _request_id: Option<String>,
9}
10impl CreateAppOutput {
11    /// <p>The created application returned as an object with details including compliance status, creation time, description, resiliency score, and more.</p>
12    pub fn app(&self) -> ::std::option::Option<&crate::types::App> {
13        self.app.as_ref()
14    }
15}
16impl ::aws_types::request_id::RequestId for CreateAppOutput {
17    fn request_id(&self) -> Option<&str> {
18        self._request_id.as_deref()
19    }
20}
21impl CreateAppOutput {
22    /// Creates a new builder-style object to manufacture [`CreateAppOutput`](crate::operation::create_app::CreateAppOutput).
23    pub fn builder() -> crate::operation::create_app::builders::CreateAppOutputBuilder {
24        crate::operation::create_app::builders::CreateAppOutputBuilder::default()
25    }
26}
27
28/// A builder for [`CreateAppOutput`](crate::operation::create_app::CreateAppOutput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct CreateAppOutputBuilder {
32    pub(crate) app: ::std::option::Option<crate::types::App>,
33    _request_id: Option<String>,
34}
35impl CreateAppOutputBuilder {
36    /// <p>The created application returned as an object with details including compliance status, creation time, description, resiliency score, and more.</p>
37    /// This field is required.
38    pub fn app(mut self, input: crate::types::App) -> Self {
39        self.app = ::std::option::Option::Some(input);
40        self
41    }
42    /// <p>The created application returned as an object with details including compliance status, creation time, description, resiliency score, and more.</p>
43    pub fn set_app(mut self, input: ::std::option::Option<crate::types::App>) -> Self {
44        self.app = input;
45        self
46    }
47    /// <p>The created application returned as an object with details including compliance status, creation time, description, resiliency score, and more.</p>
48    pub fn get_app(&self) -> &::std::option::Option<crate::types::App> {
49        &self.app
50    }
51    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
52        self._request_id = Some(request_id.into());
53        self
54    }
55
56    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
57        self._request_id = request_id;
58        self
59    }
60    /// Consumes the builder and constructs a [`CreateAppOutput`](crate::operation::create_app::CreateAppOutput).
61    pub fn build(self) -> crate::operation::create_app::CreateAppOutput {
62        crate::operation::create_app::CreateAppOutput {
63            app: self.app,
64            _request_id: self._request_id,
65        }
66    }
67}