aws_sdk_datazone/operation/accept_predictions/
_accept_predictions_output.rs#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AcceptPredictionsOutput {
pub domain_id: ::std::string::String,
pub asset_id: ::std::string::String,
pub revision: ::std::string::String,
_request_id: Option<String>,
}
impl AcceptPredictionsOutput {
pub fn domain_id(&self) -> &str {
use std::ops::Deref;
self.domain_id.deref()
}
pub fn asset_id(&self) -> &str {
use std::ops::Deref;
self.asset_id.deref()
}
pub fn revision(&self) -> &str {
use std::ops::Deref;
self.revision.deref()
}
}
impl ::aws_types::request_id::RequestId for AcceptPredictionsOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl AcceptPredictionsOutput {
pub fn builder() -> crate::operation::accept_predictions::builders::AcceptPredictionsOutputBuilder {
crate::operation::accept_predictions::builders::AcceptPredictionsOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AcceptPredictionsOutputBuilder {
pub(crate) domain_id: ::std::option::Option<::std::string::String>,
pub(crate) asset_id: ::std::option::Option<::std::string::String>,
pub(crate) revision: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl AcceptPredictionsOutputBuilder {
pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.domain_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.domain_id = input;
self
}
pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
&self.domain_id
}
pub fn asset_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.asset_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_asset_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.asset_id = input;
self
}
pub fn get_asset_id(&self) -> &::std::option::Option<::std::string::String> {
&self.asset_id
}
pub fn revision(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.revision = ::std::option::Option::Some(input.into());
self
}
pub fn set_revision(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.revision = input;
self
}
pub fn get_revision(&self) -> &::std::option::Option<::std::string::String> {
&self.revision
}
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::accept_predictions::AcceptPredictionsOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::accept_predictions::AcceptPredictionsOutput {
domain_id: self.domain_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"domain_id",
"domain_id was not specified but it is required when building AcceptPredictionsOutput",
)
})?,
asset_id: self.asset_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"asset_id",
"asset_id was not specified but it is required when building AcceptPredictionsOutput",
)
})?,
revision: self.revision.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"revision",
"revision was not specified but it is required when building AcceptPredictionsOutput",
)
})?,
_request_id: self._request_id,
})
}
}