aws_sdk_directconnect/operation/describe_connections/
_describe_connections_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 DescribeConnectionsInput {
6    /// <p>The ID of the connection.</p>
7    pub connection_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 DescribeConnectionsInput {
15    /// <p>The ID of the connection.</p>
16    pub fn connection_id(&self) -> ::std::option::Option<&str> {
17        self.connection_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 DescribeConnectionsInput {
30    /// Creates a new builder-style object to manufacture [`DescribeConnectionsInput`](crate::operation::describe_connections::DescribeConnectionsInput).
31    pub fn builder() -> crate::operation::describe_connections::builders::DescribeConnectionsInputBuilder {
32        crate::operation::describe_connections::builders::DescribeConnectionsInputBuilder::default()
33    }
34}
35
36/// A builder for [`DescribeConnectionsInput`](crate::operation::describe_connections::DescribeConnectionsInput).
37#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct DescribeConnectionsInputBuilder {
40    pub(crate) connection_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 DescribeConnectionsInputBuilder {
45    /// <p>The ID of the connection.</p>
46    pub fn connection_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
47        self.connection_id = ::std::option::Option::Some(input.into());
48        self
49    }
50    /// <p>The ID of the connection.</p>
51    pub fn set_connection_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52        self.connection_id = input;
53        self
54    }
55    /// <p>The ID of the connection.</p>
56    pub fn get_connection_id(&self) -> &::std::option::Option<::std::string::String> {
57        &self.connection_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 [`DescribeConnectionsInput`](crate::operation::describe_connections::DescribeConnectionsInput).
91    pub fn build(
92        self,
93    ) -> ::std::result::Result<crate::operation::describe_connections::DescribeConnectionsInput, ::aws_smithy_types::error::operation::BuildError>
94    {
95        ::std::result::Result::Ok(crate::operation::describe_connections::DescribeConnectionsInput {
96            connection_id: self.connection_id,
97            max_results: self.max_results,
98            next_token: self.next_token,
99        })
100    }
101}