#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DetectTextOutput {
pub text_detections: ::std::option::Option<::std::vec::Vec<crate::types::TextDetection>>,
pub text_model_version: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl DetectTextOutput {
pub fn text_detections(&self) -> ::std::option::Option<&[crate::types::TextDetection]> {
self.text_detections.as_deref()
}
pub fn text_model_version(&self) -> ::std::option::Option<&str> {
self.text_model_version.as_deref()
}
}
impl ::aws_http::request_id::RequestId for DetectTextOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl DetectTextOutput {
pub fn builder() -> crate::operation::detect_text::builders::DetectTextOutputBuilder {
crate::operation::detect_text::builders::DetectTextOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct DetectTextOutputBuilder {
pub(crate) text_detections: ::std::option::Option<::std::vec::Vec<crate::types::TextDetection>>,
pub(crate) text_model_version: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl DetectTextOutputBuilder {
pub fn text_detections(mut self, input: crate::types::TextDetection) -> Self {
let mut v = self.text_detections.unwrap_or_default();
v.push(input);
self.text_detections = ::std::option::Option::Some(v);
self
}
pub fn set_text_detections(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TextDetection>>) -> Self {
self.text_detections = input;
self
}
pub fn get_text_detections(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TextDetection>> {
&self.text_detections
}
pub fn text_model_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.text_model_version = ::std::option::Option::Some(input.into());
self
}
pub fn set_text_model_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.text_model_version = input;
self
}
pub fn get_text_model_version(&self) -> &::std::option::Option<::std::string::String> {
&self.text_model_version
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(self) -> crate::operation::detect_text::DetectTextOutput {
crate::operation::detect_text::DetectTextOutput {
text_detections: self.text_detections,
text_model_version: self.text_model_version,
_request_id: self._request_id,
}
}
}