aws_sdk_iot/operation/list_custom_metrics/
_list_custom_metrics_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct ListCustomMetricsInput {
6    pub next_token: ::std::option::Option<::std::string::String>,
8    pub max_results: ::std::option::Option<i32>,
10}
11impl ListCustomMetricsInput {
12    pub fn next_token(&self) -> ::std::option::Option<&str> {
14        self.next_token.as_deref()
15    }
16    pub fn max_results(&self) -> ::std::option::Option<i32> {
18        self.max_results
19    }
20}
21impl ListCustomMetricsInput {
22    pub fn builder() -> crate::operation::list_custom_metrics::builders::ListCustomMetricsInputBuilder {
24        crate::operation::list_custom_metrics::builders::ListCustomMetricsInputBuilder::default()
25    }
26}
27
28#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct ListCustomMetricsInputBuilder {
32    pub(crate) next_token: ::std::option::Option<::std::string::String>,
33    pub(crate) max_results: ::std::option::Option<i32>,
34}
35impl ListCustomMetricsInputBuilder {
36    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
38        self.next_token = ::std::option::Option::Some(input.into());
39        self
40    }
41    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
43        self.next_token = input;
44        self
45    }
46    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
48        &self.next_token
49    }
50    pub fn max_results(mut self, input: i32) -> Self {
52        self.max_results = ::std::option::Option::Some(input);
53        self
54    }
55    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
57        self.max_results = input;
58        self
59    }
60    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
62        &self.max_results
63    }
64    pub fn build(
66        self,
67    ) -> ::std::result::Result<crate::operation::list_custom_metrics::ListCustomMetricsInput, ::aws_smithy_types::error::operation::BuildError> {
68        ::std::result::Result::Ok(crate::operation::list_custom_metrics::ListCustomMetricsInput {
69            next_token: self.next_token,
70            max_results: self.max_results,
71        })
72    }
73}