aws_sdk_quicksight/operation/create_namespace/
_create_namespace_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 CreateNamespaceInput {
6    /// <p>The ID for the Amazon Web Services account that you want to create the Amazon QuickSight namespace in.</p>
7    pub aws_account_id: ::std::option::Option<::std::string::String>,
8    /// <p>The name that you want to use to describe the new namespace.</p>
9    pub namespace: ::std::option::Option<::std::string::String>,
10    /// <p>Specifies the type of your user identity directory. Currently, this supports users with an identity type of <code>QUICKSIGHT</code>.</p>
11    pub identity_store: ::std::option::Option<crate::types::IdentityStore>,
12    /// <p>The tags that you want to associate with the namespace that you're creating.</p>
13    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
14}
15impl CreateNamespaceInput {
16    /// <p>The ID for the Amazon Web Services account that you want to create the Amazon QuickSight namespace in.</p>
17    pub fn aws_account_id(&self) -> ::std::option::Option<&str> {
18        self.aws_account_id.as_deref()
19    }
20    /// <p>The name that you want to use to describe the new namespace.</p>
21    pub fn namespace(&self) -> ::std::option::Option<&str> {
22        self.namespace.as_deref()
23    }
24    /// <p>Specifies the type of your user identity directory. Currently, this supports users with an identity type of <code>QUICKSIGHT</code>.</p>
25    pub fn identity_store(&self) -> ::std::option::Option<&crate::types::IdentityStore> {
26        self.identity_store.as_ref()
27    }
28    /// <p>The tags that you want to associate with the namespace that you're creating.</p>
29    ///
30    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
31    pub fn tags(&self) -> &[crate::types::Tag] {
32        self.tags.as_deref().unwrap_or_default()
33    }
34}
35impl CreateNamespaceInput {
36    /// Creates a new builder-style object to manufacture [`CreateNamespaceInput`](crate::operation::create_namespace::CreateNamespaceInput).
37    pub fn builder() -> crate::operation::create_namespace::builders::CreateNamespaceInputBuilder {
38        crate::operation::create_namespace::builders::CreateNamespaceInputBuilder::default()
39    }
40}
41
42/// A builder for [`CreateNamespaceInput`](crate::operation::create_namespace::CreateNamespaceInput).
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct CreateNamespaceInputBuilder {
46    pub(crate) aws_account_id: ::std::option::Option<::std::string::String>,
47    pub(crate) namespace: ::std::option::Option<::std::string::String>,
48    pub(crate) identity_store: ::std::option::Option<crate::types::IdentityStore>,
49    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
50}
51impl CreateNamespaceInputBuilder {
52    /// <p>The ID for the Amazon Web Services account that you want to create the Amazon QuickSight namespace in.</p>
53    /// This field is required.
54    pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55        self.aws_account_id = ::std::option::Option::Some(input.into());
56        self
57    }
58    /// <p>The ID for the Amazon Web Services account that you want to create the Amazon QuickSight namespace in.</p>
59    pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60        self.aws_account_id = input;
61        self
62    }
63    /// <p>The ID for the Amazon Web Services account that you want to create the Amazon QuickSight namespace in.</p>
64    pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
65        &self.aws_account_id
66    }
67    /// <p>The name that you want to use to describe the new namespace.</p>
68    /// This field is required.
69    pub fn namespace(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
70        self.namespace = ::std::option::Option::Some(input.into());
71        self
72    }
73    /// <p>The name that you want to use to describe the new namespace.</p>
74    pub fn set_namespace(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
75        self.namespace = input;
76        self
77    }
78    /// <p>The name that you want to use to describe the new namespace.</p>
79    pub fn get_namespace(&self) -> &::std::option::Option<::std::string::String> {
80        &self.namespace
81    }
82    /// <p>Specifies the type of your user identity directory. Currently, this supports users with an identity type of <code>QUICKSIGHT</code>.</p>
83    /// This field is required.
84    pub fn identity_store(mut self, input: crate::types::IdentityStore) -> Self {
85        self.identity_store = ::std::option::Option::Some(input);
86        self
87    }
88    /// <p>Specifies the type of your user identity directory. Currently, this supports users with an identity type of <code>QUICKSIGHT</code>.</p>
89    pub fn set_identity_store(mut self, input: ::std::option::Option<crate::types::IdentityStore>) -> Self {
90        self.identity_store = input;
91        self
92    }
93    /// <p>Specifies the type of your user identity directory. Currently, this supports users with an identity type of <code>QUICKSIGHT</code>.</p>
94    pub fn get_identity_store(&self) -> &::std::option::Option<crate::types::IdentityStore> {
95        &self.identity_store
96    }
97    /// Appends an item to `tags`.
98    ///
99    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
100    ///
101    /// <p>The tags that you want to associate with the namespace that you're creating.</p>
102    pub fn tags(mut self, input: crate::types::Tag) -> Self {
103        let mut v = self.tags.unwrap_or_default();
104        v.push(input);
105        self.tags = ::std::option::Option::Some(v);
106        self
107    }
108    /// <p>The tags that you want to associate with the namespace that you're creating.</p>
109    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
110        self.tags = input;
111        self
112    }
113    /// <p>The tags that you want to associate with the namespace that you're creating.</p>
114    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
115        &self.tags
116    }
117    /// Consumes the builder and constructs a [`CreateNamespaceInput`](crate::operation::create_namespace::CreateNamespaceInput).
118    pub fn build(
119        self,
120    ) -> ::std::result::Result<crate::operation::create_namespace::CreateNamespaceInput, ::aws_smithy_types::error::operation::BuildError> {
121        ::std::result::Result::Ok(crate::operation::create_namespace::CreateNamespaceInput {
122            aws_account_id: self.aws_account_id,
123            namespace: self.namespace,
124            identity_store: self.identity_store,
125            tags: self.tags,
126        })
127    }
128}