aws_sdk_datazone/operation/reject_predictions/
_reject_predictions_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct RejectPredictionsOutput {
6 pub domain_id: ::std::string::String,
8 pub asset_id: ::std::string::String,
10 pub asset_revision: ::std::string::String,
12 _request_id: Option<String>,
13}
14impl RejectPredictionsOutput {
15 pub fn domain_id(&self) -> &str {
17 use std::ops::Deref;
18 self.domain_id.deref()
19 }
20 pub fn asset_id(&self) -> &str {
22 use std::ops::Deref;
23 self.asset_id.deref()
24 }
25 pub fn asset_revision(&self) -> &str {
27 use std::ops::Deref;
28 self.asset_revision.deref()
29 }
30}
31impl ::aws_types::request_id::RequestId for RejectPredictionsOutput {
32 fn request_id(&self) -> Option<&str> {
33 self._request_id.as_deref()
34 }
35}
36impl RejectPredictionsOutput {
37 pub fn builder() -> crate::operation::reject_predictions::builders::RejectPredictionsOutputBuilder {
39 crate::operation::reject_predictions::builders::RejectPredictionsOutputBuilder::default()
40 }
41}
42
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
45#[non_exhaustive]
46pub struct RejectPredictionsOutputBuilder {
47 pub(crate) domain_id: ::std::option::Option<::std::string::String>,
48 pub(crate) asset_id: ::std::option::Option<::std::string::String>,
49 pub(crate) asset_revision: ::std::option::Option<::std::string::String>,
50 _request_id: Option<String>,
51}
52impl RejectPredictionsOutputBuilder {
53 pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
56 self.domain_id = ::std::option::Option::Some(input.into());
57 self
58 }
59 pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
61 self.domain_id = input;
62 self
63 }
64 pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
66 &self.domain_id
67 }
68 pub fn asset_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
71 self.asset_id = ::std::option::Option::Some(input.into());
72 self
73 }
74 pub fn set_asset_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
76 self.asset_id = input;
77 self
78 }
79 pub fn get_asset_id(&self) -> &::std::option::Option<::std::string::String> {
81 &self.asset_id
82 }
83 pub fn asset_revision(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
86 self.asset_revision = ::std::option::Option::Some(input.into());
87 self
88 }
89 pub fn set_asset_revision(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
91 self.asset_revision = input;
92 self
93 }
94 pub fn get_asset_revision(&self) -> &::std::option::Option<::std::string::String> {
96 &self.asset_revision
97 }
98 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
99 self._request_id = Some(request_id.into());
100 self
101 }
102
103 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
104 self._request_id = request_id;
105 self
106 }
107 pub fn build(
113 self,
114 ) -> ::std::result::Result<crate::operation::reject_predictions::RejectPredictionsOutput, ::aws_smithy_types::error::operation::BuildError> {
115 ::std::result::Result::Ok(crate::operation::reject_predictions::RejectPredictionsOutput {
116 domain_id: self.domain_id.ok_or_else(|| {
117 ::aws_smithy_types::error::operation::BuildError::missing_field(
118 "domain_id",
119 "domain_id was not specified but it is required when building RejectPredictionsOutput",
120 )
121 })?,
122 asset_id: self.asset_id.ok_or_else(|| {
123 ::aws_smithy_types::error::operation::BuildError::missing_field(
124 "asset_id",
125 "asset_id was not specified but it is required when building RejectPredictionsOutput",
126 )
127 })?,
128 asset_revision: self.asset_revision.ok_or_else(|| {
129 ::aws_smithy_types::error::operation::BuildError::missing_field(
130 "asset_revision",
131 "asset_revision was not specified but it is required when building RejectPredictionsOutput",
132 )
133 })?,
134 _request_id: self._request_id,
135 })
136 }
137}