aws_sdk_pcaconnectorad/operation/list_templates/
_list_templates_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 ListTemplatesInput {
6    /// <p>Use this parameter when paginating results to specify the maximum number of items to return in the response on each page. If additional items exist beyond the number you specify, the <code>NextToken</code> element is sent in the response. Use this <code>NextToken</code> value in a subsequent request to retrieve additional items.</p>
7    pub max_results: ::std::option::Option<i32>,
8    /// <p>Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of the <code>NextToken</code> parameter from the response you just received.</p>
9    pub next_token: ::std::option::Option<::std::string::String>,
10    /// <p>The Amazon Resource Name (ARN) that was returned when you called <a href="https://docs.aws.amazon.com/pca-connector-ad/latest/APIReference/API_CreateConnector.html">CreateConnector</a>.</p>
11    pub connector_arn: ::std::option::Option<::std::string::String>,
12}
13impl ListTemplatesInput {
14    /// <p>Use this parameter when paginating results to specify the maximum number of items to return in the response on each page. If additional items exist beyond the number you specify, the <code>NextToken</code> element is sent in the response. Use this <code>NextToken</code> value in a subsequent request to retrieve additional items.</p>
15    pub fn max_results(&self) -> ::std::option::Option<i32> {
16        self.max_results
17    }
18    /// <p>Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of the <code>NextToken</code> parameter from the response you just received.</p>
19    pub fn next_token(&self) -> ::std::option::Option<&str> {
20        self.next_token.as_deref()
21    }
22    /// <p>The Amazon Resource Name (ARN) that was returned when you called <a href="https://docs.aws.amazon.com/pca-connector-ad/latest/APIReference/API_CreateConnector.html">CreateConnector</a>.</p>
23    pub fn connector_arn(&self) -> ::std::option::Option<&str> {
24        self.connector_arn.as_deref()
25    }
26}
27impl ListTemplatesInput {
28    /// Creates a new builder-style object to manufacture [`ListTemplatesInput`](crate::operation::list_templates::ListTemplatesInput).
29    pub fn builder() -> crate::operation::list_templates::builders::ListTemplatesInputBuilder {
30        crate::operation::list_templates::builders::ListTemplatesInputBuilder::default()
31    }
32}
33
34/// A builder for [`ListTemplatesInput`](crate::operation::list_templates::ListTemplatesInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct ListTemplatesInputBuilder {
38    pub(crate) max_results: ::std::option::Option<i32>,
39    pub(crate) next_token: ::std::option::Option<::std::string::String>,
40    pub(crate) connector_arn: ::std::option::Option<::std::string::String>,
41}
42impl ListTemplatesInputBuilder {
43    /// <p>Use this parameter when paginating results to specify the maximum number of items to return in the response on each page. If additional items exist beyond the number you specify, the <code>NextToken</code> element is sent in the response. Use this <code>NextToken</code> value in a subsequent request to retrieve additional items.</p>
44    pub fn max_results(mut self, input: i32) -> Self {
45        self.max_results = ::std::option::Option::Some(input);
46        self
47    }
48    /// <p>Use this parameter when paginating results to specify the maximum number of items to return in the response on each page. If additional items exist beyond the number you specify, the <code>NextToken</code> element is sent in the response. Use this <code>NextToken</code> value in a subsequent request to retrieve additional items.</p>
49    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
50        self.max_results = input;
51        self
52    }
53    /// <p>Use this parameter when paginating results to specify the maximum number of items to return in the response on each page. If additional items exist beyond the number you specify, the <code>NextToken</code> element is sent in the response. Use this <code>NextToken</code> value in a subsequent request to retrieve additional items.</p>
54    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
55        &self.max_results
56    }
57    /// <p>Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of the <code>NextToken</code> parameter from the response you just received.</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>Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of the <code>NextToken</code> parameter from the response you just received.</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>Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of the <code>NextToken</code> parameter from the response you just received.</p>
68    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
69        &self.next_token
70    }
71    /// <p>The Amazon Resource Name (ARN) that was returned when you called <a href="https://docs.aws.amazon.com/pca-connector-ad/latest/APIReference/API_CreateConnector.html">CreateConnector</a>.</p>
72    /// This field is required.
73    pub fn connector_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.connector_arn = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>The Amazon Resource Name (ARN) that was returned when you called <a href="https://docs.aws.amazon.com/pca-connector-ad/latest/APIReference/API_CreateConnector.html">CreateConnector</a>.</p>
78    pub fn set_connector_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.connector_arn = input;
80        self
81    }
82    /// <p>The Amazon Resource Name (ARN) that was returned when you called <a href="https://docs.aws.amazon.com/pca-connector-ad/latest/APIReference/API_CreateConnector.html">CreateConnector</a>.</p>
83    pub fn get_connector_arn(&self) -> &::std::option::Option<::std::string::String> {
84        &self.connector_arn
85    }
86    /// Consumes the builder and constructs a [`ListTemplatesInput`](crate::operation::list_templates::ListTemplatesInput).
87    pub fn build(
88        self,
89    ) -> ::std::result::Result<crate::operation::list_templates::ListTemplatesInput, ::aws_smithy_types::error::operation::BuildError> {
90        ::std::result::Result::Ok(crate::operation::list_templates::ListTemplatesInput {
91            max_results: self.max_results,
92            next_token: self.next_token,
93            connector_arn: self.connector_arn,
94        })
95    }
96}