aws_sdk_quicksight/operation/create_namespace/
_create_namespace_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateNamespaceInput {
6 pub aws_account_id: ::std::option::Option<::std::string::String>,
8 pub namespace: ::std::option::Option<::std::string::String>,
10 pub identity_store: ::std::option::Option<crate::types::IdentityStore>,
12 pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
14}
15impl CreateNamespaceInput {
16 pub fn aws_account_id(&self) -> ::std::option::Option<&str> {
18 self.aws_account_id.as_deref()
19 }
20 pub fn namespace(&self) -> ::std::option::Option<&str> {
22 self.namespace.as_deref()
23 }
24 pub fn identity_store(&self) -> ::std::option::Option<&crate::types::IdentityStore> {
26 self.identity_store.as_ref()
27 }
28 pub fn tags(&self) -> &[crate::types::Tag] {
32 self.tags.as_deref().unwrap_or_default()
33 }
34}
35impl CreateNamespaceInput {
36 pub fn builder() -> crate::operation::create_namespace::builders::CreateNamespaceInputBuilder {
38 crate::operation::create_namespace::builders::CreateNamespaceInputBuilder::default()
39 }
40}
41
42#[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 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 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 pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
65 &self.aws_account_id
66 }
67 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 pub fn set_namespace(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
75 self.namespace = input;
76 self
77 }
78 pub fn get_namespace(&self) -> &::std::option::Option<::std::string::String> {
80 &self.namespace
81 }
82 pub fn identity_store(mut self, input: crate::types::IdentityStore) -> Self {
85 self.identity_store = ::std::option::Option::Some(input);
86 self
87 }
88 pub fn set_identity_store(mut self, input: ::std::option::Option<crate::types::IdentityStore>) -> Self {
90 self.identity_store = input;
91 self
92 }
93 pub fn get_identity_store(&self) -> &::std::option::Option<crate::types::IdentityStore> {
95 &self.identity_store
96 }
97 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 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 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
115 &self.tags
116 }
117 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}