aws_sdk_directconnect/operation/describe_lags/
_describe_lags_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 DescribeLagsInput {
6    /// <p>The ID of the LAG.</p>
7    pub lag_id: ::std::option::Option<::std::string::String>,
8    /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
9    /// <p>If <code>MaxResults</code> is given a value larger than 100, only 100 results are returned.</p>
10    pub max_results: ::std::option::Option<i32>,
11    /// <p>The token for the next page of results.</p>
12    pub next_token: ::std::option::Option<::std::string::String>,
13}
14impl DescribeLagsInput {
15    /// <p>The ID of the LAG.</p>
16    pub fn lag_id(&self) -> ::std::option::Option<&str> {
17        self.lag_id.as_deref()
18    }
19    /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
20    /// <p>If <code>MaxResults</code> is given a value larger than 100, only 100 results are returned.</p>
21    pub fn max_results(&self) -> ::std::option::Option<i32> {
22        self.max_results
23    }
24    /// <p>The token for the next page of results.</p>
25    pub fn next_token(&self) -> ::std::option::Option<&str> {
26        self.next_token.as_deref()
27    }
28}
29impl DescribeLagsInput {
30    /// Creates a new builder-style object to manufacture [`DescribeLagsInput`](crate::operation::describe_lags::DescribeLagsInput).
31    pub fn builder() -> crate::operation::describe_lags::builders::DescribeLagsInputBuilder {
32        crate::operation::describe_lags::builders::DescribeLagsInputBuilder::default()
33    }
34}
35
36/// A builder for [`DescribeLagsInput`](crate::operation::describe_lags::DescribeLagsInput).
37#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct DescribeLagsInputBuilder {
40    pub(crate) lag_id: ::std::option::Option<::std::string::String>,
41    pub(crate) max_results: ::std::option::Option<i32>,
42    pub(crate) next_token: ::std::option::Option<::std::string::String>,
43}
44impl DescribeLagsInputBuilder {
45    /// <p>The ID of the LAG.</p>
46    pub fn lag_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
47        self.lag_id = ::std::option::Option::Some(input.into());
48        self
49    }
50    /// <p>The ID of the LAG.</p>
51    pub fn set_lag_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52        self.lag_id = input;
53        self
54    }
55    /// <p>The ID of the LAG.</p>
56    pub fn get_lag_id(&self) -> &::std::option::Option<::std::string::String> {
57        &self.lag_id
58    }
59    /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
60    /// <p>If <code>MaxResults</code> is given a value larger than 100, only 100 results are returned.</p>
61    pub fn max_results(mut self, input: i32) -> Self {
62        self.max_results = ::std::option::Option::Some(input);
63        self
64    }
65    /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
66    /// <p>If <code>MaxResults</code> is given a value larger than 100, only 100 results are returned.</p>
67    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
68        self.max_results = input;
69        self
70    }
71    /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
72    /// <p>If <code>MaxResults</code> is given a value larger than 100, only 100 results are returned.</p>
73    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
74        &self.max_results
75    }
76    /// <p>The token for the next page of results.</p>
77    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
78        self.next_token = ::std::option::Option::Some(input.into());
79        self
80    }
81    /// <p>The token for the next page of results.</p>
82    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
83        self.next_token = input;
84        self
85    }
86    /// <p>The token for the next page of results.</p>
87    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
88        &self.next_token
89    }
90    /// Consumes the builder and constructs a [`DescribeLagsInput`](crate::operation::describe_lags::DescribeLagsInput).
91    pub fn build(
92        self,
93    ) -> ::std::result::Result<crate::operation::describe_lags::DescribeLagsInput, ::aws_smithy_types::error::operation::BuildError> {
94        ::std::result::Result::Ok(crate::operation::describe_lags::DescribeLagsInput {
95            lag_id: self.lag_id,
96            max_results: self.max_results,
97            next_token: self.next_token,
98        })
99    }
100}