aws_sdk_connect/operation/search_contacts/
_search_contacts_input.rs#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SearchContactsInput {
pub instance_id: ::std::option::Option<::std::string::String>,
pub time_range: ::std::option::Option<crate::types::SearchContactsTimeRange>,
pub search_criteria: ::std::option::Option<crate::types::SearchCriteria>,
pub max_results: ::std::option::Option<i32>,
pub next_token: ::std::option::Option<::std::string::String>,
pub sort: ::std::option::Option<crate::types::Sort>,
}
impl SearchContactsInput {
pub fn instance_id(&self) -> ::std::option::Option<&str> {
self.instance_id.as_deref()
}
pub fn time_range(&self) -> ::std::option::Option<&crate::types::SearchContactsTimeRange> {
self.time_range.as_ref()
}
pub fn search_criteria(&self) -> ::std::option::Option<&crate::types::SearchCriteria> {
self.search_criteria.as_ref()
}
pub fn max_results(&self) -> ::std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> ::std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn sort(&self) -> ::std::option::Option<&crate::types::Sort> {
self.sort.as_ref()
}
}
impl SearchContactsInput {
pub fn builder() -> crate::operation::search_contacts::builders::SearchContactsInputBuilder {
crate::operation::search_contacts::builders::SearchContactsInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SearchContactsInputBuilder {
pub(crate) instance_id: ::std::option::Option<::std::string::String>,
pub(crate) time_range: ::std::option::Option<crate::types::SearchContactsTimeRange>,
pub(crate) search_criteria: ::std::option::Option<crate::types::SearchCriteria>,
pub(crate) max_results: ::std::option::Option<i32>,
pub(crate) next_token: ::std::option::Option<::std::string::String>,
pub(crate) sort: ::std::option::Option<crate::types::Sort>,
}
impl SearchContactsInputBuilder {
pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.instance_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.instance_id = input;
self
}
pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
&self.instance_id
}
pub fn time_range(mut self, input: crate::types::SearchContactsTimeRange) -> Self {
self.time_range = ::std::option::Option::Some(input);
self
}
pub fn set_time_range(mut self, input: ::std::option::Option<crate::types::SearchContactsTimeRange>) -> Self {
self.time_range = input;
self
}
pub fn get_time_range(&self) -> &::std::option::Option<crate::types::SearchContactsTimeRange> {
&self.time_range
}
pub fn search_criteria(mut self, input: crate::types::SearchCriteria) -> Self {
self.search_criteria = ::std::option::Option::Some(input);
self
}
pub fn set_search_criteria(mut self, input: ::std::option::Option<crate::types::SearchCriteria>) -> Self {
self.search_criteria = input;
self
}
pub fn get_search_criteria(&self) -> &::std::option::Option<crate::types::SearchCriteria> {
&self.search_criteria
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = ::std::option::Option::Some(input);
self
}
pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn get_max_results(&self) -> &::std::option::Option<i32> {
&self.max_results
}
pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.next_token = ::std::option::Option::Some(input.into());
self
}
pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
&self.next_token
}
pub fn sort(mut self, input: crate::types::Sort) -> Self {
self.sort = ::std::option::Option::Some(input);
self
}
pub fn set_sort(mut self, input: ::std::option::Option<crate::types::Sort>) -> Self {
self.sort = input;
self
}
pub fn get_sort(&self) -> &::std::option::Option<crate::types::Sort> {
&self.sort
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::search_contacts::SearchContactsInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::search_contacts::SearchContactsInput {
instance_id: self.instance_id,
time_range: self.time_range,
search_criteria: self.search_criteria,
max_results: self.max_results,
next_token: self.next_token,
sort: self.sort,
})
}
}