#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SuggestInput {
pub query: ::std::option::Option<::std::string::String>,
pub suggester: ::std::option::Option<::std::string::String>,
pub size: ::std::option::Option<i64>,
}
impl SuggestInput {
pub fn query(&self) -> ::std::option::Option<&str> {
self.query.as_deref()
}
pub fn suggester(&self) -> ::std::option::Option<&str> {
self.suggester.as_deref()
}
pub fn size(&self) -> ::std::option::Option<i64> {
self.size
}
}
impl SuggestInput {
pub fn builder() -> crate::operation::suggest::builders::SuggestInputBuilder {
crate::operation::suggest::builders::SuggestInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SuggestInputBuilder {
pub(crate) query: ::std::option::Option<::std::string::String>,
pub(crate) suggester: ::std::option::Option<::std::string::String>,
pub(crate) size: ::std::option::Option<i64>,
}
impl SuggestInputBuilder {
pub fn query(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.query = ::std::option::Option::Some(input.into());
self
}
pub fn set_query(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.query = input;
self
}
pub fn get_query(&self) -> &::std::option::Option<::std::string::String> {
&self.query
}
pub fn suggester(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.suggester = ::std::option::Option::Some(input.into());
self
}
pub fn set_suggester(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.suggester = input;
self
}
pub fn get_suggester(&self) -> &::std::option::Option<::std::string::String> {
&self.suggester
}
pub fn size(mut self, input: i64) -> Self {
self.size = ::std::option::Option::Some(input);
self
}
pub fn set_size(mut self, input: ::std::option::Option<i64>) -> Self {
self.size = input;
self
}
pub fn get_size(&self) -> &::std::option::Option<i64> {
&self.size
}
pub fn build(self) -> ::std::result::Result<crate::operation::suggest::SuggestInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::suggest::SuggestInput {
query: self.query,
suggester: self.suggester,
size: self.size,
})
}
}