aws_sdk_pinpoint/operation/create_app/
_create_app_input.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 CreateAppInput {
6    /// <p>Specifies the display name of an application and the tags to associate with the application.</p>
7    pub create_application_request: ::std::option::Option<crate::types::CreateApplicationRequest>,
8}
9impl CreateAppInput {
10    /// <p>Specifies the display name of an application and the tags to associate with the application.</p>
11    pub fn create_application_request(&self) -> ::std::option::Option<&crate::types::CreateApplicationRequest> {
12        self.create_application_request.as_ref()
13    }
14}
15impl CreateAppInput {
16    /// Creates a new builder-style object to manufacture [`CreateAppInput`](crate::operation::create_app::CreateAppInput).
17    pub fn builder() -> crate::operation::create_app::builders::CreateAppInputBuilder {
18        crate::operation::create_app::builders::CreateAppInputBuilder::default()
19    }
20}
21
22/// A builder for [`CreateAppInput`](crate::operation::create_app::CreateAppInput).
23#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
24#[non_exhaustive]
25pub struct CreateAppInputBuilder {
26    pub(crate) create_application_request: ::std::option::Option<crate::types::CreateApplicationRequest>,
27}
28impl CreateAppInputBuilder {
29    /// <p>Specifies the display name of an application and the tags to associate with the application.</p>
30    /// This field is required.
31    pub fn create_application_request(mut self, input: crate::types::CreateApplicationRequest) -> Self {
32        self.create_application_request = ::std::option::Option::Some(input);
33        self
34    }
35    /// <p>Specifies the display name of an application and the tags to associate with the application.</p>
36    pub fn set_create_application_request(mut self, input: ::std::option::Option<crate::types::CreateApplicationRequest>) -> Self {
37        self.create_application_request = input;
38        self
39    }
40    /// <p>Specifies the display name of an application and the tags to associate with the application.</p>
41    pub fn get_create_application_request(&self) -> &::std::option::Option<crate::types::CreateApplicationRequest> {
42        &self.create_application_request
43    }
44    /// Consumes the builder and constructs a [`CreateAppInput`](crate::operation::create_app::CreateAppInput).
45    pub fn build(self) -> ::std::result::Result<crate::operation::create_app::CreateAppInput, ::aws_smithy_types::error::operation::BuildError> {
46        ::std::result::Result::Ok(crate::operation::create_app::CreateAppInput {
47            create_application_request: self.create_application_request,
48        })
49    }
50}