aws_sdk_lexmodelbuilding/operation/get_bots/
_get_bots_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 GetBotsInput {
6    /// <p>A pagination token that fetches the next page of bots. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of bots, specify the pagination token in the next request.</p>
7    pub next_token: ::std::option::Option<::std::string::String>,
8    /// <p>The maximum number of bots to return in the response that the request will return. The default is 10.</p>
9    pub max_results: ::std::option::Option<i32>,
10    /// <p>Substring to match in bot names. A bot will be returned if any part of its name matches the substring. For example, "xyz" matches both "xyzabc" and "abcxyz."</p>
11    pub name_contains: ::std::option::Option<::std::string::String>,
12}
13impl GetBotsInput {
14    /// <p>A pagination token that fetches the next page of bots. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of bots, specify the pagination token in the next request.</p>
15    pub fn next_token(&self) -> ::std::option::Option<&str> {
16        self.next_token.as_deref()
17    }
18    /// <p>The maximum number of bots to return in the response that the request will return. The default is 10.</p>
19    pub fn max_results(&self) -> ::std::option::Option<i32> {
20        self.max_results
21    }
22    /// <p>Substring to match in bot names. A bot will be returned if any part of its name matches the substring. For example, "xyz" matches both "xyzabc" and "abcxyz."</p>
23    pub fn name_contains(&self) -> ::std::option::Option<&str> {
24        self.name_contains.as_deref()
25    }
26}
27impl GetBotsInput {
28    /// Creates a new builder-style object to manufacture [`GetBotsInput`](crate::operation::get_bots::GetBotsInput).
29    pub fn builder() -> crate::operation::get_bots::builders::GetBotsInputBuilder {
30        crate::operation::get_bots::builders::GetBotsInputBuilder::default()
31    }
32}
33
34/// A builder for [`GetBotsInput`](crate::operation::get_bots::GetBotsInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct GetBotsInputBuilder {
38    pub(crate) next_token: ::std::option::Option<::std::string::String>,
39    pub(crate) max_results: ::std::option::Option<i32>,
40    pub(crate) name_contains: ::std::option::Option<::std::string::String>,
41}
42impl GetBotsInputBuilder {
43    /// <p>A pagination token that fetches the next page of bots. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of bots, specify the pagination token in the next request.</p>
44    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
45        self.next_token = ::std::option::Option::Some(input.into());
46        self
47    }
48    /// <p>A pagination token that fetches the next page of bots. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of bots, specify the pagination token in the next request.</p>
49    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
50        self.next_token = input;
51        self
52    }
53    /// <p>A pagination token that fetches the next page of bots. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of bots, specify the pagination token in the next request.</p>
54    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
55        &self.next_token
56    }
57    /// <p>The maximum number of bots to return in the response that the request will return. The default is 10.</p>
58    pub fn max_results(mut self, input: i32) -> Self {
59        self.max_results = ::std::option::Option::Some(input);
60        self
61    }
62    /// <p>The maximum number of bots to return in the response that the request will return. The default is 10.</p>
63    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
64        self.max_results = input;
65        self
66    }
67    /// <p>The maximum number of bots to return in the response that the request will return. The default is 10.</p>
68    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
69        &self.max_results
70    }
71    /// <p>Substring to match in bot names. A bot will be returned if any part of its name matches the substring. For example, "xyz" matches both "xyzabc" and "abcxyz."</p>
72    pub fn name_contains(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73        self.name_contains = ::std::option::Option::Some(input.into());
74        self
75    }
76    /// <p>Substring to match in bot names. A bot will be returned if any part of its name matches the substring. For example, "xyz" matches both "xyzabc" and "abcxyz."</p>
77    pub fn set_name_contains(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
78        self.name_contains = input;
79        self
80    }
81    /// <p>Substring to match in bot names. A bot will be returned if any part of its name matches the substring. For example, "xyz" matches both "xyzabc" and "abcxyz."</p>
82    pub fn get_name_contains(&self) -> &::std::option::Option<::std::string::String> {
83        &self.name_contains
84    }
85    /// Consumes the builder and constructs a [`GetBotsInput`](crate::operation::get_bots::GetBotsInput).
86    pub fn build(self) -> ::std::result::Result<crate::operation::get_bots::GetBotsInput, ::aws_smithy_types::error::operation::BuildError> {
87        ::std::result::Result::Ok(crate::operation::get_bots::GetBotsInput {
88            next_token: self.next_token,
89            max_results: self.max_results,
90            name_contains: self.name_contains,
91        })
92    }
93}