aws_sdk_iot/operation/list_things_in_thing_group/
_list_things_in_thing_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 ListThingsInThingGroupInput {
6    /// <p>The thing group name.</p>
7    pub thing_group_name: ::std::option::Option<::std::string::String>,
8    /// <p>When true, list things in this thing group and in all child groups as well.</p>
9    pub recursive: ::std::option::Option<bool>,
10    /// <p>To retrieve the next set of results, the <code>nextToken</code> value from a previous response; otherwise <b>null</b> to receive the first set of results.</p>
11    pub next_token: ::std::option::Option<::std::string::String>,
12    /// <p>The maximum number of results to return at one time.</p>
13    pub max_results: ::std::option::Option<i32>,
14}
15impl ListThingsInThingGroupInput {
16    /// <p>The thing group name.</p>
17    pub fn thing_group_name(&self) -> ::std::option::Option<&str> {
18        self.thing_group_name.as_deref()
19    }
20    /// <p>When true, list things in this thing group and in all child groups as well.</p>
21    pub fn recursive(&self) -> ::std::option::Option<bool> {
22        self.recursive
23    }
24    /// <p>To retrieve the next set of results, the <code>nextToken</code> value from a previous response; otherwise <b>null</b> to receive the first set of results.</p>
25    pub fn next_token(&self) -> ::std::option::Option<&str> {
26        self.next_token.as_deref()
27    }
28    /// <p>The maximum number of results to return at one time.</p>
29    pub fn max_results(&self) -> ::std::option::Option<i32> {
30        self.max_results
31    }
32}
33impl ListThingsInThingGroupInput {
34    /// Creates a new builder-style object to manufacture [`ListThingsInThingGroupInput`](crate::operation::list_things_in_thing_group::ListThingsInThingGroupInput).
35    pub fn builder() -> crate::operation::list_things_in_thing_group::builders::ListThingsInThingGroupInputBuilder {
36        crate::operation::list_things_in_thing_group::builders::ListThingsInThingGroupInputBuilder::default()
37    }
38}
39
40/// A builder for [`ListThingsInThingGroupInput`](crate::operation::list_things_in_thing_group::ListThingsInThingGroupInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct ListThingsInThingGroupInputBuilder {
44    pub(crate) thing_group_name: ::std::option::Option<::std::string::String>,
45    pub(crate) recursive: ::std::option::Option<bool>,
46    pub(crate) next_token: ::std::option::Option<::std::string::String>,
47    pub(crate) max_results: ::std::option::Option<i32>,
48}
49impl ListThingsInThingGroupInputBuilder {
50    /// <p>The thing group name.</p>
51    /// This field is required.
52    pub fn thing_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.thing_group_name = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The thing group name.</p>
57    pub fn set_thing_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.thing_group_name = input;
59        self
60    }
61    /// <p>The thing group name.</p>
62    pub fn get_thing_group_name(&self) -> &::std::option::Option<::std::string::String> {
63        &self.thing_group_name
64    }
65    /// <p>When true, list things in this thing group and in all child groups as well.</p>
66    pub fn recursive(mut self, input: bool) -> Self {
67        self.recursive = ::std::option::Option::Some(input);
68        self
69    }
70    /// <p>When true, list things in this thing group and in all child groups as well.</p>
71    pub fn set_recursive(mut self, input: ::std::option::Option<bool>) -> Self {
72        self.recursive = input;
73        self
74    }
75    /// <p>When true, list things in this thing group and in all child groups as well.</p>
76    pub fn get_recursive(&self) -> &::std::option::Option<bool> {
77        &self.recursive
78    }
79    /// <p>To retrieve the next set of results, the <code>nextToken</code> value from a previous response; otherwise <b>null</b> to receive the first set of results.</p>
80    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81        self.next_token = ::std::option::Option::Some(input.into());
82        self
83    }
84    /// <p>To retrieve the next set of results, the <code>nextToken</code> value from a previous response; otherwise <b>null</b> to receive the first set of results.</p>
85    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86        self.next_token = input;
87        self
88    }
89    /// <p>To retrieve the next set of results, the <code>nextToken</code> value from a previous response; otherwise <b>null</b> to receive the first set of results.</p>
90    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
91        &self.next_token
92    }
93    /// <p>The maximum number of results to return at one time.</p>
94    pub fn max_results(mut self, input: i32) -> Self {
95        self.max_results = ::std::option::Option::Some(input);
96        self
97    }
98    /// <p>The maximum number of results to return at one time.</p>
99    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
100        self.max_results = input;
101        self
102    }
103    /// <p>The maximum number of results to return at one time.</p>
104    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
105        &self.max_results
106    }
107    /// Consumes the builder and constructs a [`ListThingsInThingGroupInput`](crate::operation::list_things_in_thing_group::ListThingsInThingGroupInput).
108    pub fn build(
109        self,
110    ) -> ::std::result::Result<
111        crate::operation::list_things_in_thing_group::ListThingsInThingGroupInput,
112        ::aws_smithy_types::error::operation::BuildError,
113    > {
114        ::std::result::Result::Ok(crate::operation::list_things_in_thing_group::ListThingsInThingGroupInput {
115            thing_group_name: self.thing_group_name,
116            recursive: self.recursive,
117            next_token: self.next_token,
118            max_results: self.max_results,
119        })
120    }
121}