Skip to main content

aws_sdk_quicksight/types/
_group.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>A <i>group</i> in Quick Sight consists of a set of users. You can use groups to make it easier to manage access and security.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct Group {
7    /// <p>The Amazon Resource Name (ARN) for the group.</p>
8    pub arn: ::std::option::Option<::std::string::String>,
9    /// <p>The name of the group.</p>
10    pub group_name: ::std::option::Option<::std::string::String>,
11    /// <p>The group description.</p>
12    pub description: ::std::option::Option<::std::string::String>,
13    /// <p>The principal ID of the group.</p>
14    pub principal_id: ::std::option::Option<::std::string::String>,
15}
16impl Group {
17    /// <p>The Amazon Resource Name (ARN) for the group.</p>
18    pub fn arn(&self) -> ::std::option::Option<&str> {
19        self.arn.as_deref()
20    }
21    /// <p>The name of the group.</p>
22    pub fn group_name(&self) -> ::std::option::Option<&str> {
23        self.group_name.as_deref()
24    }
25    /// <p>The group description.</p>
26    pub fn description(&self) -> ::std::option::Option<&str> {
27        self.description.as_deref()
28    }
29    /// <p>The principal ID of the group.</p>
30    pub fn principal_id(&self) -> ::std::option::Option<&str> {
31        self.principal_id.as_deref()
32    }
33}
34impl Group {
35    /// Creates a new builder-style object to manufacture [`Group`](crate::types::Group).
36    pub fn builder() -> crate::types::builders::GroupBuilder {
37        crate::types::builders::GroupBuilder::default()
38    }
39}
40
41/// A builder for [`Group`](crate::types::Group).
42#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct GroupBuilder {
45    pub(crate) arn: ::std::option::Option<::std::string::String>,
46    pub(crate) group_name: ::std::option::Option<::std::string::String>,
47    pub(crate) description: ::std::option::Option<::std::string::String>,
48    pub(crate) principal_id: ::std::option::Option<::std::string::String>,
49}
50impl GroupBuilder {
51    /// <p>The Amazon Resource Name (ARN) for the group.</p>
52    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.arn = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The Amazon Resource Name (ARN) for the group.</p>
57    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.arn = input;
59        self
60    }
61    /// <p>The Amazon Resource Name (ARN) for the group.</p>
62    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
63        &self.arn
64    }
65    /// <p>The name of the group.</p>
66    pub fn group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.group_name = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The name of the group.</p>
71    pub fn set_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.group_name = input;
73        self
74    }
75    /// <p>The name of the group.</p>
76    pub fn get_group_name(&self) -> &::std::option::Option<::std::string::String> {
77        &self.group_name
78    }
79    /// <p>The group description.</p>
80    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81        self.description = ::std::option::Option::Some(input.into());
82        self
83    }
84    /// <p>The group description.</p>
85    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86        self.description = input;
87        self
88    }
89    /// <p>The group description.</p>
90    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
91        &self.description
92    }
93    /// <p>The principal ID of the group.</p>
94    pub fn principal_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95        self.principal_id = ::std::option::Option::Some(input.into());
96        self
97    }
98    /// <p>The principal ID of the group.</p>
99    pub fn set_principal_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100        self.principal_id = input;
101        self
102    }
103    /// <p>The principal ID of the group.</p>
104    pub fn get_principal_id(&self) -> &::std::option::Option<::std::string::String> {
105        &self.principal_id
106    }
107    /// Consumes the builder and constructs a [`Group`](crate::types::Group).
108    pub fn build(self) -> crate::types::Group {
109        crate::types::Group {
110            arn: self.arn,
111            group_name: self.group_name,
112            description: self.description,
113            principal_id: self.principal_id,
114        }
115    }
116}