Skip to main content

aws_sdk_appmonetization/operation/create_app/
_create_app_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// Output for CreateApp.
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateAppOutput {
7    /// The created app, carrying its service-assigned appId and initial status. On an idempotent replay with the same clientToken, this is the app the original call created.
8    pub app: ::std::option::Option<crate::types::App>,
9    _request_id: Option<String>,
10}
11impl CreateAppOutput {
12    /// The created app, carrying its service-assigned appId and initial status. On an idempotent replay with the same clientToken, this is the app the original call created.
13    pub fn app(&self) -> ::std::option::Option<&crate::types::App> {
14        self.app.as_ref()
15    }
16}
17impl ::aws_types::request_id::RequestId for CreateAppOutput {
18    fn request_id(&self) -> Option<&str> {
19        self._request_id.as_deref()
20    }
21}
22impl CreateAppOutput {
23    /// Creates a new builder-style object to manufacture [`CreateAppOutput`](crate::operation::create_app::CreateAppOutput).
24    pub fn builder() -> crate::operation::create_app::builders::CreateAppOutputBuilder {
25        crate::operation::create_app::builders::CreateAppOutputBuilder::default()
26    }
27}
28
29/// A builder for [`CreateAppOutput`](crate::operation::create_app::CreateAppOutput).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct CreateAppOutputBuilder {
33    pub(crate) app: ::std::option::Option<crate::types::App>,
34    _request_id: Option<String>,
35}
36impl CreateAppOutputBuilder {
37    /// The created app, carrying its service-assigned appId and initial status. On an idempotent replay with the same clientToken, this is the app the original call created.
38    /// This field is required.
39    pub fn app(mut self, input: crate::types::App) -> Self {
40        self.app = ::std::option::Option::Some(input);
41        self
42    }
43    /// The created app, carrying its service-assigned appId and initial status. On an idempotent replay with the same clientToken, this is the app the original call created.
44    pub fn set_app(mut self, input: ::std::option::Option<crate::types::App>) -> Self {
45        self.app = input;
46        self
47    }
48    /// The created app, carrying its service-assigned appId and initial status. On an idempotent replay with the same clientToken, this is the app the original call created.
49    pub fn get_app(&self) -> &::std::option::Option<crate::types::App> {
50        &self.app
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 [`CreateAppOutput`](crate::operation::create_app::CreateAppOutput).
62    pub fn build(self) -> crate::operation::create_app::CreateAppOutput {
63        crate::operation::create_app::CreateAppOutput {
64            app: self.app,
65            _request_id: self._request_id,
66        }
67    }
68}