aws_sdk_iam/operation/get_group/
_get_group_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 GetGroupInput {
6    /// <p>The name of the group.</p>
7    /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-</p>
8    pub group_name: ::std::option::Option<::std::string::String>,
9    /// <p>Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the <code>Marker</code> element in the response that you received to indicate where the next call should start.</p>
10    pub marker: ::std::option::Option<::std::string::String>,
11    /// <p>Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the <code>IsTruncated</code> response element is <code>true</code>.</p>
12    /// <p>If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the <code>IsTruncated</code> response element returns <code>true</code>, and <code>Marker</code> contains a value to include in the subsequent call that tells the service where to continue from.</p>
13    pub max_items: ::std::option::Option<i32>,
14}
15impl GetGroupInput {
16    /// <p>The name of the group.</p>
17    /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-</p>
18    pub fn group_name(&self) -> ::std::option::Option<&str> {
19        self.group_name.as_deref()
20    }
21    /// <p>Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the <code>Marker</code> element in the response that you received to indicate where the next call should start.</p>
22    pub fn marker(&self) -> ::std::option::Option<&str> {
23        self.marker.as_deref()
24    }
25    /// <p>Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the <code>IsTruncated</code> response element is <code>true</code>.</p>
26    /// <p>If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the <code>IsTruncated</code> response element returns <code>true</code>, and <code>Marker</code> contains a value to include in the subsequent call that tells the service where to continue from.</p>
27    pub fn max_items(&self) -> ::std::option::Option<i32> {
28        self.max_items
29    }
30}
31impl GetGroupInput {
32    /// Creates a new builder-style object to manufacture [`GetGroupInput`](crate::operation::get_group::GetGroupInput).
33    pub fn builder() -> crate::operation::get_group::builders::GetGroupInputBuilder {
34        crate::operation::get_group::builders::GetGroupInputBuilder::default()
35    }
36}
37
38/// A builder for [`GetGroupInput`](crate::operation::get_group::GetGroupInput).
39#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
40#[non_exhaustive]
41pub struct GetGroupInputBuilder {
42    pub(crate) group_name: ::std::option::Option<::std::string::String>,
43    pub(crate) marker: ::std::option::Option<::std::string::String>,
44    pub(crate) max_items: ::std::option::Option<i32>,
45}
46impl GetGroupInputBuilder {
47    /// <p>The name of the group.</p>
48    /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-</p>
49    /// This field is required.
50    pub fn group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
51        self.group_name = ::std::option::Option::Some(input.into());
52        self
53    }
54    /// <p>The name of the group.</p>
55    /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-</p>
56    pub fn set_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
57        self.group_name = input;
58        self
59    }
60    /// <p>The name of the group.</p>
61    /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-</p>
62    pub fn get_group_name(&self) -> &::std::option::Option<::std::string::String> {
63        &self.group_name
64    }
65    /// <p>Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the <code>Marker</code> element in the response that you received to indicate where the next call should start.</p>
66    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.marker = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the <code>Marker</code> element in the response that you received to indicate where the next call should start.</p>
71    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.marker = input;
73        self
74    }
75    /// <p>Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the <code>Marker</code> element in the response that you received to indicate where the next call should start.</p>
76    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
77        &self.marker
78    }
79    /// <p>Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the <code>IsTruncated</code> response element is <code>true</code>.</p>
80    /// <p>If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the <code>IsTruncated</code> response element returns <code>true</code>, and <code>Marker</code> contains a value to include in the subsequent call that tells the service where to continue from.</p>
81    pub fn max_items(mut self, input: i32) -> Self {
82        self.max_items = ::std::option::Option::Some(input);
83        self
84    }
85    /// <p>Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the <code>IsTruncated</code> response element is <code>true</code>.</p>
86    /// <p>If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the <code>IsTruncated</code> response element returns <code>true</code>, and <code>Marker</code> contains a value to include in the subsequent call that tells the service where to continue from.</p>
87    pub fn set_max_items(mut self, input: ::std::option::Option<i32>) -> Self {
88        self.max_items = input;
89        self
90    }
91    /// <p>Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the <code>IsTruncated</code> response element is <code>true</code>.</p>
92    /// <p>If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the <code>IsTruncated</code> response element returns <code>true</code>, and <code>Marker</code> contains a value to include in the subsequent call that tells the service where to continue from.</p>
93    pub fn get_max_items(&self) -> &::std::option::Option<i32> {
94        &self.max_items
95    }
96    /// Consumes the builder and constructs a [`GetGroupInput`](crate::operation::get_group::GetGroupInput).
97    pub fn build(self) -> ::std::result::Result<crate::operation::get_group::GetGroupInput, ::aws_smithy_types::error::operation::BuildError> {
98        ::std::result::Result::Ok(crate::operation::get_group::GetGroupInput {
99            group_name: self.group_name,
100            marker: self.marker,
101            max_items: self.max_items,
102        })
103    }
104}