aws_sdk_connect/operation/search_prompts/
_search_prompts_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 SearchPromptsInput {
6    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
7    pub instance_id: ::std::option::Option<::std::string::String>,
8    /// <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p>
9    pub next_token: ::std::option::Option<::std::string::String>,
10    /// <p>The maximum number of results to return per page.</p>
11    pub max_results: ::std::option::Option<i32>,
12    /// <p>Filters to be applied to search results.</p>
13    pub search_filter: ::std::option::Option<crate::types::PromptSearchFilter>,
14    /// <p>The search criteria to be used to return prompts.</p>
15    pub search_criteria: ::std::option::Option<crate::types::PromptSearchCriteria>,
16}
17impl SearchPromptsInput {
18    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
19    pub fn instance_id(&self) -> ::std::option::Option<&str> {
20        self.instance_id.as_deref()
21    }
22    /// <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p>
23    pub fn next_token(&self) -> ::std::option::Option<&str> {
24        self.next_token.as_deref()
25    }
26    /// <p>The maximum number of results to return per page.</p>
27    pub fn max_results(&self) -> ::std::option::Option<i32> {
28        self.max_results
29    }
30    /// <p>Filters to be applied to search results.</p>
31    pub fn search_filter(&self) -> ::std::option::Option<&crate::types::PromptSearchFilter> {
32        self.search_filter.as_ref()
33    }
34    /// <p>The search criteria to be used to return prompts.</p>
35    pub fn search_criteria(&self) -> ::std::option::Option<&crate::types::PromptSearchCriteria> {
36        self.search_criteria.as_ref()
37    }
38}
39impl SearchPromptsInput {
40    /// Creates a new builder-style object to manufacture [`SearchPromptsInput`](crate::operation::search_prompts::SearchPromptsInput).
41    pub fn builder() -> crate::operation::search_prompts::builders::SearchPromptsInputBuilder {
42        crate::operation::search_prompts::builders::SearchPromptsInputBuilder::default()
43    }
44}
45
46/// A builder for [`SearchPromptsInput`](crate::operation::search_prompts::SearchPromptsInput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct SearchPromptsInputBuilder {
50    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
51    pub(crate) next_token: ::std::option::Option<::std::string::String>,
52    pub(crate) max_results: ::std::option::Option<i32>,
53    pub(crate) search_filter: ::std::option::Option<crate::types::PromptSearchFilter>,
54    pub(crate) search_criteria: ::std::option::Option<crate::types::PromptSearchCriteria>,
55}
56impl SearchPromptsInputBuilder {
57    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
58    /// This field is required.
59    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.instance_id = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
64    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.instance_id = input;
66        self
67    }
68    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
69    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
70        &self.instance_id
71    }
72    /// <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p>
73    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.next_token = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p>
78    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.next_token = input;
80        self
81    }
82    /// <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p>
83    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
84        &self.next_token
85    }
86    /// <p>The maximum number of results to return per page.</p>
87    pub fn max_results(mut self, input: i32) -> Self {
88        self.max_results = ::std::option::Option::Some(input);
89        self
90    }
91    /// <p>The maximum number of results to return per page.</p>
92    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
93        self.max_results = input;
94        self
95    }
96    /// <p>The maximum number of results to return per page.</p>
97    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
98        &self.max_results
99    }
100    /// <p>Filters to be applied to search results.</p>
101    pub fn search_filter(mut self, input: crate::types::PromptSearchFilter) -> Self {
102        self.search_filter = ::std::option::Option::Some(input);
103        self
104    }
105    /// <p>Filters to be applied to search results.</p>
106    pub fn set_search_filter(mut self, input: ::std::option::Option<crate::types::PromptSearchFilter>) -> Self {
107        self.search_filter = input;
108        self
109    }
110    /// <p>Filters to be applied to search results.</p>
111    pub fn get_search_filter(&self) -> &::std::option::Option<crate::types::PromptSearchFilter> {
112        &self.search_filter
113    }
114    /// <p>The search criteria to be used to return prompts.</p>
115    pub fn search_criteria(mut self, input: crate::types::PromptSearchCriteria) -> Self {
116        self.search_criteria = ::std::option::Option::Some(input);
117        self
118    }
119    /// <p>The search criteria to be used to return prompts.</p>
120    pub fn set_search_criteria(mut self, input: ::std::option::Option<crate::types::PromptSearchCriteria>) -> Self {
121        self.search_criteria = input;
122        self
123    }
124    /// <p>The search criteria to be used to return prompts.</p>
125    pub fn get_search_criteria(&self) -> &::std::option::Option<crate::types::PromptSearchCriteria> {
126        &self.search_criteria
127    }
128    /// Consumes the builder and constructs a [`SearchPromptsInput`](crate::operation::search_prompts::SearchPromptsInput).
129    pub fn build(
130        self,
131    ) -> ::std::result::Result<crate::operation::search_prompts::SearchPromptsInput, ::aws_smithy_types::error::operation::BuildError> {
132        ::std::result::Result::Ok(crate::operation::search_prompts::SearchPromptsInput {
133            instance_id: self.instance_id,
134            next_token: self.next_token,
135            max_results: self.max_results,
136            search_filter: self.search_filter,
137            search_criteria: self.search_criteria,
138        })
139    }
140}