aws_sdk_iot/operation/list_v2_logging_levels/
_list_v2_logging_levels_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 ListV2LoggingLevelsInput {
6    /// <p>The type of resource for which you are configuring logging. Must be <code>THING_Group</code>.</p>
7    pub target_type: ::std::option::Option<crate::types::LogTargetType>,
8    /// <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>
9    pub next_token: ::std::option::Option<::std::string::String>,
10    /// <p>The maximum number of results to return at one time.</p>
11    pub max_results: ::std::option::Option<i32>,
12}
13impl ListV2LoggingLevelsInput {
14    /// <p>The type of resource for which you are configuring logging. Must be <code>THING_Group</code>.</p>
15    pub fn target_type(&self) -> ::std::option::Option<&crate::types::LogTargetType> {
16        self.target_type.as_ref()
17    }
18    /// <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>
19    pub fn next_token(&self) -> ::std::option::Option<&str> {
20        self.next_token.as_deref()
21    }
22    /// <p>The maximum number of results to return at one time.</p>
23    pub fn max_results(&self) -> ::std::option::Option<i32> {
24        self.max_results
25    }
26}
27impl ListV2LoggingLevelsInput {
28    /// Creates a new builder-style object to manufacture [`ListV2LoggingLevelsInput`](crate::operation::list_v2_logging_levels::ListV2LoggingLevelsInput).
29    pub fn builder() -> crate::operation::list_v2_logging_levels::builders::ListV2LoggingLevelsInputBuilder {
30        crate::operation::list_v2_logging_levels::builders::ListV2LoggingLevelsInputBuilder::default()
31    }
32}
33
34/// A builder for [`ListV2LoggingLevelsInput`](crate::operation::list_v2_logging_levels::ListV2LoggingLevelsInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct ListV2LoggingLevelsInputBuilder {
38    pub(crate) target_type: ::std::option::Option<crate::types::LogTargetType>,
39    pub(crate) next_token: ::std::option::Option<::std::string::String>,
40    pub(crate) max_results: ::std::option::Option<i32>,
41}
42impl ListV2LoggingLevelsInputBuilder {
43    /// <p>The type of resource for which you are configuring logging. Must be <code>THING_Group</code>.</p>
44    pub fn target_type(mut self, input: crate::types::LogTargetType) -> Self {
45        self.target_type = ::std::option::Option::Some(input);
46        self
47    }
48    /// <p>The type of resource for which you are configuring logging. Must be <code>THING_Group</code>.</p>
49    pub fn set_target_type(mut self, input: ::std::option::Option<crate::types::LogTargetType>) -> Self {
50        self.target_type = input;
51        self
52    }
53    /// <p>The type of resource for which you are configuring logging. Must be <code>THING_Group</code>.</p>
54    pub fn get_target_type(&self) -> &::std::option::Option<crate::types::LogTargetType> {
55        &self.target_type
56    }
57    /// <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>
58    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59        self.next_token = ::std::option::Option::Some(input.into());
60        self
61    }
62    /// <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>
63    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
64        self.next_token = input;
65        self
66    }
67    /// <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>
68    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
69        &self.next_token
70    }
71    /// <p>The maximum number of results to return at one time.</p>
72    pub fn max_results(mut self, input: i32) -> Self {
73        self.max_results = ::std::option::Option::Some(input);
74        self
75    }
76    /// <p>The maximum number of results to return at one time.</p>
77    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
78        self.max_results = input;
79        self
80    }
81    /// <p>The maximum number of results to return at one time.</p>
82    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
83        &self.max_results
84    }
85    /// Consumes the builder and constructs a [`ListV2LoggingLevelsInput`](crate::operation::list_v2_logging_levels::ListV2LoggingLevelsInput).
86    pub fn build(
87        self,
88    ) -> ::std::result::Result<crate::operation::list_v2_logging_levels::ListV2LoggingLevelsInput, ::aws_smithy_types::error::operation::BuildError>
89    {
90        ::std::result::Result::Ok(crate::operation::list_v2_logging_levels::ListV2LoggingLevelsInput {
91            target_type: self.target_type,
92            next_token: self.next_token,
93            max_results: self.max_results,
94        })
95    }
96}