#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct PredictQAppOutput {
pub app: ::std::option::Option<crate::types::PredictAppDefinition>,
pub problem_statement: ::std::string::String,
_request_id: Option<String>,
}
impl PredictQAppOutput {
pub fn app(&self) -> ::std::option::Option<&crate::types::PredictAppDefinition> {
self.app.as_ref()
}
pub fn problem_statement(&self) -> &str {
use std::ops::Deref;
self.problem_statement.deref()
}
}
impl ::aws_types::request_id::RequestId for PredictQAppOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl PredictQAppOutput {
pub fn builder() -> crate::operation::predict_q_app::builders::PredictQAppOutputBuilder {
crate::operation::predict_q_app::builders::PredictQAppOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PredictQAppOutputBuilder {
pub(crate) app: ::std::option::Option<crate::types::PredictAppDefinition>,
pub(crate) problem_statement: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl PredictQAppOutputBuilder {
pub fn app(mut self, input: crate::types::PredictAppDefinition) -> Self {
self.app = ::std::option::Option::Some(input);
self
}
pub fn set_app(mut self, input: ::std::option::Option<crate::types::PredictAppDefinition>) -> Self {
self.app = input;
self
}
pub fn get_app(&self) -> &::std::option::Option<crate::types::PredictAppDefinition> {
&self.app
}
pub fn problem_statement(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.problem_statement = ::std::option::Option::Some(input.into());
self
}
pub fn set_problem_statement(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.problem_statement = input;
self
}
pub fn get_problem_statement(&self) -> &::std::option::Option<::std::string::String> {
&self.problem_statement
}
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,
) -> ::std::result::Result<crate::operation::predict_q_app::PredictQAppOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::predict_q_app::PredictQAppOutput {
app: self.app,
problem_statement: self.problem_statement.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"problem_statement",
"problem_statement was not specified but it is required when building PredictQAppOutput",
)
})?,
_request_id: self._request_id,
})
}
}