aws_sdk_quicksight/operation/create_group/
_create_group_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The request object for this operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateGroupInput {
7    /// <p>A name for the group that you want to create.</p>
8    pub group_name: ::std::option::Option<::std::string::String>,
9    /// <p>A description for the group that you want to create.</p>
10    pub description: ::std::option::Option<::std::string::String>,
11    /// <p>The ID for the Amazon Web Services account that the group is in. Currently, you use the ID for the Amazon Web Services account that contains your Amazon Quick Sight account.</p>
12    pub aws_account_id: ::std::option::Option<::std::string::String>,
13    /// <p>The namespace that you want the group to be a part of.</p>
14    pub namespace: ::std::option::Option<::std::string::String>,
15}
16impl CreateGroupInput {
17    /// <p>A name for the group that you want to create.</p>
18    pub fn group_name(&self) -> ::std::option::Option<&str> {
19        self.group_name.as_deref()
20    }
21    /// <p>A description for the group that you want to create.</p>
22    pub fn description(&self) -> ::std::option::Option<&str> {
23        self.description.as_deref()
24    }
25    /// <p>The ID for the Amazon Web Services account that the group is in. Currently, you use the ID for the Amazon Web Services account that contains your Amazon Quick Sight account.</p>
26    pub fn aws_account_id(&self) -> ::std::option::Option<&str> {
27        self.aws_account_id.as_deref()
28    }
29    /// <p>The namespace that you want the group to be a part of.</p>
30    pub fn namespace(&self) -> ::std::option::Option<&str> {
31        self.namespace.as_deref()
32    }
33}
34impl CreateGroupInput {
35    /// Creates a new builder-style object to manufacture [`CreateGroupInput`](crate::operation::create_group::CreateGroupInput).
36    pub fn builder() -> crate::operation::create_group::builders::CreateGroupInputBuilder {
37        crate::operation::create_group::builders::CreateGroupInputBuilder::default()
38    }
39}
40
41/// A builder for [`CreateGroupInput`](crate::operation::create_group::CreateGroupInput).
42#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct CreateGroupInputBuilder {
45    pub(crate) group_name: ::std::option::Option<::std::string::String>,
46    pub(crate) description: ::std::option::Option<::std::string::String>,
47    pub(crate) aws_account_id: ::std::option::Option<::std::string::String>,
48    pub(crate) namespace: ::std::option::Option<::std::string::String>,
49}
50impl CreateGroupInputBuilder {
51    /// <p>A name for the group that you want to create.</p>
52    /// This field is required.
53    pub fn group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54        self.group_name = ::std::option::Option::Some(input.into());
55        self
56    }
57    /// <p>A name for the group that you want to create.</p>
58    pub fn set_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.group_name = input;
60        self
61    }
62    /// <p>A name for the group that you want to create.</p>
63    pub fn get_group_name(&self) -> &::std::option::Option<::std::string::String> {
64        &self.group_name
65    }
66    /// <p>A description for the group that you want to create.</p>
67    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68        self.description = ::std::option::Option::Some(input.into());
69        self
70    }
71    /// <p>A description for the group that you want to create.</p>
72    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73        self.description = input;
74        self
75    }
76    /// <p>A description for the group that you want to create.</p>
77    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
78        &self.description
79    }
80    /// <p>The ID for the Amazon Web Services account that the group is in. Currently, you use the ID for the Amazon Web Services account that contains your Amazon Quick Sight account.</p>
81    /// This field is required.
82    pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83        self.aws_account_id = ::std::option::Option::Some(input.into());
84        self
85    }
86    /// <p>The ID for the Amazon Web Services account that the group is in. Currently, you use the ID for the Amazon Web Services account that contains your Amazon Quick Sight account.</p>
87    pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88        self.aws_account_id = input;
89        self
90    }
91    /// <p>The ID for the Amazon Web Services account that the group is in. Currently, you use the ID for the Amazon Web Services account that contains your Amazon Quick Sight account.</p>
92    pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
93        &self.aws_account_id
94    }
95    /// <p>The namespace that you want the group to be a part of.</p>
96    /// This field is required.
97    pub fn namespace(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
98        self.namespace = ::std::option::Option::Some(input.into());
99        self
100    }
101    /// <p>The namespace that you want the group to be a part of.</p>
102    pub fn set_namespace(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
103        self.namespace = input;
104        self
105    }
106    /// <p>The namespace that you want the group to be a part of.</p>
107    pub fn get_namespace(&self) -> &::std::option::Option<::std::string::String> {
108        &self.namespace
109    }
110    /// Consumes the builder and constructs a [`CreateGroupInput`](crate::operation::create_group::CreateGroupInput).
111    pub fn build(self) -> ::std::result::Result<crate::operation::create_group::CreateGroupInput, ::aws_smithy_types::error::operation::BuildError> {
112        ::std::result::Result::Ok(crate::operation::create_group::CreateGroupInput {
113            group_name: self.group_name,
114            description: self.description,
115            aws_account_id: self.aws_account_id,
116            namespace: self.namespace,
117        })
118    }
119}